I'm new to AHK, and have the script below assigned to Win-Q.
What I'd really like to do is have it repeat every time I press Win+Q.
[Right now it runs once, but not again. I have to close the "H"
green box, and run the compiled script again.]
In the alternative, I'd like to set the Loop function so it runs 10
times, but then I'd need to know - what key do I use to break the loop.
I'm changing the Class in a few hundred QBooks transactions.
TH
#q::
Loop, 10
{
WinWait, Spindrift Inn and Bistro Manzanita - QuickBooks: Premier
Retail Edition 2007,
IfWinNotActive, Spindrift Inn and Bistro Manzanita - QuickBooks:
Premier Retail Edition 2007, , WinActivate, Spindrift Inn and Bistro
Manzanita - QuickBooks: Premier Retail Edition 2007,
WinWaitActive, Spindrift Inn and Bistro Manzanita - QuickBooks:
Premier Retail Edition 2007,
MouseClick, left, 510, 446
MouseClick, left, 510, 446
Sleep, 100
MouseClick, left, 684, 603
Sleep, 100
WinWait, Review Paycheck,
IfWinNotActive, Review Paycheck, , WinActivate, Review Paycheck,
WinWaitActive, Review Paycheck,
MouseClick, left, 814, 78
Sleep, 100
Send, b
MouseClick, left, 82, 568
Sleep, 100
WinWait, Past Transactions,
IfWinNotActive, Past Transactions, , WinActivate, Past Transactions,
WinWaitActive, Past Transactions,
MouseClick, left, 217, 232
Sleep, 100
WinWait, Spindrift Inn and Bistro Manzanita - QuickBooks: Premier
Retail Edition 2007,
IfWinNotActive, Spindrift Inn and Bistro Manzanita - QuickBooks:
Premier Retail Edition 2007, , WinActivate, Spindrift Inn and Bistro
Manzanita - QuickBooks: Premier Retail Edition 2007,
WinWaitActive, Spindrift Inn and Bistro Manzanita - QuickBooks:
Premier Retail Edition 2007,
Send, {ALTDOWN}a{ALTUP}
WinWait, Recording Transaction,
IfWinNotActive, Recording Transaction, , WinActivate, Recording
Transaction,
WinWaitActive, Recording Transaction,
Send, {SPACE}
WinWait, Past Transactions,
IfWinNotActive, Past Transactions, , WinActivate, Past Transactions,
WinWaitActive, Past Transactions,
Send, {SPACE}
WinWait, ,
IfWinNotActive, , , WinActivate, ,
WinWaitActive, ,
MouseClick, left, 298, 792
Sleep, 100
MouseClick, left, 294, 789
Sleep, 100
MouseClick, right, 294, 789
Sleep, 100
MouseClick, left, 305, 789
Sleep, 100
MouseClick, left, 305, 789
MouseClick, left, 305, 789
Sleep, 100
WinWait, Spindrift Inn and Bistro Manzanita - QuickBooks: Premier
Retail Edition 2007,
IfWinNotActive, Spindrift Inn and Bistro Manzanita - QuickBooks:
Premier Retail Edition 2007, , WinActivate, Spindrift Inn and Bistro
Manzanita - QuickBooks: Premier Retail Edition 2007,
WinWaitActive, Spindrift Inn and Bistro Manzanita - QuickBooks:
Premier Retail Edition 2007,
MouseClick, left, 494, 442
Sleep, 100
MouseClick, right, 494, 442
Sleep, 100
MouseClick, left, 522, 447
Sleep, 100
WinWait, ,
IfWinNotActive, , , WinActivate, ,
WinWaitActive, ,
MouseClick, left, 592, 1023
Sleep, 100
MouseClick, left, 593, 1022
Sleep, 100
MouseClick, left, 593, 1022
Sleep, 1000
}
; Return