If you cannot help me with This very question below..
DO NOT POST.
I'm sick of hearing crap.
Don't spam my thread.
Make it at least a little helpful.
Currently I need a script the does the following.
__________________________________________________________________
1. When ran, it doesn't automatically start, its paused. |
2. Will Alt+Tab into "CombatArms" |
3. Allow me to pause and unpause the script in-game. |
4. When I press a key it unpauses. |
5. When Unpaused it finds the closest "$COLOR = 0xFF0000" and locks onto it. |
6. I will then do the clicking and unpause the script where it shall let loose. |
----------------------------------------------------------------------------------------------
I currently have this script.
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
Global $Paused
Global $COLOR = 0xFF0000
Global $SHADES = 2
While 1
$Coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, $COLOR, $SHADES)
Sleep( 100 )
If Not @error Then
MouseClick("Left", $Coord[0], $Coord[1], 1, 1)
EndIf
WEnd
Func TogglePause()
$Paused = Not $Paused
While $Paused
Sleep(100)
WEnd
EndFunc;==>TogglePause
Func Terminate()
Exit 0
EndFunc;==>Terminate
A few problems!
_____________
1. It starts unpaused.
2. It clicks when it shouldn't click at all.
3. It doesn't lock on, there could be several "$COLOR = 0xFF0000" around the screen, I need it to pick the closest one and stick to it.
4. It does nothing in the application "CombatArms".
5. I have no idea what I'm doing.