Jump to content

KiwiGuy

Members
  • Posts

    2
  • Joined

  • Last visited

KiwiGuy's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Its for a game window, for a game I'm trying to debug and I'd like to take some of the repetitiveness out of some of the lengthy actions. Simple watch a color and if color changes then call func, however while color is still the same cycle through the ELSE statement. I'm new to programming in general and I'm trying to teach myself. So any help would be greatly appreciated.
  2. I'm having some difficulty debugging this. Global $empty = "404040" ;Color of an empty bar in HEX Global $Paused HotKeySet("^!p", "TogglePause") HotKeySet("^!z", "Start") ToolTip('Ctrl-Alt-P = TogglePause | ESC - Quit | Ctrl-Alt-Z = Start',0,0) Func CheckStam() While $conts = 1 $checkstam = PixelGetColor( 891 , 12 ) ;Gets color of bar If Hex($checkstam, 6) = $empty Then ; Converts $checkstam into Hex 6 chars long and compares to $empty. Call("TogglePause") ; If both variables match the Func is called. Else Sleep(5000) ; Pauses and sends key and mouse commands until Variables above match. Send("Q") Sleep (500) Send ("8") Sleep(1000) MouseClick ( "left" ) EndIf WEnd EndFunc Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip('Shift-Alt-S - TogglePause | Shift-Alt-D - Start',0,0) EndFunc ;==>TogglePause The func runs when called, however when it hits the Else segment its only doing the mouse click and wont send the keys. Without a means to step through running code to see where it breaks I'm at a loss. Any help would be greatly appreciated.
×
×
  • Create New...