pt80chip
Joined: 27 Feb 2008 Posts: 20
|
Posted: Mon May 05, 2008 10:52 pm Post subject: If statement that will work for switching between windows |
|
|
Hi. I have a program that changes it's that has a winactive name that changes every time you open a different document, just like excel for example.
What I'd like to do is go to that program and enter some information into the correct document. If that document is not open, then do a file, open and select the document. The program would always be open on my computer and only have 1 of 4 different documents open.
Here is an example. If you open Microsoft Excel and opened a spreadsheet called test1, this is what the name of the window would be: Microsoft Office Excel 2003 - test1.
However, I may have test2 open, so I need AHK to check to make sure that test1 is open, if it is, WinActivate Microsoft Office Excel 2003 - test1. If not, it has to look for test2, if that is open, then it should open test1. if it isn't open either, then look for test3, if it is open, then it should close it and open test1.
Any ideas?
Regards,
Andy |
|