savj14 Posted October 30, 2007 Share Posted October 30, 2007 At work we are required to use a VPN in which case is behind a proxy server. When accessing the Internet it requires you to enter your credentials in a pop up login box. I am looking for a way to run a script throughout the day that will Send Enter every time the window pops up. If WinWaitActive("Window Text") then Send("{Enter}") Now how would I loop this until I leave for the day. Maybe keep the icon in the tray and exit the script before I leave. ANy thoughts?? Link to comment Share on other sites More sharing options...
Zedna Posted October 30, 2007 Share Posted October 30, 2007 While 1 If WinActive("Window Text") then Send("{Enter}") Sleep(100) WEnd Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
DjDeep00 Posted October 30, 2007 Share Posted October 30, 2007 @savi14 While 1 If WinWaitActive("Window Text") then Send("{Enter}") ;Try using ContronCommand functions instead of sending keystrokes. else Sleep(1000) ;Make it sleep to decrease memory usage. Endif Wend ;As far as it ending when you leave....if u log off or shutdown then the script will be killed automatically. If you want to kill it manually then look in the helpfile for HotKeySet. Link to comment Share on other sites More sharing options...
savj14 Posted October 30, 2007 Author Share Posted October 30, 2007 @savi14While 1If WinWaitActive("Window Text") thenSend("{Enter}") ;Try using ContronCommand functions instead of sending keystrokes.elseSleep(1000) ;Make it sleep to decrease memory usage.EndifWend;As far as it ending when you leave....if u log off or shutdown then the script will be killed automatically. If you want to kill it manually then look in the helpfile for HotKeySet.Killing the script is no problem. I will leave it in the Tray and exit when I leave. I usually don't logoff as I take my laptop home with me and just leave it in standby mode.As far as Sending the Enter keystroke, I looked into the ControlCommand and wasn't too sure on how I would use that instead of sending Enter Link to comment Share on other sites More sharing options...
DjDeep00 Posted October 30, 2007 Share Posted October 30, 2007 @savi14 Sorry not controlcommand...try using ControlClick ( "title", "text", controlID [, button] [, clicks]] ) To get the controlID for the button you want to click, use AutoIt Window Info tool and get the "ClassNameNN" of the control. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now