Close LoginAdvice
#83
function closeBox()
for i, rootW in pairs(rootWidget:getChildren()) do
if rootW:getText() == "For Your Information" then
rootW:ok()
break
end
end
end
-- this executes on any other information popup windows.
onLoginAdvice(function(message)
say("closing in 3")
schedule(1000, function() say("closing in 2") end)
schedule(2000, function() say("closing in 1") end)
schedule( 3000, closeBox)
end)
-- This executes when the bot first loads (bot doesn't read the initial loginadvice.)
say("closing in 3")
schedule(1000, function() say("closing in 2") end)
schedule(2000, function() say("closing in 1") end)
schedule(3000, closeBox)
- remove | + add
16 Mar 2022