Sign in to follow this  
Followers 0
StuparuIG

combo and check box and Error...

3 posts in this topic

Hello i have this code bat why give automatically exit and does not begin to run ?

$Mm1 = IniRead("Config.ini", "mm1", "1", "") ;load INI
If $Mm1 = 1 Then GUICtrlSetState($mm1, $GUI_CHECKED)
$RIGHT = IniRead("Config.ini", "Position", "Right", "")
If $RIGHT = 1 Then GUICtrlSetState($RIGHT, $GUI_CHECKED)

Global $Paused
HotKeySet("{f2}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("{f1}", " start")


While 1
sleep(100)
WEnd


Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc

Func Terminate()
Exit 0
EndFunc
 
Func start() ;

Sleep(Random(1000, 1500))

  If GUICtrlRead($mm1) = $GUI_CHECKED Then

  Mm1()





EndIf


EndFunc

Func Mm1()
While 1


$Coord = PixelSearch (461, 36, 800, 600, 0x75C0E2, 0, 4)
Sleep(Random(1000, 1500))
If Not @error Then
MouseClick ( "Left" , $Coord[0] + Random(1, 5), $Coord[1] - Random(1, 5), 1 , random(3, 7))
Sleep(Random(1000, 1500))




if GUICtrlRead($Mm1) = $GUI_CHECKED Then


If GUICtrlRead($Right) = $GUI_CHECKED Then
MouseMove(165 + Random(1,3),271 + Random(1,3), random(5, 9))
Sleep(Random(500, 1000))
MouseClick ( "Left" , $Coord[0] + Random(1, 5), $Coord[1] - Random(1, 5), 1 , random(3, 7))
Sleep(Random(500, 1000))
MouseMove(713 + Random(1,3),246 + Random(1,3), random(5, 9))
MouseClick ( "Right" , $Coord[0] + Random(1, 5), $Coord[1] - Random(1, 5), 1 , random(3, 7))
EndIf
EndIf
EndIf


WEnd

EndFunc

Share this post


Link to post
Share on other sites



Look at your hotkeyset statement, for one thing. You have a space between " and the name of the function.

HotKeySet("{f1}", " start")

should be :

HotKeySet("{f1}", "start")

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0