jamestr
Joined: 05 Apr 2004 Posts: 96 Location: Connecticut USA
|
Posted: Sun Apr 18, 2004 11:36 pm Post subject: loop while hotkey down, depending on active window |
|
|
| Code: |
while mouse button #4 is down, the LMB will hold down, or the pgdn will hold down, depending on foreground window.
SetTitleMatchMode, 2 ;text anywhere in title
xbutton1::
MouseGetPos, xpos, ypos
Loop
{
GetKeyState, state, xbutton1, p
if state = u
{
mouseclick, left, , , , , u
MouseMove, %xpos%, %ypos% ,1
break
}
else
IfWinActive, Smart Explorer
{
MouseMove, 790, 450,
mouseclick, left, , , , , d
}
else
send {pgdn}
sleep 50
}
;continue
return
|
|
|