Jump to content

Running a script in the background


savj14
 Share

Recommended Posts

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

@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

@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.

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...