Mat Posted April 27, 2009 Share Posted April 27, 2009 (edited) A little harder to cheat on I think?yep. 5.8 secs using brute force and ControlClick ("How fast are u ?", "", 40) For $i = 1 to 10 For $x = 3 to 38 ControlClick ("How fast are u ?", "", $x) Next Next I was contemplating doing it by reading the label, but cba. I really am in a cheating mood, i actually get more fun out of seeing how to screw up games than actually playing them!! MDiesel PS restart doesnt' reset the label. sorry valuater, i'll get onto hacking yours as soon as I finish this whole label reader thing for the last one. See below Edited April 27, 2009 by mdiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
Valuater Posted April 27, 2009 Share Posted April 27, 2009 (edited) Crap... I didn't know everybody and his dog re-made this thing... ... Well here's my version without changing the original actions expandcollapse popup#include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> Global $dif, $Button[35], $CC = 2, $NB = StringSplit("28,3,30,15,7,29,13,5,14,34,8,32,16,18,21,1,33,20,11,19,4,22,2,25,10,6,23,31,9,17,12,27,24,26,st op", ",") HotKeySet("{F4}", "HighScores") $Main = GUICreate("How fast are u ?", 370, 540) ; Given this GUI a name GUISetState(@SW_SHOW) $Start_Button = GUICtrlCreateButton("Start", 10, 10, 50, 50) GUICtrlSetState($Start_Button, $GUI_ENABLE) $Stop_Button = GUICtrlCreateButton("Stop", 310, 310, 50, 50) GUICtrlSetState($Stop_Button, $GUI_DISABLE) Local $x = 70, $y = 10, $n = 5 For $i = 1 To 34 $Button[$i] = GUICtrlCreateButton("Click", $x, $y, 50, 50) GUICtrlSetState(-1, $GUI_DISABLE) $x += 60 If $i = $n Then $x = 10 $y += 60 $n += 6 EndIf Next $Quick_HighScore = GUICtrlCreateEdit("Quick Highscore view" & @CRLF & @CRLF, 10, 370, 350, 120) $Restart_Button = GUICtrlCreateButton("Restart", 40, 500, 80, 30) $HighScores = GUICtrlCreateButton("High Scores", 140, 500, 80, 30) $About = GUICtrlCreateButton("About", 240, 500, 80, 30) While 1 $msg = GUIGetMsg() Select Case $msg = $Button[($NB[$CC])] GUICtrlSetState($Button[($NB[$CC])], $GUI_DISABLE) $CC += 1 If $CC = ($NB[0] - 1) Then GUICtrlSetState($Stop_Button, $GUI_ENABLE) Else GUICtrlSetState($Button[($NB[$CC])], $GUI_ENABLE) EndIf Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Start_Button $begin = TimerInit() GUICtrlSetState($Button[($NB[$CC])], $GUI_ENABLE) GUICtrlSetState($Start_Button, $GUI_DISABLE) Beep(500, 100) Case $msg = $Stop_Button GUICtrlSetState($Stop_Button, $GUI_DISABLE) Beep(500, 100) $dif = Round(TimerDiff($begin) / 1000, 1) MsgBox(0, "Your Time: ", "Your time is: " & $dif & " seconds. ") GUICtrlSetData($Quick_HighScore, $dif & " Seconds" & @CRLF, "|") ;Asks the user if they want to save their score If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(36, "Save", "Would you like to save your score?") Select Case $iMsgBoxAnswer = 6 ;Yes Save() ; Goes to the save function Case $iMsgBoxAnswer = 7 ;No ;nothing EndSelect Case $msg = $Restart_Button _Reset() Case $msg = $HighScores HighScores() Case $msg = $About About() EndSelect WEnd Func _Reset() Sleep(100) MsgBox(0, "Restart", "Restarting" & @CRLF & "Please wait...", 2) For $x = 1 To 34 GUICtrlSetState($Button[$x], $GUI_DISABLE) Next $CC = 2 GUICtrlSetState($Stop_Button, $GUI_DISABLE) GUICtrlSetState($Start_Button, $GUI_ENABLE) Sleep(100) EndFunc ;==>_Reset Func Save() FileWrite(@ScriptDir & "\Scores.txt", $dif & " Seconds" & @CRLF) MsgBox(64, "Saved", "Your high score has been saved!") ; Tells you it is saved HighScores() ; Opens the high scores window EndFunc ;==>Save Func HighScores() $Scores = FileRead(@ScriptDir & "\Scores.txt") ; Reads the scores from the txt file If @error Then MsgBox(0, "", "Error occurred, you probably haven't saved any scores yet.") Else GUISetState(@SW_HIDE, $Main) $HSW = GUICreate("High Scores", 241, 237) $HS = GUICtrlCreateEdit("Scores:" & @CRLF & $Scores, 10, 10, 221, 217, BitOR($ES_READONLY, $ES_WANTRETURN)) GUISetState(@SW_SHOW) While 3 $msg3 = GUIGetMsg() Select Case $msg3 = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete($HSW) GUISetState(@SW_SHOW, $Main) EndIf EndFunc ;==>HighScores Func About() GUISetState(@SW_HIDE, $Main) $AboutWindow = GUICreate("About", 250, 200) $ProgramName = GUICtrlCreateLabel("How fast are u?", 85, 26) $ProgramDescription = GUICtrlCreateEdit("Credits:" & @CRLF & @CRLF & "Scripter: AlmarM" & @CRLF & "Game by: AlmarM" & @CRLF & "Some things edited by: alien13", 20, 60, 210, 126, BitOR($ES_READONLY, $ES_WANTRETURN)) GUISetState(@SW_SHOW) While 2 $msg2 = GUIGetMsg() Select Case $msg2 = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete($AboutWindow) GUISetState(@SW_SHOW, $Main) EndFunc ;==>About 8) EDIT:... Manadar's is pretty cool Too! 8) Edited April 27, 2009 by Valuater Link to comment Share on other sites More sharing options...
youknowwho4eva Posted April 27, 2009 Share Posted April 27, 2009 yep. 5.8 secs using brute force and ControlClick ("How fast are u ?", "", 40) For $i = 1 to 10 For $x = 3 to 38 ControlClick ("How fast are u ?", "", $x) Next Next I was contemplating doing it by reading the label, but cba. I really am in a cheating mood, i actually get more fun out of seeing how to screw up games than actually playing them!! MDiesel PS restart doesnt' reset the label. sorry valuater, i'll get onto hacking yours as soon as I finish this whole label reader thing for the last one. Well I was going to make it so wrong answers reset it or penalized you, but didn't get that far. Giggity Link to comment Share on other sites More sharing options...
Mat Posted April 27, 2009 Share Posted April 27, 2009 (edited) wouldn't have mattered anyway, got it down to 0.7 seconds without brute force!!ControlClick ("How fast are u ?", "", 40) Sleep (50) For $i = 1 to 10 Step + 1 $Test = StringSplit (StringStripWS (ControlGetText ("How fast are u ?", "", 44), 8), "") $Button = 6 * ($Test[$Test[0]] - 1) + $Test[8] ControlClick ("How fast are u ?", "", $Button + 2) Sleep (30) Nextlol. I could probably shave another o.1 sec off it by adjusting the sleeps, you need them, and they need to be greater than 20, but You could probably get away with 24 or something. I haven't tested that far.Right then, moving swiftly on to valuaters... here I come!!@ValuaterI can't seem to break 0.2...ControlClick ("How fast are u ?", "", 3) ControlClick ("How fast are u ?", "", 4)as before, it times between beginning and end, and i can press disabled buttons!! fix that and i might take a bit longer to hack it! as you used your whole cc thing. very clever.MDieselEdit:Manadars shouldn't be too hard, as you just repeatedly click the buttons... I'm guessing by the fact YKW4E is still reading the thread, he is trying to make an un-hackable game... good luck!! i'll be waiting! Edited April 27, 2009 by mdiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
youknowwho4eva Posted April 27, 2009 Share Posted April 27, 2009 (edited) wouldn't have mattered anyway, got it down to 0.7 seconds without brute force!! ControlClick ("How fast are u ?", "", 40) Sleep (50) For $i = 1 to 10 Step + 1 $Test = StringSplit (StringStripWS (ControlGetText ("How fast are u ?", "", 44), 8), "") $Button = 6 * ($Test[$Test[0]] - 1) + $Test[8] ControlClick ("How fast are u ?", "", $Button + 2) Sleep (30) Next lol. I could probably shave another o.1 sec off it by adjusting the sleeps, you need them, and they need to be greater than 20, but You could probably get away with 24 or something. I haven't tested that far. Right then, moving swiftly on to valuaters... here I come!! @Valuater I can't seem to break 0.2... ControlClick ("How fast are u ?", "", 3) ControlClick ("How fast are u ?", "", 4) as before, it times between beginning and end, and i can press disabled buttons!! fix that and i might take a bit longer to hack it! as you used your whole cc thing. very clever. MDiesel Edit: Manadars shouldn't be too hard, as you just repeatedly click the buttons... I'm guessing by the fact YKW4E is still reading the thread, he is trying to make an un-hackable game... good luck!! i'll be waiting! Hmmmm un-hackable? no. Just trickier. CODE#include <GuiConstants.au3> #include <Constants.au3> Opt("mousecoordmode",2) Dim $button[100][100] Global $dif, $start_button, $r1, $r2, $b $r = 0 $b = 0 $r1 = 1 $r2 = 1 HotKeySet("{F4}", "HighScores") $Main = GUICreate("How fast are u ?", 470, 640) ; Given this GUI a name GUISetState(@SW_SHOW) For $w = 1 to 6 For $i = 1 to 6 $r += 1 $button[$i][$w] = GUICtrlCreateButton("Button" & $r, ($i * 10) + ($i * 50), ($w * 10) + ($w * 50), 50, 50) GUICtrlSetState(-1,$GUI_DISABLE) Next Next $Quick_HighScore = GUICtrlCreateEdit("Quick Highscore view" & @CRLF & @CRLF, 60, 430, 350, 120) $start_button = GUICtrlCreateButton("Start",50,560,80,30) $Restart_Button = GUICtrlCreateButton("Restart", 150, 560, 80, 30) $HighScores = GUICtrlCreateButton("High Scores", 250, 560, 80, 30) $About = GUICtrlCreateButton("About", 350, 560, 80, 30) $label = GUICtrlCreateLabel("Label",200,600,200,20) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit ;~ Case $msg = $Start_Button For $w = 1 To 6 For $i = 1 To 6 GUICtrlSetState($button[$i][$w],$GUI_ENABLE) ;~ MsgBox(0,"","") Next Next $r1 = Random(1,6,1) $r2 = Random(1,6,1) $begin = TimerInit() GUICtrlSetData($label, "Column: " & $r1 & " Row: " & $r2) running() ;~ Case $msg = $button[$r1][$r2] ;~ $b += 1 ;~ $r1 = Random(1,6,1) ;~ $r2 = Random(1,6,1) ;~ GUICtrlSetData($label, "Column: " & $r1 & " Row: " & $r2) ;~ Case $msg[1] = $main ;~ MsgBox(0,"",$msg[1]) Case $b = 10 Beep(500, 100) $dif = Round(TimerDiff($begin) / 1000, 1) MsgBox(0, "Your Time: ", "Your time is: " & $dif & " seconds. ") GUICtrlSetData($Quick_HighScore, $dif & " Seconds" & @CRLF, "|") ;Asks the user if they want to save their score If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(36, "Save", "Would you like to save your score?") Select Case $iMsgBoxAnswer = 6 ;Yes Save() ; Goes to the save function Case $iMsgBoxAnswer = 7 ;No ;nothing EndSelect _reset() Case $msg = $Restart_Button _Reset() Case $msg = $HighScores HighScores() Case $msg = $About About() EndSelect Sleep (20) WEnd Func _Reset() Sleep(100) ;~ MsgBox(0, "Restart", "Restarting" & @CRLF & "Please wait...", 2) $r1 = Random(1,6,1) $r2 = Random(1,6,1) $b = 0 For $w = 1 To 6 For $i = 1 To 6 GUICtrlSetState($button[$i][$w],$GUI_DISABLE) ;~ MsgBox(0,"","") Next Next Sleep(100) EndFunc ;==>_Reset Func Save() FileWrite(@ScriptDir & "\Scores.txt", $dif & " Seconds" & @CRLF) MsgBox(64, "Saved", "Your high score has been saved!") ; Tells you it is saved HighScores() ; Opens the high scores window EndFunc ;==>Save Func HighScores() $Scores = FileRead(@ScriptDir & "\Scores.txt") ; Reads the scores from the txt file If @error Then MsgBox(0, "", "Error occurred, you probably haven't saved any scores yet.") Else GUISetState(@SW_HIDE, $Main) $HSW = GUICreate("High Scores", 241, 237) $HS = GUICtrlCreateEdit("Scores:"& @CRLF & $Scores, 10, 10, 221, 217, BitOR($ES_READONLY, $ES_WANTRETURN)) GUISetState(@SW_SHOW) While 3 $msg3 = GUIGetMsg() Select Case $msg3 = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete($HSW) GUISetState(@SW_SHOW, $Main) EndIf EndFunc ;==>HighScores Func running() While $b <> 10 $msg = GUIGetMsg() For $w = 1 to 6 For $i = 1 to 6 Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $button[$i][$w] If $i = $r1 and $w = $r2 Then $cheat = MouseGetPos() If $cheat[0] < ($i * 10) + ($i * 50) or $cheat[0] > ($i * 10) + ($i * 50) + 50 Or $cheat[1] < ($w * 10) + ($w * 50) or $cheat[1] > ($w * 10) + ($w * 50) + 50 Then MsgBox(0,"","Cheater Cheater Pumpkin Eater") $b = 0 $begin += 5000000 EndIf $b += 1 $r1 = Random(1,6,1) $r2 = Random(1,6,1) $r11 = Random(0,1,1) If $r11 = 0 Then If $r1 = 1 Then $r11 = "One" ElseIf $r1 = 2 Then $r11 = "Two" ElseIf $r1 = 3 Then $r11 = "Three" ElseIf $r1 = 4 Then $r11 = "Four" ElseIf $r1 = 5 Then $r11 = "Five" ElseIf $r1 = 6 Then $r11 = "Six" EndIf Else $r11 = $r1 EndIf $r22 = Random(0,1,1) If $r22 = 0 Then If $r2 = 1 Then $r22 = "One" ElseIf $r2 = 2 Then $r22 = "Two" ElseIf $r2 = 3 Then $r22 = "Three" ElseIf $r2 = 4 Then $r22 = "Four" ElseIf $r2 = 5 Then $r22 = "Five" ElseIf $r2 = 6 Then $r22 = "Six" EndIf Else $r22 = $r2 EndIf GUICtrlSetData($label, "Column: " & $r11 & " Row: " & $r22) Else $begin += 30 MsgBox(0,"Nope","30 second penelty plus how ever long it takes you to read this") EndIf EndSelect Next Next WEnd EndFunc Func About() GUISetState(@SW_HIDE, $Main) $AboutWindow = GUICreate("About", 250, 200) $ProgramName = GUICtrlCreateLabel("How fast are u?", 85, 26) $ProgramDescription = GUICtrlCreateEdit("Credits:" & @CRLF & @CRLF & "Scripter: AlmarM" & @CRLF & "Game by: AlmarM" & @CRLF & "Some things edited by: alien13", 20, 60, 210, 126, BitOR($ES_READONLY, $ES_WANTRETURN)) GUISetState(@SW_SHOW) While 2 $msg2 = GUIGetMsg() Select Case $msg2 = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete($AboutWindow) GUISetState(@SW_SHOW, $Main) EndFunc Edit: had something in there for error checking, corrected now. Edited April 27, 2009 by youknowwho4eva Giggity Link to comment Share on other sites More sharing options...
Mat Posted April 27, 2009 Share Posted April 27, 2009 (edited) damn you *shakes fist mockingly* thought I had you with this one, but then it comes up saying cheater cheater pumpkin eater!! ah well, I will just have to use mouseclick instead 0.7 with by far my dirtiest to date. once again could shave a few milliseconds off my time. but mouseclick is a bit of a bummer. expandcollapse popupWinActivate ("How fast are u ?", "") Sleep (1000) BlockInput (1) ControlClick ("How fast are u ?", "", 40) Sleep (50) For $i = 1 to 10 Step + 1 $Test = StringSplit (StringReplace (StringReplace (ControlGetText ("How fast are u ?", "", 44), "Column:", ""), "Row:", ""), " ") If Not StringIsDigit ($Test[2]) Then $Col = GetNumber ($Test[2]) Else $Col = $Test[2] EndIf If Not StringIsDigit ($Test[$Test[0]]) Then $row = GetNumber ($Test[$Test[0]]) Else $row = $Test[$Test[0]] EndIf $Button = 6 * ($row - 1) + $col + 2 $Pos = ControlGetPos ("How fast are u ?", "", $Button) $Pos2 = WinGetPos ("How fast are u ?", "") MouseClick ("Left", $Pos2[0] + $Pos[0] + 25, $Pos2[1] + $Pos[1] + 25, 1 ,0) Sleep (30) Next BlockInput (0) Func GetNumber ($Word) Switch $Word Case "One" Return 1 Case "Two" Return 2 Case "Three" Return 3 Case "Four" Return 4 Case "Five" Return 5 Case "Six" Return 6 Case Else Return $Word EndSwitch EndFunc; ==> GetNumber Edited April 27, 2009 by mdiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
youknowwho4eva Posted April 28, 2009 Share Posted April 28, 2009 (edited) thought you would like that. At least your code goes from being 4 lines to how many ever you have there. Made it a tad harder for cheaters and players alike. I even mess up fairly often on it. Oh yea, and the penalty works now. before you could cheat and it'd call you a cheater but wouldn't punish you. CODE#include <GuiConstants.au3> #include <Constants.au3> Opt("mousecoordmode",2) Dim $button[100][100] Global $dif, $start_button, $r1, $r2, $b $r = 0 $b = 0 $r1 = 1 $r2 = 1 $penelty = 0 HotKeySet("{F4}", "HighScores") $Main = GUICreate("How fast are u ?", 470, 640) ; Given this GUI a name GUISetState(@SW_SHOW) For $w = 1 to 6 For $i = 1 to 6 $r += 1 $button[$i][$w] = GUICtrlCreateButton("Button" & $r, ($i * 10) + ($i * 50), ($w * 10) + ($w * 50), 50, 50) GUICtrlSetState(-1,$GUI_DISABLE) Next Next $Quick_HighScore = GUICtrlCreateEdit("Quick Highscore view" & @CRLF & @CRLF, 60, 430, 350, 120) $start_button = GUICtrlCreateButton("Start",50,560,80,30) $Restart_Button = GUICtrlCreateButton("Restart", 150, 560, 80, 30) $HighScores = GUICtrlCreateButton("High Scores", 250, 560, 80, 30) $About = GUICtrlCreateButton("About", 350, 560, 80, 30) $label = GUICtrlCreateLabel("Read me",100,20,50,20) $label1 = GUICtrlCreateLabel("",150,20,50,20) $label2 = GUICtrlCreateLabel("",200,20,50,20) $label3 = GUICtrlCreateLabel("",250,20,50,20) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit ;~ Case $msg = $Start_Button For $w = 1 To 6 For $i = 1 To 6 GUICtrlSetState($button[$i][$w],$GUI_ENABLE) ;~ MsgBox(0,"","") Next Next $r1 = Random(1,6,1) $r2 = Random(1,6,1) $begin = TimerInit() GUICtrlSetData($label, "Column:") GUICtrlSetData($label1, $r1) GUICtrlSetData($label2, "Row:") GUICtrlSetData($label3, $r2) running() ;~ Case $msg = $button[$r1][$r2] ;~ $b += 1 ;~ $r1 = Random(1,6,1) ;~ $r2 = Random(1,6,1) ;~ GUICtrlSetData($label, "Column: " & $r1 & " Row: " & $r2) ;~ Case $msg[1] = $main ;~ MsgBox(0,"",$msg[1]) Case $b = 10 Beep(500, 100) $dif = Round(TimerDiff($begin) / 1000, 1) $dif += $penelty MsgBox(0, "Your Time: ", "Your time is: " & $dif & " seconds. ") GUICtrlSetData($Quick_HighScore, $dif & " Seconds" & @CRLF, "|") ;Asks the user if they want to save their score If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(36, "Save", "Would you like to save your score?") Select Case $iMsgBoxAnswer = 6 ;Yes Save() ; Goes to the save function Case $iMsgBoxAnswer = 7 ;No ;nothing EndSelect _reset() Case $msg = $Restart_Button _Reset() Case $msg = $HighScores HighScores() Case $msg = $About About() EndSelect Sleep (20) WEnd Func _Reset() Sleep(100) ;~ MsgBox(0, "Restart", "Restarting" & @CRLF & "Please wait...", 2) $r1 = Random(1,6,1) $r2 = Random(1,6,1) $b = 0 $penelty = 0 GUICtrlSetData($label, "Try Again") GUICtrlSetData($label1, "") GUICtrlSetData($label2, "") GUICtrlSetData($label3, "") For $w = 1 To 6 For $i = 1 To 6 GUICtrlSetState($button[$i][$w],$GUI_DISABLE) ;~ MsgBox(0,"","") Next Next Sleep(100) EndFunc ;==>_Reset Func Save() FileWrite(@ScriptDir & "\Scores.txt", $dif & " Seconds" & @CRLF) MsgBox(64, "Saved", "Your high score has been saved!") ; Tells you it is saved HighScores() ; Opens the high scores window EndFunc ;==>Save Func HighScores() $Scores = FileRead(@ScriptDir & "\Scores.txt") ; Reads the scores from the txt file If @error Then MsgBox(0, "", "Error occurred, you probably haven't saved any scores yet.") Else GUISetState(@SW_HIDE, $Main) $HSW = GUICreate("High Scores", 241, 237) $HS = GUICtrlCreateEdit("Scores:"& @CRLF & $Scores, 10, 10, 221, 217, BitOR($ES_READONLY, $ES_WANTRETURN)) GUISetState(@SW_SHOW) While 3 $msg3 = GUIGetMsg() Select Case $msg3 = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete($HSW) GUISetState(@SW_SHOW, $Main) EndIf EndFunc ;==>HighScores Func running() While $b <> 10 $msg = GUIGetMsg() For $w = 1 to 6 For $i = 1 to 6 Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $button[$i][$w] If $i = $r1 and $w = $r2 Then $cheat = MouseGetPos() If $cheat[0] < ($i * 10) + ($i * 50) or $cheat[0] > ($i * 10) + ($i * 50) + 50 Or $cheat[1] < ($w * 10) + ($w * 50) or $cheat[1] > ($w * 10) + ($w * 50) + 50 Then MsgBox(0,"","Cheater Cheater Pumpkin Eater") $b = 0 $penelty += 50000000000 EndIf $b += 1 $r1 = Random(1,6,1) $r2 = Random(1,6,1) $r11 = Random(0,1,1) If $r11 = 0 Then If $r1 = 1 Then $r11 = "One" ElseIf $r1 = 2 Then $r11 = "Two" ElseIf $r1 = 3 Then $r11 = "Three" ElseIf $r1 = 4 Then $r11 = "Four" ElseIf $r1 = 5 Then $r11 = "Five" ElseIf $r1 = 6 Then $r11 = "Six" EndIf Else $r11 = $r1 EndIf $r22 = Random(0,1,1) If $r22 = 0 Then If $r2 = 1 Then $r22 = "One" ElseIf $r2 = 2 Then $r22 = "Two" ElseIf $r2 = 3 Then $r22 = "Three" ElseIf $r2 = 4 Then $r22 = "Four" ElseIf $r2 = 5 Then $r22 = "Five" ElseIf $r2 = 6 Then $r22 = "Six" EndIf Else $r22 = $r2 EndIf $col = Random(0,1,1) If $col = 0 Then GUICtrlSetData($label, "Column:") GUICtrlSetData($label1, $r11) GUICtrlSetData($label2, "Row:") GUICtrlSetData($label3, $r22) Else GUICtrlSetData($label2, "Column:") GUICtrlSetData($label3, $r11) GUICtrlSetData($label, "Row:") GUICtrlSetData($label1, $r22) EndIf Else $penelty += 30 MsgBox(0,"Nope","30 second penelty plus how ever long it takes you to read this") ;~ Sleep(30000) EndIf EndSelect Next Next WEnd EndFunc Func About() GUISetState(@SW_HIDE, $Main) $AboutWindow = GUICreate("About", 250, 200) $ProgramName = GUICtrlCreateLabel("How fast are u?", 85, 26) $ProgramDescription = GUICtrlCreateEdit("Credits:" & @CRLF & @CRLF & "Scripter: AlmarM" & @CRLF & "Game by: AlmarM" & @CRLF & "Some things edited by: alien13", 20, 60, 210, 126, BitOR($ES_READONLY, $ES_WANTRETURN)) GUISetState(@SW_SHOW) While 2 $msg2 = GUIGetMsg() Select Case $msg2 = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete($AboutWindow) GUISetState(@SW_SHOW, $Main) EndFunc Edited April 28, 2009 by youknowwho4eva Giggity Link to comment Share on other sites More sharing options...
Mat Posted April 28, 2009 Share Posted April 28, 2009 (edited) I thought you'd only changed digits to number names - I completely missed out the mouse bit... 30 seconds is a bit on the harsh side... If you genuinely make a mistake, thats your score ruined. I would have set it to 5 secs. moving on to your latest script... thanks for making my life considerably easier by using seperate static controls, if you want to slow me down further, put a random amount of whitespace before the first word. Even better, use pictures!! that will slow me considerably having to use even simple ocr. other than that, it was easy enough... the whole maths stays the same... possibly change the id of the buttons to be random to make it almost impossible with my current method. (I will probably just have to work out the position based on the row and column, instead of controlgetpos.) damn you, down to 0.758978864632237 Seconds and up to 70 lines!! its all the if tests within if tests. CODEWinActivate ("How fast are u ?", "") Sleep (1000) ControlClick ("How fast are u ?", "", 40) Sleep (40) For $i = 1 to 10 Step + 1 If StringLeft (ControlGetText ("How fast are u ?", "", 44), 1) = "C" Then $First = 1 Else $First = 2 EndIf $1 = ControlGetText ("How fast are u ?", "", 45) $2 = ControlGetText ("How fast are u ?", "", 47) If Not StringIsDigit ($1) Then If $First = 1 Then $Col = GetNumber ($1) Else $row = GetNumber ($1) EndIf Else If $First = 1 Then $Col = $1 Else $row = $1 EndIf EndIf If Not StringIsDigit ($2) Then If $First = 2 Then $Col = GetNumber ($2) Else $row = GetNumber ($2) EndIf Else If $First = 2 Then $Col = $2 Else $row = $2 EndIf EndIf $Button = 6 * ($row - 1) + $Col + 2 $Pos = ControlGetPos ("How fast are u ?", "", $Button) $Pos2 = WinGetPos ("How fast are u ?", "") MouseClick ("Left", $Pos2[0] + $Pos[0] + 25, $Pos2[1] + $Pos[1] + 25, 1 ,0) Sleep (30) Next BlockInput (0) Func GetNumber ($Word) Switch $Word Case "One" Return 1 Case "Two" Return 2 Case "Three" Return 3 Case "Four" Return 4 Case "Five" Return 5 Case "Six" Return 6 Case Else Return $Word EndSwitch EndFunc ; ==> GetNumber MDiesel edit: had a ridiculous sleep 500 in there... Edited April 28, 2009 by mdiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
youknowwho4eva Posted April 28, 2009 Share Posted April 28, 2009 I thought you'd only changed digits to number names - I completely missed out the mouse bit... I thought that was clever . Next I'll work on stopping pesky mousemove (I have an idea, but the implementation is a little more than I'm feeling like doing right now) I'd work on it more, but we've already hijacked the OP thread enough Sorry got carried away . Unless he says to go ahead with it. I was thinking about images, but then I was like nah. And the whole reason for the separate controls was just to make it so you had to add more script to beat it I was thinking of making it a GDI+ label, I'm not sure if they are readable or not. And the 30 second penalty is just to make you slow down (if your not cheating). it's not hard to change if someone doesn't like the penalty. The goal is to make your brain work in ways it's not wired to work. Eventually I started reading it like your script does. If column is moved over to the right, somehow I was reading it first. Giggity Link to comment Share on other sites More sharing options...
HaCkk3r Posted April 30, 2009 Share Posted April 30, 2009 Hey, I'm new here so I'm a noob at autoit I tested ur game Alarm and it was good, I made something like a cheat expandcollapse popupMouseMove ( 693, 295, 0 ) sleep(1) mouseclick ("left", 693, 295, 1,0) mouseclick ("left", 693, 295, 1,0) sleep (100) mousemove ( 927, 532, 0) sleep (1) mouseclick ( "left", 927, 532, 1,0) mouseclick ( "left", 927, 532, 1,0) sleep (100) mousemove ( 869, 286, 0) sleep (1) mouseclick ("left", 869, 268, 1,0) mouseclick ("left", 869, 268, 1,0) sleep (100) mousemove ( 653, 225, 0) sleep (1) mouseclick ("left", 690, 589, 1,0) mouseclick ("left", 690, 589, 1,0) sleep (100) mousemove ( 871, 413, 0) sleep (1) mouseclick ("left", 871, 413, 1,0) mouseclick ("left", 871, 413, 1,0) sleep (100) mousemove ( 753, 346, 0) sleep (1) mouseclick ("left", 753, 346, 1,0) mouseclick ("left", 753, 346, 1,0) sleep (100) mousemove (991, 530, 0) sleep (1) mouseclick ("left", 991, 530, 1,0) mouseclick ("left", 991, 530, 1,0) sleep (100) mousemove ( 748, 413, 0) sleep (100) mouseclick("left", 748, 413, 1,0) mouseclick("left", 748, 413, 1,0) sleep (100) mousemove (989, 290, 0) sleep (1) mouseclick ("left", 989, 290, 1,0) mouseclick ("left", 989, 290, 1,0) sleep (100) mousemove (810, 407, 0) sleep (1) mouseclick ("left", 810, 407, 1,0) mouseclick ("left", 810, 407, 1,0) sleep (100) mousemove (931, 588, 0) sleep (1) mouseclick ("left", 931, 588, 1,0) mouseclick ("left", 931, 588, 1,0) sleep (100) mousemove (807, 351, 0) sleep (1) mouseclick ("left", 807, 351, 1,0) mouseclick ("left", 807, 351, 1,0) sleep (100) mousemove (808, 590, 0) sleep (1) mouseclick ("left", 808, 590, 1,0) mouseclick ("left", 808, 590, 1,0) sleep (100) mousemove ( 931, 407, 0) sleep (1) mouseclick ("left", 931, 407, 1,0) mouseclick ("left", 931, 407, 1,0) sleep (100) mousemove (691, 469, 0) sleep (1) mouseclick ("left", 691, 469, 1,0) mouseclick ("left", 691, 469, 1,0) sleep (100) mousemove (870, 470, 0) sleep (1) mouseclick ("left", 870, 470, 1,0) mouseclick ("left", 870, 470, 1,0) sleep (100) mousemove (754, 291, 0) sleep (1) mouseclick ("left", 754, 291, 1,0) mouseclick ("left", 754, 291, 1,0) sleep (100) mousemove (868, 583, 0) sleep (1) mouseclick ("left", 868, 583, 1,0) mouseclick ("left", 868, 583, 1,0) sleep (100) mousemove (810, 468, 0) sleep (1) mouseclick ("left", 810, 468, 1,0) mouseclick ("left", 810, 468, 1,0) sleep (100) mousemove (993, 348, 0) sleep (1) mouseclick ("left", 993, 348, 1,0) mouseclick ("left", 993, 348, 1,0) sleep (100) mousemove (754, 471, 0) sleep (1) mouseclick ("left", 754, 471, 1,0) mouseclick ("left", 754, 471, 1,0) sleep (100) mousemove (936, 290, 0) sleep (1) mouseclick ("left", 936, 290, 1,0) mouseclick ("left", 936, 290, 1,0) sleep (100) mousemove (932, 471, 0) sleep (1) mouseclick ("left", 932, 471, 1,0) mouseclick ("left", 932, 471, 1,0) sleep (100) mousemove (806, 291, 0) sleep (1) mouseclick ("left", 806, 291, 1,0) mouseclick ("left", 806, 291, 1,0) sleep (100) mousemove (751, 528, 0) sleep (1) mouseclick ("left", 751, 528, 1,0) sleep (100) mousemove (931, 350, 0) sleep (1) mouseclick ("left", 931, 350, 1,0) mouseclick ("left", 931, 350, 1,0) sleep (100) mousemove (689, 349, 0) sleep (1) mouseclick ("left", 689, 349, 1,0) mouseclick ("left", 689, 349, 1,0) sleep (100) mousemove (990, 470, 0) sleep (1) mouseclick ("left", 990, 470, 1,0) mouseclick ("left", 990, 470, 1,0) sleep (100) mousemove (747, 587, 0) sleep (1) mouseclick ("left", 747, 587, 1,0) mouseclick ("left", 747, 587, 1,0) sleep (100) mousemove(870, 350, 0) sleep (1) mouseclick ("left", 870, 350, 1,0) mouseclick ("left", 870, 350, 1,0) sleep (100) mousemove (989, 409, 0) sleep (1) mouseclick ("left", 989, 409, 1,0) mouseclick ("left", 989, 409, 1,0) sleep (100) mousemove (689, 410, 0) sleep (1) mouseclick ("left", 689, 410, 1,0) mouseclick ("left", 689, 410, 1,0) sleep (100) mousemove (871, 528, 0) sleep (1) mouseclick ("left", 871, 528, 1,0) mouseclick ("left", 871, 528, 1,0) sleep (100) mousemove ( 689, 529, 0) sleep (1) mouseclick ("left", 689, 529, 1,0) mouseclick ("left", 689, 529, 1,0) sleep (100) mousemove ( 807, 532, 0) sleep (1) mouseclick ("left", 807, 532, 1,0) mouseclick ("left", 807, 532, 1,0) sleep (100) mousemove ( 992, 590, 0) sleep (1) mouseclick ("left", 992, 590, 1,0) mouseclick ("left", 992, 590, 1,0) sleep(100) 6.2 seconds with this Link to comment Share on other sites More sharing options...
cagiva Posted June 21, 2009 Share Posted June 21, 2009 @AlmarM game #1 post expandcollapse popupOpt("WinWaitDelay",1) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("How fast are u ?","Quick Highscore view") If Not WinActive("How fast are u ?","Quick Highscore view") Then WinActivate("How fast are u ?","Quick Highscore view") WinWaitActive("How fast are u ?","Quick Highscore view") MouseClick("left",43,64,1,2) MouseClick("left",280,309,1,2) MouseClick("left",215,55,1,2) MouseClick("left",49,346,1,2) MouseClick("left",225,181,1,2) MouseClick("left",110,130,1,2) MouseClick("left",320,299,1,2) MouseClick("left",97,171,1,2) MouseClick("left",342,64,1,2) MouseClick("left",151,186,1,2) MouseClick("left",279,363,1,2) MouseClick("left",145,103,1,2) MouseClick("left",149,372,1,2) MouseClick("left",282,181,1,2) MouseClick("left",51,239,1,2) MouseClick("left",227,254,1,2) MouseClick("left",227,252,1,2) MouseClick("left",92,62,1,2) MouseClick("left",230,352,1,2) MouseClick("left",161,233,1,2) MouseClick("left",327,134,1,2) MouseClick("left",112,237,1,2) MouseClick("left",280,55,1,2) MouseClick("left",283,253,1,2) MouseClick("left",158,57,1,2) MouseClick("left",117,288,1,2) MouseClick("left",265,124,1,2) MouseClick("left",43,110,1,2) MouseClick("left",227,254,1,2) MouseClick("left",329,237,1,2) MouseClick("left",113,364,1,2) MouseClick("left",206,109,1,2) MouseClick("left",336,190,1,2) MouseClick("left",47,179,1,2) MouseClick("left",193,305,1,2) MouseClick("left",26,290,1,2) MouseClick("left",169,304,1,2) MouseClick("left",329,364,1,2) 4 seconds Link to comment Share on other sites More sharing options...
James Posted June 21, 2009 Share Posted June 21, 2009 I thought this might work, $hHwnd = WinGetHandle("How fast are u ?") For $i = 1 to 36 ControlSend($hHwnd, "", $i, "{SPACE}") Next But it didn't. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
nguyenbason Posted June 22, 2009 Share Posted June 22, 2009 (edited) Ty and what you mean with "0.9 seconds"... You eddited the script ?? Or... What you did ? If WinExists("How fast are u ?","") Then While 1 For $i = 2 To 36 If ControlCommand("How fast are u ?","","[CLASS:Button; INSTANCE:" & $i & "]","IsEnabled","") = 1 Then ControlClick("How fast are u ?","","[CLASS:Button; INSTANCE:" & $i & "]") EndIf Next WEnd EndIf 0.9 seconds ^^ I think you should open score file with append mode and use FileWriteLine. Edited June 22, 2009 by nguyenbason UnderWorldVN- Just play the way you like it Link to comment Share on other sites More sharing options...
AlmarM Posted June 22, 2009 Author Share Posted June 22, 2009 Haha, people are still making bots for it Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
OchoNueve Posted June 22, 2009 Share Posted June 22, 2009 17.4 [font="Times New Roman"]Ocho.[/font] Link to comment Share on other sites More sharing options...
DarkHo Posted June 8, 2010 Share Posted June 8, 2010 21.3 sec that was fun Link to comment Share on other sites More sharing options...
scriptomator Posted June 28, 2010 Share Posted June 28, 2010 i was planning to make a program that had about 5-8 games on it.it would have prizes(funny pictures....kinda lame)and other stuff.but i gave up because i was VERY new at autoit (Gr.7). but i am making a word maker program. Link to comment Share on other sites More sharing options...
AlmarM Posted June 29, 2010 Author Share Posted June 29, 2010 i was planning to make a program that had about 5-8 games on it.it would have prizes(funny pictures....kinda lame)and other stuff.but i gave up because i was VERY new at autoit (Gr.7). but i am making a word maker program.Hiya, Welcome to the forum. Well, don't give it. Try learning AutoIt, ask question on the forums (if you realy can't find it in the helpfile). People will help you if you ask nicely Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Abryce Posted August 10, 2010 Share Posted August 10, 2010 @ AlmarM nice game, its fun. Link to comment Share on other sites More sharing options...
AlmarM Posted August 11, 2010 Author Share Posted August 11, 2010 @ AlmarMnice game, its fun.Thanks, i'll remake this one into a bit harder one ^^. Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now