| View previous topic :: View next topic |
| Author |
Message |
feejo
Joined: 16 Jun 2007 Posts: 245
|
Posted: Thu Jan 24, 2008 7:40 pm Post subject: When working on another window my script stop |
|
|
My script work when I am working on the specific windows, as soon as I click on another window it stop to work.
| Code: |
settitlematchmode, 2 ;
WinWait, Le 2,
IfWinNotActive, Le 2, , WinActivate, Level 2,
WinWaitActive, Lel 2,
Winset, AlwaysOnTop, On, Le 2:
1:
PixelGetColor, 3NB, 232, 195
If (3nb = 0x0080FF)
num:=1
Goto, fin
}
Else
Fin:
soundbeep
goto, 1 |
|
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5390 Location: /b/
|
Posted: Thu Jan 24, 2008 8:57 pm Post subject: |
|
|
Move the lines starting with WinWait to WinSet below the 1: label. _________________
 |
|
| Back to top |
|
 |
feejo
Joined: 16 Jun 2007 Posts: 245
|
Posted: Thu Jan 24, 2008 9:05 pm Post subject: |
|
|
| Yes, it work, but I can't work on any other windows, cause it is switching back to the other one by itselve. |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5390 Location: /b/
|
Posted: Thu Jan 24, 2008 9:09 pm Post subject: |
|
|
You can't work with other windows in your script because PixelSearch requires that the target window be active and visible. Commands like Control and SendMessage don't have this limitation. _________________
 |
|
| Back to top |
|
 |
feejo
Joined: 16 Jun 2007 Posts: 245
|
Posted: Thu Jan 24, 2008 9:25 pm Post subject: |
|
|
| I have 2x 17in screen the windows will be on one of them with nothing in front of it. Maby I will end up doing a sceen coord. |
|
| Back to top |
|
 |
|