Jump to content
TMoney777

Newb question ALT+TAB

Recommended Posts

Hi new to autoit been able to get my script to press 0 at intervals but now I want to have it do so on alternating programs. Got a script looking like this.

Send ("0")
Sleep ("27000")
Send ("{Alt down}")
Sleep ("1000")
Send ("{TAB}")
Sleep ("1000")
Send ("{Alt up}")
Sleep ("1000")
Send ("0")
Sleep ("27000")
Send ("{Alt down}")
Sleep ("1000")
Send ("{TAB}")
Sleep ("1000")
Send ("{Alt up}")
Sleep ("1000")

Presses 0 then holds down Alt for a couple seconds but does not actually press tab. 

Share this post


Link to post
Share on other sites

Using these keys for some reasons may make your scripts quite messy. What are you trying to achieve? May be there is a more reliable way to do that....

Share this post


Link to post
Share on other sites

Yeah I don't know what you're doing but I'd use a WinActivate($win_title) to switch window focus.

example:

WinActivate("readme.txt - Notepad"); Where 'readme.txt - Notepad' equals the title string of the window you want to focus.

Edited by Xandy

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

×
×
  • Create New...