Sign in to follow this  
Followers 0
iiz

help adding alt+tab to a script

4 posts in this topic

ok so i made this really simple script and i wanted to add alot of complexity here is the original:

While 1
$delay = Random(3000)
MouseClick ("left")
Sleep($delay)
WEnd

i would like this script to click reload on a browser then alt+tab to another browser and click again(since there is no mouse movement i basically just want to add it doing the alt+tab since i can just hover the mouse over the reload button), and be able to repeat this with a delay of about 20seconds or 2k milli

if anyone could help me out here that would be great :whistle:

thanks

-iiz

Share this post


Link to post
Share on other sites



Opt("WinTitleMatchMode", 2)

While 1
    WinWaitActive("Firefox") ; just put one word thats always in the title here like firefox or Explorer
    Send("{F5}")
    Sleep(1000)
    Send("{ALT DOWN}")
    Send("{TAB}")
    Send("{ALT UP}")
    Sleep(1000)
WEnd

that should work

Share this post


Link to post
Share on other sites

Im sure there is a better way to do what you are after. What is it you are trying to accomplish. Alt Tab will error on you if you have an extra window open... and there are built in commands for activating windows... read the help file.

Share this post


Link to post
Share on other sites

Opt("WinTitleMatchMode", 2)

While 1
    WinWaitActive("Firefox") ; just put one word thats always in the title here like firefox or Explorer
    Send("{F5}")
    Sleep(1000)
    Send("{ALT DOWN}")
    Send("{TAB}")
    Send("{ALT UP}")
    Sleep(1000)
WEnd

that should work

thank you very much

Share this post


Link to post
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
Sign in to follow this  
Followers 0