| View previous topic :: View next topic |
| Author |
Message |
john tuomi
Joined: 22 May 2006 Posts: 67
|
Posted: Fri May 09, 2008 5:48 pm Post subject: How Do I Minimize A Loop to a single instance per window? |
|
|
Greetings!
I am trying to right a script that looks for a specific window name, and when it finds that window, enter a word (In this case, APT), and then not send APT until a new window bearing the same name appears.
I tried using a sleep command to halt the loop until the person has had a chance to exit the screen, but that doesn't seem efficient.
Any ideas?
| Code: | Loop
{
IfWinActive Document1 - Microsoft Word
Send, APT
sleep,10000
} |
|
|
| Back to top |
|
 |
poetbox
Joined: 07 Jan 2007 Posts: 59
|
Posted: Fri May 09, 2008 5:53 pm Post subject: |
|
|
| sleep is not a good idea,just check the title(=)&HWND(<>) |
|
| Back to top |
|
 |
john tuomi
Joined: 22 May 2006 Posts: 67
|
Posted: Fri May 09, 2008 5:55 pm Post subject: |
|
|
| I don't understand. Do you know where I can find that in the documentation? |
|
| Back to top |
|
 |
sinkfaze
Joined: 19 Mar 2008 Posts: 140
|
Posted: Fri May 09, 2008 7:29 pm Post subject: |
|
|
| Maybe you could try using SetTimer with your loop. |
|
| Back to top |
|
 |
|