| View previous topic :: View next topic |
| Author |
Message |
tuna
Joined: 03 Oct 2007 Posts: 155 Location: UK
|
Posted: Fri Jan 29, 2010 6:10 pm Post subject: Windows activate message |
|
|
| Hi, is there any message that the system sends when a new window is activated? I need to detect when the user changes from window to window and I'm hoping to do this via onmessage hopefully. I've looked at the message list in the documentation but most seems to only apply to the scripts own windows. Thanks |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Jan 29, 2010 6:50 pm Post subject: |
|
|
WinWaitActive / WinWaitNotActive
or WinGet to keep track of the active window |
|
| Back to top |
|
 |
tuna
Joined: 03 Oct 2007 Posts: 155 Location: UK
|
Posted: Fri Jan 29, 2010 6:53 pm Post subject: |
|
|
| Thanks, but I need to detect when any window is being activated, not just keep tracking a particular one. |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Jan 29, 2010 7:00 pm Post subject: |
|
|
WinGet example:
| Code: |
#Persistent
settimer, check, 200
return
check:
WinGet, active_id, ID, A
if (active_id != old_id)
{
tooltip, Different
sleep 1000
}
tooltip,
old_id = %active_id%
return |
|
|
| Back to top |
|
 |
tuna
Joined: 03 Oct 2007 Posts: 155 Location: UK
|
Posted: Sat Jan 30, 2010 12:35 am Post subject: |
|
|
| Sorry, I forgot to mention that I was hoping to avoid timers. Thanks. |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 8688
|
|
| Back to top |
|
 |
|