Sign in to follow this  
Followers 0
AlmarM

Highscore ?

5 posts in this topic

#1 ·  Posted (edited)

Does someone know hot to make a GuiCtrlCreateEdit() with deffrent highscores OR a GuiCreate() with lines and things an official highscore has (Think of Pinball highscore) and fill it with just 1 $var... I have this script:

#include <GuiConstants.au3>

$Restart_Button = InputBox("Restart Button", "Typ the Restart key:", "{PAUSE}") 
If @ERROR = 1 Then MsgBox(0, "No Restart", "You dont have a restart button now") 

HotKeySet($Restart_Button, "_Reset") 

GuiCreate("How fast are u ?", 370, 420)
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) 
$Button_1 = GuiCtrlCreateButton("Click", 70, 10, 50, 50) 
GuiCtrlSetState($Button_1, $GUI_DISABLE) 
$Button_2 = GuiCtrlCreateButton("Click", 130, 10, 50, 50) 
GuiCtrlSetState($Button_2, $GUI_DISABLE) 
$Button_3 = GuiCtrlCreateButton("Click", 190, 10, 50, 50) 
GuiCtrlSetState($Button_3, $GUI_DISABLE) 
$Button_4 = GuiCtrlCreateButton("Click", 250, 10, 50, 50) 
GuiCtrlSetState($Button_4, $GUI_DISABLE) 
$Button_5 = GuiCtrlCreateButton("Click", 310, 10, 50, 50) 
GuiCtrlSetState($Button_5, $GUI_DISABLE) 
$Button_6 = GuiCtrlCreateButton("Click", 10, 70, 50, 50) 
GuiCtrlSetState($Button_6, $GUI_DISABLE) 
$Button_7 = GuiCtrlCreateButton("Click", 70, 70, 50, 50) 
GuiCtrlSetState($Button_7, $GUI_DISABLE) 
$Button_8 = GuiCtrlCreateButton("Click", 130, 70, 50, 50) 
GuiCtrlSetState($Button_8, $GUI_DISABLE) 
$Button_9 = GuiCtrlCreateButton("Click", 190, 70, 50, 50) 
GuiCtrlSetState($Button_9, $GUI_DISABLE) 
$Button_10 = GuiCtrlCreateButton("Click", 250, 70, 50, 50) 
GuiCtrlSetState($Button_10, $GUI_DISABLE) 
$Button_11 = GuiCtrlCreateButton("Click", 310, 70, 50, 50) 
GuiCtrlSetState($Button_11, $GUI_DISABLE) 
$Button_12 = GuiCtrlCreateButton("Click", 10, 130, 50, 50) 
GuiCtrlSetState($Button_12, $GUI_DISABLE) 
$Button_13 = GuiCtrlCreateButton("Click", 70, 130, 50, 50) 
GuiCtrlSetState($Button_13, $GUI_DISABLE) 
$Button_14 = GuiCtrlCreateButton("Click", 130, 130, 50, 50) 
GuiCtrlSetState($Button_14, $GUI_DISABLE) 
$Button_15 = GuiCtrlCreateButton("Click", 190, 130, 50, 50) 
GuiCtrlSetState($Button_15, $GUI_DISABLE) 
$Button_16 = GuiCtrlCreateButton("Click", 250, 130, 50, 50) 
GuiCtrlSetState($Button_16, $GUI_DISABLE) 
$Button_17 = GuiCtrlCreateButton("Click", 310, 130, 50, 50) 
GuiCtrlSetState($Button_17, $GUI_DISABLE) 
$Button_18 = GuiCtrlCreateButton("Click", 10, 190, 50, 50) 
GuiCtrlSetState($Button_18, $GUI_DISABLE) 
$Button_19 = GuiCtrlCreateButton("Click", 70, 190, 50, 50) 
GuiCtrlSetState($Button_19, $GUI_DISABLE) 
$Button_20 = GuiCtrlCreateButton("Click", 130, 190, 50, 50) 
GuiCtrlSetState($Button_20, $GUI_DISABLE) 
$Button_21 = GuiCtrlCreateButton("Click", 190, 190, 50, 50) 
GuiCtrlSetState($Button_21, $GUI_DISABLE) 
$Button_22 = GuiCtrlCreateButton("Click", 250, 190, 50, 50) 
GuiCtrlSetState($Button_22, $GUI_DISABLE) 
$Button_23 = GuiCtrlCreateButton("Click", 310, 190, 50, 50) 
GuiCtrlSetState($Button_23, $GUI_DISABLE) 
$Button_24 = GuiCtrlCreateButton("Click", 10, 250, 50, 50) 
GuiCtrlSetState($Button_24, $GUI_DISABLE) 
$Button_25 = GuiCtrlCreateButton("Click", 70, 250, 50, 50) 
GuiCtrlSetState($Button_25, $GUI_DISABLE) 
$Button_26 = GuiCtrlCreateButton("Click", 130, 250, 50, 50) 
GuiCtrlSetState($Button_26, $GUI_DISABLE) 
$Button_27 = GuiCtrlCreateButton("Click", 190, 250, 50, 50) 
GuiCtrlSetState($Button_27, $GUI_DISABLE) 
$Button_28 = GuiCtrlCreateButton("Click", 250, 250, 50, 50) 
GuiCtrlSetState($Button_28, $GUI_DISABLE) 
$Button_29 = GuiCtrlCreateButton("Click", 310, 250, 50, 50) 
GuiCtrlSetState($Button_29, $GUI_DISABLE) 
$Button_30 = GuiCtrlCreateButton("Click", 10, 310, 50, 50) 
GuiCtrlSetState($Button_30, $GUI_DISABLE) 
$Button_31 = GuiCtrlCreateButton("Click", 70, 310, 50, 50) 
GuiCtrlSetState($Button_31, $GUI_DISABLE) 
$Button_32 = GuiCtrlCreateButton("Click", 130, 310, 50, 50) 
GuiCtrlSetState($Button_32, $GUI_DISABLE) 
$Button_33 = GuiCtrlCreateButton("Click", 190, 310, 50, 50) 
GuiCtrlSetState($Button_33, $GUI_DISABLE) 
$Button_34 = GuiCtrlCreateButton("Click", 250, 310, 50, 50) 
GuiCtrlSetState($Button_34, $GUI_DISABLE) 

While 1
$msg = GUIGetMsg()

Select
Case $msg = $GUI_EVENT_CLOSE
    Exit

Case $msg = $Start_Button
    $begin = TimerInit()
    GuiCtrlSetState($Button_28, $GUI_ENABLE)
    GuiCtrlSetState($Start_Button, $GUI_DISABLE) 
    Beep(500, 100)
    
Case $msg = $Button_28
    GuiCtrlSetState($Button_3, $GUI_ENABLE)
    GuiCtrlSetState($Button_28, $GUI_DISABLE)
    
Case $msg = $Button_3
    GuiCtrlSetState($Button_30, $GUI_ENABLE) 
    GuiCtrlSetState($Button_3, $GUI_DISABLE)
    
Case $msg = $Button_30
    GuiCtrlSetState($Button_15, $GUI_ENABLE)
    GuiCtrlSetState($Button_30, $GUI_DISABLE)

Case $msg = $Button_15
    GuiCtrlSetState($Button_7, $GUI_ENABLE)
    GuiCtrlSetState($Button_15, $GUI_DISABLE)

Case $msg = $Button_7
    GuiCtrlSetState($Button_29, $GUI_ENABLE)
    GuiCtrlSetState($Button_7, $GUI_DISABLE)
    
Case $msg = $Button_29
    GuiCtrlSetState($Button_13, $GUI_ENABLE)
    GuiCtrlSetState($Button_29, $GUI_DISABLE)
    
Case $msg = $Button_13
    GuiCtrlSetState($Button_5, $GUI_ENABLE) 
    GuiCtrlSetState($Button_13, $GUI_DISABLE)
    
Case $msg = $Button_5
    GuiCtrlSetState($Button_14, $GUI_ENABLE)
    GuiCtrlSetState($Button_5, $GUI_DISABLE)

Case $msg = $Button_14
    GuiCtrlSetState($Button_34, $GUI_ENABLE)
    GuiCtrlSetState($Button_14, $GUI_DISABLE)

Case $msg = $Button_34
    GuiCtrlSetState($Button_8, $GUI_ENABLE)
    GuiCtrlSetState($Button_34, $GUI_DISABLE)
    
Case $msg = $Button_8
    GuiCtrlSetState($Button_32, $GUI_ENABLE)
    GuiCtrlSetState($Button_8, $GUI_DISABLE)
    
Case $msg = $Button_32
    GuiCtrlSetState($Button_16, $GUI_ENABLE) 
    GuiCtrlSetState($Button_32, $GUI_DISABLE)
    
Case $msg = $Button_16
    GuiCtrlSetState($Button_18, $GUI_ENABLE)
    GuiCtrlSetState($Button_16, $GUI_DISABLE)

Case $msg = $Button_18
    GuiCtrlSetState($Button_21, $GUI_ENABLE)
    GuiCtrlSetState($Button_18, $GUI_DISABLE)

Case $msg = $Button_21
    GuiCtrlSetState($Button_1, $GUI_ENABLE)
    GuiCtrlSetState($Button_21, $GUI_DISABLE)

Case $msg = $Button_1
    GuiCtrlSetState($Button_33, $GUI_ENABLE)
    GuiCtrlSetState($Button_1, $GUI_DISABLE)
    
Case $msg = $Button_33
    GuiCtrlSetState($Button_20, $GUI_ENABLE) 
    GuiCtrlSetState($Button_33, $GUI_DISABLE)
    
Case $msg = $Button_20
    GuiCtrlSetState($Button_11, $GUI_ENABLE)
    GuiCtrlSetState($Button_20, $GUI_DISABLE)

Case $msg = $Button_11
    GuiCtrlSetState($Button_19, $GUI_ENABLE)
    GuiCtrlSetState($Button_11, $GUI_DISABLE)

Case $msg = $Button_19
    GuiCtrlSetState($Button_4, $GUI_ENABLE)
    GuiCtrlSetState($Button_19, $GUI_DISABLE)
    
Case $msg = $Button_4
    GuiCtrlSetState($Button_22, $GUI_ENABLE)
    GuiCtrlSetState($Button_4, $GUI_DISABLE)
    
Case $msg = $Button_22
    GuiCtrlSetState($Button_2, $GUI_ENABLE) 
    GuiCtrlSetState($Button_22, $GUI_DISABLE)
    
Case $msg = $Button_2
    GuiCtrlSetState($Button_25, $GUI_ENABLE)
    GuiCtrlSetState($Button_2, $GUI_DISABLE)

Case $msg = $Button_25
    GuiCtrlSetState($Button_10, $GUI_ENABLE)
    GuiCtrlSetState($Button_25, $GUI_DISABLE)

Case $msg = $Button_10
    GuiCtrlSetState($Button_6, $GUI_ENABLE)
    GuiCtrlSetState($Button_10, $GUI_DISABLE)
    
Case $msg = $Button_6
    GuiCtrlSetState($Button_23, $GUI_ENABLE)
    GuiCtrlSetState($Button_6, $GUI_DISABLE)
    
Case $msg = $Button_23
    GuiCtrlSetState($Button_31, $GUI_ENABLE) 
    GuiCtrlSetState($Button_23, $GUI_DISABLE)
    
Case $msg = $Button_31
    GuiCtrlSetState($Button_9, $GUI_ENABLE)
    GuiCtrlSetState($Button_31, $GUI_DISABLE)

Case $msg = $Button_9
    GuiCtrlSetState($Button_17, $GUI_ENABLE)
    GuiCtrlSetState($Button_9, $GUI_DISABLE)

Case $msg = $Button_17
    GuiCtrlSetState($Button_12, $GUI_ENABLE)
    GuiCtrlSetState($Button_17, $GUI_DISABLE)
    
Case $msg = $Button_12
    GuiCtrlSetState($Button_27, $GUI_ENABLE)
    GuiCtrlSetState($Button_12, $GUI_DISABLE)
    
Case $msg = $Button_27
    GuiCtrlSetState($Button_24, $GUI_ENABLE) 
    GuiCtrlSetState($Button_27, $GUI_DISABLE)
    
Case $msg = $Button_24
    GuiCtrlSetState($Button_26, $GUI_ENABLE)
    GuiCtrlSetState($Button_24, $GUI_DISABLE)
    
Case $msg = $Button_26
    GuiCtrlSetState($Stop_Button, $GUI_ENABLE)
    GuiCtrlSetState($Button_26, $GUI_DISABLE) 
    
Case $msg = $Stop_Button
    Beep(500, 100)
    $dif = Round(TimerDiff($begin) / 1000, 1)
    MsgBox(0, "Your Time: ", "Your time is: " & $dif & " seconds.    ")
    $HighScore = GuiCtrlCreateEdit("Last try was: " & $dif, 10, 370, 350, 50)
EndSelect
WEnd

Func _Reset()
Sleep(100)
MsgBox(0, "Restart", "Restarting" & @CRLF & "Please wait...", 2)
GuiCtrlSetState($Button_1, $GUI_DISABLE)
GuiCtrlSetState($Button_2, $GUI_DISABLE)
GuiCtrlSetState($Button_3, $GUI_DISABLE)
GuiCtrlSetState($Button_4, $GUI_DISABLE)
GuiCtrlSetState($Button_5, $GUI_DISABLE)
GuiCtrlSetState($Button_6, $GUI_DISABLE)
GuiCtrlSetState($Button_7, $GUI_DISABLE)
GuiCtrlSetState($Button_8, $GUI_DISABLE)
GuiCtrlSetState($Button_9, $GUI_DISABLE)
GuiCtrlSetState($Button_10, $GUI_DISABLE)
GuiCtrlSetState($Button_11, $GUI_DISABLE)
GuiCtrlSetState($Button_12, $GUI_DISABLE)
GuiCtrlSetState($Button_13, $GUI_DISABLE)
GuiCtrlSetState($Button_14, $GUI_DISABLE)
GuiCtrlSetState($Button_15, $GUI_DISABLE)
GuiCtrlSetState($Button_16, $GUI_DISABLE)
GuiCtrlSetState($Button_17, $GUI_DISABLE)
GuiCtrlSetState($Button_18, $GUI_DISABLE)
GuiCtrlSetState($Button_19, $GUI_DISABLE)
GuiCtrlSetState($Button_20, $GUI_DISABLE)
GuiCtrlSetState($Button_21, $GUI_DISABLE)
GuiCtrlSetState($Button_22, $GUI_DISABLE)
GuiCtrlSetState($Button_23, $GUI_DISABLE)
GuiCtrlSetState($Button_24, $GUI_DISABLE)
GuiCtrlSetState($Button_25, $GUI_DISABLE)
GuiCtrlSetState($Button_26, $GUI_DISABLE)
GuiCtrlSetState($Button_27, $GUI_DISABLE)
GuiCtrlSetState($Button_28, $GUI_DISABLE)
GuiCtrlSetState($Button_29, $GUI_DISABLE)
GuiCtrlSetState($Button_30, $GUI_DISABLE)
GuiCtrlSetState($Button_31, $GUI_DISABLE)
GuiCtrlSetState($Button_32, $GUI_DISABLE)
GuiCtrlSetState($Button_33, $GUI_DISABLE)
GuiCtrlSetState($Button_34, $GUI_DISABLE)
GuiCtrlSetState($Stop_Button, $GUI_DISABLE)
GuiCtrlSetState($Start_Button, $GUI_ENABLE)
Sleep(100)
EndFuncoÝ÷ Ø:²Ê&{Y'£!jÒ&y©è®¯y¦Þ¶×«×~ÇlrÞ°@ÈOTáz·°jÆ®¶­sbb33cµ7F''WGFöâÒwV7G&Ä7&VFT'WGFöâgV÷Cµ7F'BgV÷C²ÂÂÂSÂS¤wV7G&Å6WE7FFRb33cµ7F''WGFöâÂb33c´uTôTä$ÄR¢b33cµ7F÷ô'WGFöâÒwV7G&Ä7&VFT'WGFöâgV÷Cµ7F÷gV÷C²Â3Â3ÂSÂS¤wV7G&Å6WE7FFRb33cµ7F÷ô'WGFöâÂb33c´uTôTä$ÄRoÝ÷ Ù©ÝZºÚ"µÍÌÍÔÝÐ]ÛHÝZPÝÜX]P]Û   ][ÝÔÝ    ][ÝËLL
L
L
BÝZPÝÙ]Ý]J  ÌÍÔÝÐ]Û   ÌÍÑÕRWÑSPJBÌÍÔÝÜÐ]ÛHÝZPÝÜX]P]Û  ][ÝÔÝÜ  ][ÝËÌLÌL
L
L
HÝZPÝÙ]Ý]J  ÌÍÔÝÜÐ]Û ÌÍÑÕRWÑTÐPJ
Edited by AlmarM

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.

Share this post


Link to post
Share on other sites



Maybe...

#include <GuiConstants.au3>

$Restart_Button = InputBox("Restart Button", "Typ the Restart key:", "{PAUSE}")
If @ERROR = 1 Then MsgBox(0, "No Restart", "You dont have a restart button now")

HotKeySet($Restart_Button, "_Reset")

GuiCreate("How fast are u ?", 370, 420)

$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_ENABLE)
$Button_1 = GuiCtrlCreateButton("Click", 70, 10, 50, 50)
GuiCtrlSetState($Button_1, $GUI_DISABLE)
$Button_2 = GuiCtrlCreateButton("Click", 130, 10, 50, 50)
GuiCtrlSetState($Button_2, $GUI_DISABLE)
$Button_3 = GuiCtrlCreateButton("Click", 190, 10, 50, 50)
GuiCtrlSetState($Button_3, $GUI_DISABLE)
$Button_4 = GuiCtrlCreateButton("Click", 250, 10, 50, 50)
GuiCtrlSetState($Button_4, $GUI_DISABLE)
$Button_5 = GuiCtrlCreateButton("Click", 310, 10, 50, 50)
GuiCtrlSetState($Button_5, $GUI_DISABLE)
$Button_6 = GuiCtrlCreateButton("Click", 10, 70, 50, 50)
GuiCtrlSetState($Button_6, $GUI_DISABLE)
$Button_7 = GuiCtrlCreateButton("Click", 70, 70, 50, 50)
GuiCtrlSetState($Button_7, $GUI_DISABLE)
$Button_8 = GuiCtrlCreateButton("Click", 130, 70, 50, 50)
GuiCtrlSetState($Button_8, $GUI_DISABLE)
$Button_9 = GuiCtrlCreateButton("Click", 190, 70, 50, 50)
GuiCtrlSetState($Button_9, $GUI_DISABLE)
$Button_10 = GuiCtrlCreateButton("Click", 250, 70, 50, 50)
GuiCtrlSetState($Button_10, $GUI_DISABLE)
$Button_11 = GuiCtrlCreateButton("Click", 310, 70, 50, 50)
GuiCtrlSetState($Button_11, $GUI_DISABLE)
$Button_12 = GuiCtrlCreateButton("Click", 10, 130, 50, 50)
GuiCtrlSetState($Button_12, $GUI_DISABLE)
$Button_13 = GuiCtrlCreateButton("Click", 70, 130, 50, 50)
GuiCtrlSetState($Button_13, $GUI_DISABLE)
$Button_14 = GuiCtrlCreateButton("Click", 130, 130, 50, 50)
GuiCtrlSetState($Button_14, $GUI_DISABLE)
$Button_15 = GuiCtrlCreateButton("Click", 190, 130, 50, 50)
GuiCtrlSetState($Button_15, $GUI_DISABLE)
$Button_16 = GuiCtrlCreateButton("Click", 250, 130, 50, 50)
GuiCtrlSetState($Button_16, $GUI_DISABLE)
$Button_17 = GuiCtrlCreateButton("Click", 310, 130, 50, 50)
GuiCtrlSetState($Button_17, $GUI_DISABLE)
$Button_18 = GuiCtrlCreateButton("Click", 10, 190, 50, 50)
GuiCtrlSetState($Button_18, $GUI_DISABLE)
$Button_19 = GuiCtrlCreateButton("Click", 70, 190, 50, 50)
GuiCtrlSetState($Button_19, $GUI_DISABLE)
$Button_20 = GuiCtrlCreateButton("Click", 130, 190, 50, 50)
GuiCtrlSetState($Button_20, $GUI_DISABLE)
$Button_21 = GuiCtrlCreateButton("Click", 190, 190, 50, 50)
GuiCtrlSetState($Button_21, $GUI_DISABLE)
$Button_22 = GuiCtrlCreateButton("Click", 250, 190, 50, 50)
GuiCtrlSetState($Button_22, $GUI_DISABLE)
$Button_23 = GuiCtrlCreateButton("Click", 310, 190, 50, 50)
GuiCtrlSetState($Button_23, $GUI_DISABLE)
$Button_24 = GuiCtrlCreateButton("Click", 10, 250, 50, 50)
GuiCtrlSetState($Button_24, $GUI_DISABLE)
$Button_25 = GuiCtrlCreateButton("Click", 70, 250, 50, 50)
GuiCtrlSetState($Button_25, $GUI_DISABLE)
$Button_26 = GuiCtrlCreateButton("Click", 130, 250, 50, 50)
GuiCtrlSetState($Button_26, $GUI_DISABLE)
$Button_27 = GuiCtrlCreateButton("Click", 190, 250, 50, 50)
GuiCtrlSetState($Button_27, $GUI_DISABLE)
$Button_28 = GuiCtrlCreateButton("Click", 250, 250, 50, 50)
GuiCtrlSetState($Button_28, $GUI_DISABLE)
$Button_29 = GuiCtrlCreateButton("Click", 310, 250, 50, 50)
GuiCtrlSetState($Button_29, $GUI_DISABLE)
$Button_30 = GuiCtrlCreateButton("Click", 10, 310, 50, 50)
GuiCtrlSetState($Button_30, $GUI_DISABLE)
$Button_31 = GuiCtrlCreateButton("Click", 70, 310, 50, 50)
GuiCtrlSetState($Button_31, $GUI_DISABLE)
$Button_32 = GuiCtrlCreateButton("Click", 130, 310, 50, 50)
GuiCtrlSetState($Button_32, $GUI_DISABLE)
$Button_33 = GuiCtrlCreateButton("Click", 190, 310, 50, 50)
GuiCtrlSetState($Button_33, $GUI_DISABLE)
$Button_34 = GuiCtrlCreateButton("Click", 250, 310, 50, 50)
GuiCtrlSetState($Button_34, $GUI_DISABLE)
$HighScore = GuiCtrlCreateEdit("", 10, 370, 350, 50)
GuiSetState(@SW_SHOW)

While 1
$msg = GUIGetMsg()

Select
Case $msg = $GUI_EVENT_CLOSE
    Exit

Case $msg = $Start_Button
    $begin = TimerInit()
    GuiCtrlSetState($Button_28, $GUI_ENABLE)
    GuiCtrlSetState($Start_Button, $GUI_DISABLE)
    Beep(500, 100)
   
Case $msg = $Button_28
    GuiCtrlSetState($Button_3, $GUI_ENABLE)
    GuiCtrlSetState($Button_28, $GUI_DISABLE)
   
Case $msg = $Button_3
    GuiCtrlSetState($Button_30, $GUI_ENABLE)
    GuiCtrlSetState($Button_3, $GUI_DISABLE)
   
Case $msg = $Button_30
    GuiCtrlSetState($Button_15, $GUI_ENABLE)
    GuiCtrlSetState($Button_30, $GUI_DISABLE)

Case $msg = $Button_15
    GuiCtrlSetState($Button_7, $GUI_ENABLE)
    GuiCtrlSetState($Button_15, $GUI_DISABLE)

Case $msg = $Button_7
    GuiCtrlSetState($Button_29, $GUI_ENABLE)
    GuiCtrlSetState($Button_7, $GUI_DISABLE)
   
Case $msg = $Button_29
    GuiCtrlSetState($Button_13, $GUI_ENABLE)
    GuiCtrlSetState($Button_29, $GUI_DISABLE)
   
Case $msg = $Button_13
    GuiCtrlSetState($Button_5, $GUI_ENABLE)
    GuiCtrlSetState($Button_13, $GUI_DISABLE)
   
Case $msg = $Button_5
    GuiCtrlSetState($Button_14, $GUI_ENABLE)
    GuiCtrlSetState($Button_5, $GUI_DISABLE)

Case $msg = $Button_14
    GuiCtrlSetState($Button_34, $GUI_ENABLE)
    GuiCtrlSetState($Button_14, $GUI_DISABLE)

Case $msg = $Button_34
    GuiCtrlSetState($Button_8, $GUI_ENABLE)
    GuiCtrlSetState($Button_34, $GUI_DISABLE)
   
Case $msg = $Button_8
    GuiCtrlSetState($Button_32, $GUI_ENABLE)
    GuiCtrlSetState($Button_8, $GUI_DISABLE)
   
Case $msg = $Button_32
    GuiCtrlSetState($Button_16, $GUI_ENABLE)
    GuiCtrlSetState($Button_32, $GUI_DISABLE)
   
Case $msg = $Button_16
    GuiCtrlSetState($Button_18, $GUI_ENABLE)
    GuiCtrlSetState($Button_16, $GUI_DISABLE)

Case $msg = $Button_18
    GuiCtrlSetState($Button_21, $GUI_ENABLE)
    GuiCtrlSetState($Button_18, $GUI_DISABLE)

Case $msg = $Button_21
    GuiCtrlSetState($Button_1, $GUI_ENABLE)
    GuiCtrlSetState($Button_21, $GUI_DISABLE)

Case $msg = $Button_1
    GuiCtrlSetState($Button_33, $GUI_ENABLE)
    GuiCtrlSetState($Button_1, $GUI_DISABLE)
   
Case $msg = $Button_33
    GuiCtrlSetState($Button_20, $GUI_ENABLE)
    GuiCtrlSetState($Button_33, $GUI_DISABLE)
   
Case $msg = $Button_20
    GuiCtrlSetState($Button_11, $GUI_ENABLE)
    GuiCtrlSetState($Button_20, $GUI_DISABLE)

Case $msg = $Button_11
    GuiCtrlSetState($Button_19, $GUI_ENABLE)
    GuiCtrlSetState($Button_11, $GUI_DISABLE)

Case $msg = $Button_19
    GuiCtrlSetState($Button_4, $GUI_ENABLE)
    GuiCtrlSetState($Button_19, $GUI_DISABLE)
   
Case $msg = $Button_4
    GuiCtrlSetState($Button_22, $GUI_ENABLE)
    GuiCtrlSetState($Button_4, $GUI_DISABLE)
   
Case $msg = $Button_22
    GuiCtrlSetState($Button_2, $GUI_ENABLE)
    GuiCtrlSetState($Button_22, $GUI_DISABLE)
   
Case $msg = $Button_2
    GuiCtrlSetState($Button_25, $GUI_ENABLE)
    GuiCtrlSetState($Button_2, $GUI_DISABLE)

Case $msg = $Button_25
    GuiCtrlSetState($Button_10, $GUI_ENABLE)
    GuiCtrlSetState($Button_25, $GUI_DISABLE)

Case $msg = $Button_10
    GuiCtrlSetState($Button_6, $GUI_ENABLE)
    GuiCtrlSetState($Button_10, $GUI_DISABLE)
   
Case $msg = $Button_6
    GuiCtrlSetState($Button_23, $GUI_ENABLE)
    GuiCtrlSetState($Button_6, $GUI_DISABLE)
   
Case $msg = $Button_23
    GuiCtrlSetState($Button_31, $GUI_ENABLE)
    GuiCtrlSetState($Button_23, $GUI_DISABLE)
   
Case $msg = $Button_31
    GuiCtrlSetState($Button_9, $GUI_ENABLE)
    GuiCtrlSetState($Button_31, $GUI_DISABLE)

Case $msg = $Button_9
    GuiCtrlSetState($Button_17, $GUI_ENABLE)
    GuiCtrlSetState($Button_9, $GUI_DISABLE)

Case $msg = $Button_17
    GuiCtrlSetState($Button_12, $GUI_ENABLE)
    GuiCtrlSetState($Button_17, $GUI_DISABLE)
   
Case $msg = $Button_12
    GuiCtrlSetState($Button_27, $GUI_ENABLE)
    GuiCtrlSetState($Button_12, $GUI_DISABLE)
   
Case $msg = $Button_27
    GuiCtrlSetState($Button_24, $GUI_ENABLE)
    GuiCtrlSetState($Button_27, $GUI_DISABLE)
   
Case $msg = $Button_24
    GuiCtrlSetState($Button_26, $GUI_ENABLE)
    GuiCtrlSetState($Button_24, $GUI_DISABLE)
   
Case $msg = $Button_26
    GuiCtrlSetState($Stop_Button, $GUI_ENABLE)
    GuiCtrlSetState($Button_26, $GUI_DISABLE)
   
Case $msg = $Stop_Button
    Beep(500, 100)
    $dif = Round(TimerDiff($begin) / 1000, 1)
    MsgBox(0, "Your Time: ", "Your time is: " & $dif & " seconds.    ")
    GUICtrlSetData($HighScore, $dif & " Seconds" & @CRLF, "|") 
    
EndSelect
WEnd

Func _Reset()
Sleep(100)
MsgBox(0, "Restart", "Restarting" & @CRLF & "Please wait...", 2)
GuiCtrlSetState($Button_1, $GUI_DISABLE)
GuiCtrlSetState($Button_2, $GUI_DISABLE)
GuiCtrlSetState($Button_3, $GUI_DISABLE)
GuiCtrlSetState($Button_4, $GUI_DISABLE)
GuiCtrlSetState($Button_5, $GUI_DISABLE)
GuiCtrlSetState($Button_6, $GUI_DISABLE)
GuiCtrlSetState($Button_7, $GUI_DISABLE)
GuiCtrlSetState($Button_8, $GUI_DISABLE)
GuiCtrlSetState($Button_9, $GUI_DISABLE)
GuiCtrlSetState($Button_10, $GUI_DISABLE)
GuiCtrlSetState($Button_11, $GUI_DISABLE)
GuiCtrlSetState($Button_12, $GUI_DISABLE)
GuiCtrlSetState($Button_13, $GUI_DISABLE)
GuiCtrlSetState($Button_14, $GUI_DISABLE)
GuiCtrlSetState($Button_15, $GUI_DISABLE)
GuiCtrlSetState($Button_16, $GUI_DISABLE)
GuiCtrlSetState($Button_17, $GUI_DISABLE)
GuiCtrlSetState($Button_18, $GUI_DISABLE)
GuiCtrlSetState($Button_19, $GUI_DISABLE)
GuiCtrlSetState($Button_20, $GUI_DISABLE)
GuiCtrlSetState($Button_21, $GUI_DISABLE)
GuiCtrlSetState($Button_22, $GUI_DISABLE)
GuiCtrlSetState($Button_23, $GUI_DISABLE)
GuiCtrlSetState($Button_24, $GUI_DISABLE)
GuiCtrlSetState($Button_25, $GUI_DISABLE)
GuiCtrlSetState($Button_26, $GUI_DISABLE)
GuiCtrlSetState($Button_27, $GUI_DISABLE)
GuiCtrlSetState($Button_28, $GUI_DISABLE)
GuiCtrlSetState($Button_29, $GUI_DISABLE)
GuiCtrlSetState($Button_30, $GUI_DISABLE)
GuiCtrlSetState($Button_31, $GUI_DISABLE)
GuiCtrlSetState($Button_32, $GUI_DISABLE)
GuiCtrlSetState($Button_33, $GUI_DISABLE)
GuiCtrlSetState($Button_34, $GUI_DISABLE)
GuiCtrlSetState($Stop_Button, $GUI_DISABLE)
GuiCtrlSetState($Start_Button, $GUI_ENABLE)
Sleep(100)
EndFunc

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Ty it works ^^ But...

Im trying to make one again now ^^ Wth GuiCreate()

And you gave me the awnser with *More as 1 try* ^^


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.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

The edit will display "numerous" scores... check it out with your up/down button

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I now got

#include <GuiConstants.au3>

$Restart_Button = InputBox("Restart Button", "Typ the Restart key:", "{PAUSE}")
If @ERROR = 1 Then MsgBox(0, "No Restart", "You dont have a restart button now")

HotKeySet($Restart_Button, "_Reset")

GuiCreate("How fast are u ?", 370, 500)
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)
$Button_1 = GuiCtrlCreateButton("Click", 70, 10, 50, 50)
GuiCtrlSetState($Button_1, $GUI_DISABLE)
$Button_2 = GuiCtrlCreateButton("Click", 130, 10, 50, 50)
GuiCtrlSetState($Button_2, $GUI_DISABLE)
$Button_3 = GuiCtrlCreateButton("Click", 190, 10, 50, 50)
GuiCtrlSetState($Button_3, $GUI_DISABLE)
$Button_4 = GuiCtrlCreateButton("Click", 250, 10, 50, 50)
GuiCtrlSetState($Button_4, $GUI_DISABLE)
$Button_5 = GuiCtrlCreateButton("Click", 310, 10, 50, 50)
GuiCtrlSetState($Button_5, $GUI_DISABLE)
$Button_6 = GuiCtrlCreateButton("Click", 10, 70, 50, 50)
GuiCtrlSetState($Button_6, $GUI_DISABLE)
$Button_7 = GuiCtrlCreateButton("Click", 70, 70, 50, 50)
GuiCtrlSetState($Button_7, $GUI_DISABLE)
$Button_8 = GuiCtrlCreateButton("Click", 130, 70, 50, 50)
GuiCtrlSetState($Button_8, $GUI_DISABLE)
$Button_9 = GuiCtrlCreateButton("Click", 190, 70, 50, 50)
GuiCtrlSetState($Button_9, $GUI_DISABLE)
$Button_10 = GuiCtrlCreateButton("Click", 250, 70, 50, 50)
GuiCtrlSetState($Button_10, $GUI_DISABLE)
$Button_11 = GuiCtrlCreateButton("Click", 310, 70, 50, 50)
GuiCtrlSetState($Button_11, $GUI_DISABLE)
$Button_12 = GuiCtrlCreateButton("Click", 10, 130, 50, 50)
GuiCtrlSetState($Button_12, $GUI_DISABLE)
$Button_13 = GuiCtrlCreateButton("Click", 70, 130, 50, 50)
GuiCtrlSetState($Button_13, $GUI_DISABLE)
$Button_14 = GuiCtrlCreateButton("Click", 130, 130, 50, 50)
GuiCtrlSetState($Button_14, $GUI_DISABLE)
$Button_15 = GuiCtrlCreateButton("Click", 190, 130, 50, 50)
GuiCtrlSetState($Button_15, $GUI_DISABLE)
$Button_16 = GuiCtrlCreateButton("Click", 250, 130, 50, 50)
GuiCtrlSetState($Button_16, $GUI_DISABLE)
$Button_17 = GuiCtrlCreateButton("Click", 310, 130, 50, 50)
GuiCtrlSetState($Button_17, $GUI_DISABLE)
$Button_18 = GuiCtrlCreateButton("Click", 10, 190, 50, 50)
GuiCtrlSetState($Button_18, $GUI_DISABLE)
$Button_19 = GuiCtrlCreateButton("Click", 70, 190, 50, 50)
GuiCtrlSetState($Button_19, $GUI_DISABLE)
$Button_20 = GuiCtrlCreateButton("Click", 130, 190, 50, 50)
GuiCtrlSetState($Button_20, $GUI_DISABLE)
$Button_21 = GuiCtrlCreateButton("Click", 190, 190, 50, 50)
GuiCtrlSetState($Button_21, $GUI_DISABLE)
$Button_22 = GuiCtrlCreateButton("Click", 250, 190, 50, 50)
GuiCtrlSetState($Button_22, $GUI_DISABLE)
$Button_23 = GuiCtrlCreateButton("Click", 310, 190, 50, 50)
GuiCtrlSetState($Button_23, $GUI_DISABLE)
$Button_24 = GuiCtrlCreateButton("Click", 10, 250, 50, 50)
GuiCtrlSetState($Button_24, $GUI_DISABLE)
$Button_25 = GuiCtrlCreateButton("Click", 70, 250, 50, 50)
GuiCtrlSetState($Button_25, $GUI_DISABLE)
$Button_26 = GuiCtrlCreateButton("Click", 130, 250, 50, 50)
GuiCtrlSetState($Button_26, $GUI_DISABLE)
$Button_27 = GuiCtrlCreateButton("Click", 190, 250, 50, 50)
GuiCtrlSetState($Button_27, $GUI_DISABLE)
$Button_28 = GuiCtrlCreateButton("Click", 250, 250, 50, 50)
GuiCtrlSetState($Button_28, $GUI_DISABLE)
$Button_29 = GuiCtrlCreateButton("Click", 310, 250, 50, 50)
GuiCtrlSetState($Button_29, $GUI_DISABLE)
$Button_30 = GuiCtrlCreateButton("Click", 10, 310, 50, 50)
GuiCtrlSetState($Button_30, $GUI_DISABLE)
$Button_31 = GuiCtrlCreateButton("Click", 70, 310, 50, 50)
GuiCtrlSetState($Button_31, $GUI_DISABLE)
$Button_32 = GuiCtrlCreateButton("Click", 130, 310, 50, 50)
GuiCtrlSetState($Button_32, $GUI_DISABLE)
$Button_33 = GuiCtrlCreateButton("Click", 190, 310, 50, 50)
GuiCtrlSetState($Button_33, $GUI_DISABLE)
$Button_34 = GuiCtrlCreateButton("Click", 250, 310, 50, 50)
GuiCtrlSetState($Button_34, $GUI_DISABLE)
$HighScore = GuiCtrlCreateEdit("Highscore:" & @CRLF & @CRLF, 10, 370, 350, 120)

While 1
$msg = GUIGetMsg()

Select
Case $msg = $GUI_EVENT_CLOSE
    Exit

Case $msg = $Start_Button
    $begin = TimerInit()
    GuiCtrlSetState($Button_28, $GUI_ENABLE)
    GuiCtrlSetState($Start_Button, $GUI_DISABLE)
    Beep(500, 100)
   
Case $msg = $Button_28
    GuiCtrlSetState($Button_3, $GUI_ENABLE)
    GuiCtrlSetState($Button_28, $GUI_DISABLE)
   
Case $msg = $Button_3
    GuiCtrlSetState($Button_30, $GUI_ENABLE)
    GuiCtrlSetState($Button_3, $GUI_DISABLE)
   
Case $msg = $Button_30
    GuiCtrlSetState($Button_15, $GUI_ENABLE)
    GuiCtrlSetState($Button_30, $GUI_DISABLE)

Case $msg = $Button_15
    GuiCtrlSetState($Button_7, $GUI_ENABLE)
    GuiCtrlSetState($Button_15, $GUI_DISABLE)

Case $msg = $Button_7
    GuiCtrlSetState($Button_29, $GUI_ENABLE)
    GuiCtrlSetState($Button_7, $GUI_DISABLE)
   
Case $msg = $Button_29
    GuiCtrlSetState($Button_13, $GUI_ENABLE)
    GuiCtrlSetState($Button_29, $GUI_DISABLE)
   
Case $msg = $Button_13
    GuiCtrlSetState($Button_5, $GUI_ENABLE)
    GuiCtrlSetState($Button_13, $GUI_DISABLE)
   
Case $msg = $Button_5
    GuiCtrlSetState($Button_14, $GUI_ENABLE)
    GuiCtrlSetState($Button_5, $GUI_DISABLE)

Case $msg = $Button_14
    GuiCtrlSetState($Button_34, $GUI_ENABLE)
    GuiCtrlSetState($Button_14, $GUI_DISABLE)

Case $msg = $Button_34
    GuiCtrlSetState($Button_8, $GUI_ENABLE)
    GuiCtrlSetState($Button_34, $GUI_DISABLE)
   
Case $msg = $Button_8
    GuiCtrlSetState($Button_32, $GUI_ENABLE)
    GuiCtrlSetState($Button_8, $GUI_DISABLE)
   
Case $msg = $Button_32
    GuiCtrlSetState($Button_16, $GUI_ENABLE)
    GuiCtrlSetState($Button_32, $GUI_DISABLE)
   
Case $msg = $Button_16
    GuiCtrlSetState($Button_18, $GUI_ENABLE)
    GuiCtrlSetState($Button_16, $GUI_DISABLE)

Case $msg = $Button_18
    GuiCtrlSetState($Button_21, $GUI_ENABLE)
    GuiCtrlSetState($Button_18, $GUI_DISABLE)

Case $msg = $Button_21
    GuiCtrlSetState($Button_1, $GUI_ENABLE)
    GuiCtrlSetState($Button_21, $GUI_DISABLE)

Case $msg = $Button_1
    GuiCtrlSetState($Button_33, $GUI_ENABLE)
    GuiCtrlSetState($Button_1, $GUI_DISABLE)
   
Case $msg = $Button_33
    GuiCtrlSetState($Button_20, $GUI_ENABLE)
    GuiCtrlSetState($Button_33, $GUI_DISABLE)
   
Case $msg = $Button_20
    GuiCtrlSetState($Button_11, $GUI_ENABLE)
    GuiCtrlSetState($Button_20, $GUI_DISABLE)

Case $msg = $Button_11
    GuiCtrlSetState($Button_19, $GUI_ENABLE)
    GuiCtrlSetState($Button_11, $GUI_DISABLE)

Case $msg = $Button_19
    GuiCtrlSetState($Button_4, $GUI_ENABLE)
    GuiCtrlSetState($Button_19, $GUI_DISABLE)
   
Case $msg = $Button_4
    GuiCtrlSetState($Button_22, $GUI_ENABLE)
    GuiCtrlSetState($Button_4, $GUI_DISABLE)
   
Case $msg = $Button_22
    GuiCtrlSetState($Button_2, $GUI_ENABLE)
    GuiCtrlSetState($Button_22, $GUI_DISABLE)
   
Case $msg = $Button_2
    GuiCtrlSetState($Button_25, $GUI_ENABLE)
    GuiCtrlSetState($Button_2, $GUI_DISABLE)

Case $msg = $Button_25
    GuiCtrlSetState($Button_10, $GUI_ENABLE)
    GuiCtrlSetState($Button_25, $GUI_DISABLE)

Case $msg = $Button_10
    GuiCtrlSetState($Button_6, $GUI_ENABLE)
    GuiCtrlSetState($Button_10, $GUI_DISABLE)
   
Case $msg = $Button_6
    GuiCtrlSetState($Button_23, $GUI_ENABLE)
    GuiCtrlSetState($Button_6, $GUI_DISABLE)
   
Case $msg = $Button_23
    GuiCtrlSetState($Button_31, $GUI_ENABLE)
    GuiCtrlSetState($Button_23, $GUI_DISABLE)
   
Case $msg = $Button_31
    GuiCtrlSetState($Button_9, $GUI_ENABLE)
    GuiCtrlSetState($Button_31, $GUI_DISABLE)

Case $msg = $Button_9
    GuiCtrlSetState($Button_17, $GUI_ENABLE)
    GuiCtrlSetState($Button_9, $GUI_DISABLE)

Case $msg = $Button_17
    GuiCtrlSetState($Button_12, $GUI_ENABLE)
    GuiCtrlSetState($Button_17, $GUI_DISABLE)
   
Case $msg = $Button_12
    GuiCtrlSetState($Button_27, $GUI_ENABLE)
    GuiCtrlSetState($Button_12, $GUI_DISABLE)
   
Case $msg = $Button_27
    GuiCtrlSetState($Button_24, $GUI_ENABLE)
    GuiCtrlSetState($Button_27, $GUI_DISABLE)
   
Case $msg = $Button_24
    GuiCtrlSetState($Button_26, $GUI_ENABLE)
    GuiCtrlSetState($Button_24, $GUI_DISABLE)
   
Case $msg = $Button_26
    GuiCtrlSetState($Stop_Button, $GUI_ENABLE)
    GuiCtrlSetState($Button_26, $GUI_DISABLE)
   
Case $msg = $Stop_Button
    Beep(500, 100)
    $dif = Round(TimerDiff($begin) / 1000, 1)
    MsgBox(0, "Your Time: ", "Your time is: " & $dif & " seconds.    ")
    GUICtrlSetData($HighScore, $dif & " Seconds" & @CRLF, "|") 
    
EndSelect
WEnd

Func _Reset()
Sleep(100)
MsgBox(0, "Restart", "Restarting" & @CRLF & "Please wait...", 2)
GuiCtrlSetState($Button_1, $GUI_DISABLE)
GuiCtrlSetState($Button_2, $GUI_DISABLE)
GuiCtrlSetState($Button_3, $GUI_DISABLE)
GuiCtrlSetState($Button_4, $GUI_DISABLE)
GuiCtrlSetState($Button_5, $GUI_DISABLE)
GuiCtrlSetState($Button_6, $GUI_DISABLE)
GuiCtrlSetState($Button_7, $GUI_DISABLE)
GuiCtrlSetState($Button_8, $GUI_DISABLE)
GuiCtrlSetState($Button_9, $GUI_DISABLE)
GuiCtrlSetState($Button_10, $GUI_DISABLE)
GuiCtrlSetState($Button_11, $GUI_DISABLE)
GuiCtrlSetState($Button_12, $GUI_DISABLE)
GuiCtrlSetState($Button_13, $GUI_DISABLE)
GuiCtrlSetState($Button_14, $GUI_DISABLE)
GuiCtrlSetState($Button_15, $GUI_DISABLE)
GuiCtrlSetState($Button_16, $GUI_DISABLE)
GuiCtrlSetState($Button_17, $GUI_DISABLE)
GuiCtrlSetState($Button_18, $GUI_DISABLE)
GuiCtrlSetState($Button_19, $GUI_DISABLE)
GuiCtrlSetState($Button_20, $GUI_DISABLE)
GuiCtrlSetState($Button_21, $GUI_DISABLE)
GuiCtrlSetState($Button_22, $GUI_DISABLE)
GuiCtrlSetState($Button_23, $GUI_DISABLE)
GuiCtrlSetState($Button_24, $GUI_DISABLE)
GuiCtrlSetState($Button_25, $GUI_DISABLE)
GuiCtrlSetState($Button_26, $GUI_DISABLE)
GuiCtrlSetState($Button_27, $GUI_DISABLE)
GuiCtrlSetState($Button_28, $GUI_DISABLE)
GuiCtrlSetState($Button_29, $GUI_DISABLE)
GuiCtrlSetState($Button_30, $GUI_DISABLE)
GuiCtrlSetState($Button_31, $GUI_DISABLE)
GuiCtrlSetState($Button_32, $GUI_DISABLE)
GuiCtrlSetState($Button_33, $GUI_DISABLE)
GuiCtrlSetState($Button_34, $GUI_DISABLE)
GuiCtrlSetState($Stop_Button, $GUI_DISABLE)
GuiCtrlSetState($Start_Button, $GUI_ENABLE)
Sleep(100)
EndFunc

But why if i press Pause it wont reset buttons ???

I need to go to school now ^^

Cya

(Back at 16:15 - 30)

Edited by AlmarM

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.

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