Sign in to follow this  
Followers 0
AutoN00B

Selecting correct window

6 posts in this topic

I am trying to find a way to select a sepecific window before proceeding witha script

what I have been trying to use is ALT+TAB which I can use as Send("!{TAB}")

I attempted to write a while loop that said while NOT the window I want send ("!{TAB}")

I can only get this to go back and forth between two windows. I attempted to change it with "!{TAB}{TAB}" or "!{TAB}{TAB}" but did not have any luck

is there an easier way to select windows or to send multiple iterations of tab while still holding the alt key?

Thanks for any/all help

Share this post


Link to post
Share on other sites



WinActivate()?

Oh, and welcome to the forums :)


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

while NOT the window I want send ("!{TAB}")

While 1
If NOT WinActive("notepad","") then;please use AutoIT Finder to get correct title
send("!{TAB}")
Wend

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

thanks for the fast help!

d4rd that is very similar to one of my various attempts

the problem I am running into and I guess did not sufficiently explain is that I may need to cycle through multiple windows. This method only sends one iteration of Alt+Tab per attempt. This means that if you have 7 windows open it will only cycle between two and may never pull up the one intended. If we stick with this method (as I said there is probably a better one, I simply don't know it) we need to get the number of times it sends tab while holding ALT to increase each time.

also on your code I had to add an endif to get it to run. I have not used if statements in autoIT before but this seems odd as the command is only one line. (not a big deal and something I can figure out later, but am I missing something very obvious with this?)

Share this post


Link to post
Share on other sites

also on your code I had to add an endif to get it to run.

i sometimes have such foolish typo, sorry :)

... And if you want to open the Apps by pressing Alt + Tab, so you need to know where it is (the order of it) to send the right tab counts


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

if I need to know the order it falls in, which I don't, is there another way to go about selecting open windows?

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