Kiber
Joined: 17 Dec 2006 Posts: 16
|
Posted: Sat Mar 15, 2008 5:12 am Post subject: |
|
|
Example code:
| Code: | Process, Priority, , Realtime
#SingleInstance
#InstallKeybdHook
#UseHook ON
#MaxThreadsPerHotkey 1
#MaxThreadsBuffer On
#Persistent
WinGet, L, list, Untitled - Notepad
If L<2
{
ExitApp
}
WinGet, PID2, PID, ahk_id %L2%
ControlSend, ,{W down}, ahk_pid %PID2%
SetTimer, timer, 500
Return
timer:
{
GetKeyState, state, W
Tooltip, %state%
} |
Run 2 notepad's.
Run script. Activate first notepad, a second. You will see that state (shown by tooltip) is always "U". _________________ sorry for my bad english ^^  |
|