Jump to content
Sign in to follow this  
heygfy

InputBox help

Recommended Posts

heygfy

I am looking to make a small app that on run will popup an input box asking for a set of numbers.

15 minutes later I would like a second msgBox (I am guessing) to popup and display those numbers.

The first part I have running:

InputBox ( "Ticket NUmber", "Input your ticket number" , "", " M")

sleep(900000)

But I am not sure how to pull the numbers from the InputBox.

Any help would be great.

G

Share this post


Link to post
Share on other sites
jvanegmond

The InputBox returns a String and you have to store that String in a Variable, or the String is just forgotten.

Example:

$Input = InputBox ( "Ticket NUmber", "Input your ticket number" , "", " M")

Variable $Input now contains the return String from the InputBox.

To use this do this:

MsgBox(0, "Title", $Input)

I hope this was clear. Good Luck!

[spoiler:]

$Input = InputBox ( "Ticket NUmber", "Input your ticket number" , "", " M")
Sleep(10000000)
MsgBox(0, "Title", $Input)
Edited by Manadar

Share this post


Link to post
Share on other sites
marfdaman

You have to assign a variable to it, eg. $data = InputBox(blablabla), then sleep/set timer, and after a certain amount of time (15 minutes in your case) you could call a MsgBox(0, $data, $data) or something like that.


Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Share this post


Link to post
Share on other sites
heygfy

Great thank you both. One last part...

How would I make the output have more text then just the variable?

I was thinking something like....

MsgBox(0, "Reminder", "Here is your number" $Input) or

MsgBox(0, "Reminder", "Here is your number" + $Input)

but the first one crashes it and the second one only shows the text "Here is you number"

Thanks again

Share this post


Link to post
Share on other sites
herewasplato

MsgBox(0, "Reminder", "Here is your number " & $Input)

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites
heygfy

Wow, thanks all for the great and fast responses. :D

Share this post


Link to post
Share on other sites
herewasplato

Wow, thanks all for the great and fast responses. :D

You are welcome... I should also mention --- use & to join text (a string) and + to add numbers.

$a = 1 ;number

$a = "1" ;string

...and I added a space after your word number - before the "

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

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  

×