Well, forgive my n00bness, HotKeyIt..
..in the end, I still couldn't decipher how your code works, and I'm sure it's a very effective one, but I need a class or two :/
EDIT: There were so many areas that I couldn't understand what or why it was happening.. like why you would need to send a,b,c, without sleep time at the last exit, and what exactly is happening at ^\d\d+\K}.*?
If \d = digit, \d x 2? And what's with the arbitrary K? Too many unknowns :/ Can't even understand the general gist of the script really..
In the end, I went around looking at other scripts, notably Wonderland Player's Alchemy Compounding Code..
I borrowed his legal terms and pause/end codes and they seem to work beautifully and I could actually understand it! I was in tears..
Since I'm only using his stuff for personal use, I don't think there's much problem there.
Here's what I finally did with my code:
Code:
Program = Macro Counteragent + Mixture Production
Version = Version 1.0
Title = %Author% - %Version%
; Copyrights, Disclaimer and Limitation
About =
(
%Author% - Hiro
Copyright ©2010
%Version%
Free for Non-Commercial Use
All Lefts Reversed
Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIfIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
)
;Defaults
EdtMouse = 10
VarPause = 0
#MaxThreadsPerHotkey 2
^+A:: ; Ctrl+Shift+A hotkey
WinWait, Sakexe 2008-01-02a | data folder enable...,
IfWinNotActive, Sakexe 2008-01-02a | data folder enable..., , WinActivate, Sakexe 2008-01-02a | data folder enable...,
WinWaitActive, Sakexe 2008-01-02a | data folder enable...,
SplashTexton, , , %Name% Program Starting..
Sleep 2000
SplashTextoff
SendRaw, @warp geffen_in 140 141
Sleep, 500
Send, {ENTER}
Sleep, 1000
MouseMove, 710, 380
Sleep,100
Send {Click 2, Right}
Sleep, 100
Send +{Click 2, Right}
Sleep,100
Send ^{Click 2, Right}
Sleep, 100
#MaxThreadsPerHotkey 1
if KeepWinZRunning
{
KeepWinZRunning := false
return
}
; Otherwise:
KeepWinZRunning := true
Loop
{
MouseClick, left, 710, 380
Sleep, 150
Send, {ENTER}
Sleep, 300
Send, {DOWN}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
Sleep, 500
MouseClick, left, 710, 380
Sleep, 150
Send, {ENTER}
Sleep, 300
Send, {DOWN}
Sleep, 150
Send, {ENTER}
Sleep, 150
Send, {ENTER}
Sleep, 300
Send, {DOWN}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
Sleep, 100
Send, {ENTER}
If not KeepWinZRunning
break
}
KeepWinZRunning := false
return
^+p::
Pause::
If (VarPause = 0)
{
Splashtexton, , , %Name% pause
VarPause = 1
Pause, On, 1
}
Else
{
Splashtexton, , , %Name% continue
VarPause = 0
Pause, Off, 1
}
Sleep, 2000
Splashtextoff
Return
END::
Splashtexton, , , %Name% closing Program..
Sleep, 2000
Splashtextoff
ExitApp
Please give any feedback if you see the need to, thanks.
Thank you for your contribution, too, yume.