Sign in to follow this  
Followers 0
bigassmuffin

random number between 0 and input

3 posts in this topic

#1 ·  Posted (edited)

I have this script, In it any line marked with a ";" (or in green) explains what I need help with..

; Script generated by AutoBuilder 0.6 Prototype

#include <GuiConstants.au3>

Opt("WinTitleMatchMode",2)
WinWaitActive("[Conquer2.0]")
$game = 0
$seconds = (guictrlread($Input_6) * 1000)
HotKeySet("{ESC}", "quit")


GuiCreate("MyGUI", 171, 84,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Button_1 = GuiCtrlCreateButton("Start", 10, 60, 60, 20)
$Button_2 = GuiCtrlCreateButton("Exit", 100, 60, 60, 20)
$Label_4 = GuiCtrlCreateLabel("Wait up to ", 10, 30, 50, 20)
$Label_5 = GuiCtrlCreateLabel("seconds", 120, 30, 40, 20)
$Input_6 = GuiCtrlCreateInput("Input6", 70, 30, 40, 20, $ES_NUMBER)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button_2
        Exit
    Case $msg = $Button_1
        Play()
    EndSelect
WEnd
Exit

While 1
;   Input_6 check if its a number if not play Func Only Number()
;   If Input_6 is a number Then
            WinWaitActive("Instruction")
            Send({Enter})
;           Sleep(Random number between 0 and $seconds)
            MouseClick("Left", 127, 186, 1, 0)
        EndIf
    EndIf
Wend


Func Only Numbers()
    MsgBox(4096, "Not a Number", "Invalid character, please make sure you placed in a ->number<-")

Func Play()
    If $game < 1 Then
        $game = $game + 1
    Else
        $game = 0
    EndIf
EndFunc

Func quit()
    Exit
EndFunc

THANKS!

Edited by bigassmuffin

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

$Input_6 = GuiCtrlCreateInput("Input5", 70, 30, 40, 20, $ES_NUMBER)

a number is required

$seconds = (guictrlread($Input_6) * 1000)

after the input to $input_6 has been placed by user

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

$Input_6 = GuiCtrlCreateInput("Input5", 70, 30, 40, 20, $ES_NUMBER)

a number is required

$seconds = (guictrlread($Input_6) * 1000)

after the input to $input_6 has been placed by user

8)

Alrighyt, thank you, added that in the script, still a few more thigns to be fixed..

THANKS AGAIN!

Edited by bigassmuffin

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