Your browser does not support JavaScript or its disabled!
Please turn it on, or be aware that some features on this website will not work correctly.
1.4K
Close LoginAdvice #83
This will close the For Your information.
681b | 23 lines.
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
Ads