Sign in to follow this  
Followers 0
Aassdd

Show last input?

3 posts in this topic

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



#2 ·  Posted (edited)

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

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  
Followers 0