Sign in to follow this  
Followers 0
Guest jsw35

Default entry in inputbox

3 posts in this topic

Hi Gang,

Relative newcomer here. I've knocked up a script using AutoIt 2.64 that includes several Input Boxes. All works as intended. I would like to refine the script though, so that the Input boxes contain a default string on initial display. For example, if a box asks to an email address, my email address should automatically be displayed, so that if required, all the user needs to do is hit enter.

I have had a look on the forums and the Internet, and only found a little to help me. This includes the code found here:

http://groups.yahoo.com/group/AutoItList/message/1851

This sort of does what I want it to, but I can't understand how to get it to work.

Is there a quick way to accomplish this? My script has 3 input boxes, all of which require a default entry. Is there a way to do this easily?

Thanks

jsw35

Share this post


Link to post
Share on other sites



An edit control is easiest as you can see below:

ex.

$Minput=GUISetControl("edit", "type message here", 5, 195, 220, 70)

since this input is part of the "title" of it... or alternatively look up GUISetControlEx in the help file for more ideas as how to leave a check box checked or unchecked at the start etc

Share this post


Link to post
Share on other sites

Upgrade your code to version 3 and use this

InputBox ( "title", "Prompt" [, "Default" [, "password char" [, Width, Height [, Left, Top [, TimeOut]]]]] )

:ph34r:


Triton

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