Jump to content
Sign in to follow this  
Aassdd

Show last input?

Recommended Posts

Aassdd

Here is my script:

$input = InputBox("asd", "website:", "", "", Default, 125)
If $input = ("google") Then ShellExecute("http://www.google.com/")
If $input = ("yahoo") Then ShellExecute("http://www.yahoo.com/")
If $input = ("autoit") Then ShellExecute("http://www.autoitscript.com/")

(it doesn't execute only once, it's a hotkey - so the input remains in the memory)

Is it possible to show the last input as the "default" parameter in the input box?

Share this post


Link to post
Share on other sites
weaponx

Thats easy.

Dim $lastInput = ""
$input = InputBox("asd", "website:",$lastInput, "", Default, 125)

$lastInput = $input

If $input = ("google") Then ShellExecute("http://www.google.com/")
If $input = ("yahoo") Then ShellExecute("http://www.yahoo.com/")
If $input = ("autoit") Then ShellExecute("http://www.autoitscript.com/")
Edited by weaponx

Share this post


Link to post
Share on other sites
Aassdd

Lol, I was trying the same thing but without using "Dim", I never understand what is used for. Only in vb with the calc example (Dim var as Integer) lol.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.