Sign in to follow this  
Followers 0
skilzrulz

Popup box that you could input values.

2 posts in this topic

Ok so lets say I want something like this. It would have you pick a number, EG: (pick a number between: (10-30)), and then the input of that would be like $input1

so you could put it in something like Int(Random(1,$input1)) When you open the prog it would ask, "picka number between blah blah blah" then the program would start after you inputed that.

Any ideas on how to do that?

thx for great support on autoit forums

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

$min=10
$max=30

Do
$guess=int(InputBox ("Pick a number","between " & $min & " and " &$max) )
Until $guess>=$min and $guess<=$max
$ran=int(random($min,$max+1))
MsgBox(1,"Your guess was " & $guess,"The number I was thinking was "&$ran)

or if you want a game,

$min=10
$max=30

$ran=int(random($min,$max+1))

Do
$guess=int(InputBox ("Pick a number","between " & $min & " and " &$max) )
If $guess>$ran Then MsgBox(1,"Nice guess but..","my number is lower")
If $guess<$ran Then MsgBox(1,"Nice guess but..","my number is higher")
Until $guess=$ran
MsgBox(1,"Hurray!!" ,"You guessed the number I was thinking "&$ran)
Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

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