From 5dbca6bb3ed33cb8f19ea3871ce7ef9f07957088 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 21 Jun 2024 10:06:55 -0400 Subject: Move newer Lua modules to scripts/lua/require subdirectory. --- indra/newview/scripts/lua/require/login.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 indra/newview/scripts/lua/require/login.lua (limited to 'indra/newview/scripts/lua/require/login.lua') diff --git a/indra/newview/scripts/lua/require/login.lua b/indra/newview/scripts/lua/require/login.lua new file mode 100644 index 0000000000..0d8591cace --- /dev/null +++ b/indra/newview/scripts/lua/require/login.lua @@ -0,0 +1,19 @@ +local UI = require 'UI' +local leap = require 'leap' + +local function login(username, password) + if username and password then + local userpath = '//username_combo/Combo Text Entry' + local passpath = '//password_edit' + -- first clear anything presently in those text fields + for _, path in pairs({userpath, passpath}) do + UI.click(path) + UI.keypress{keysym='Backsp', path=path} + end + UI.type{path=userpath, text=username} + UI.type{path=passpath, text=password} + end + leap.send('LLPanelLogin', {op='onClickConnect'}) +end + +return login -- cgit v1.2.3