Jump to content

Recommended Posts

Hi, is there an example script where you get to insert text into a user input box, then auto it would populate it? I don't want to insert a static text, I want it to be dynamic that's my goal.

 

Would that be possible? I am just starting to use AUTOIT, and automating some of the things.

Share this post


Link to post
Share on other sites
Just now, Parthptl said:

Hi, is there an example script where you get to insert text into a user input box, then auto it would populate it? I don't want to insert a static text, I want it to be dynamic that's my goal.

 

Would that be possible? I am just starting to use AUTOIT, and automating some of the things.

Do you want to randomize the input each time or have the program read the input box and store it as a variable?

 

Regards,

Supra

Share this post


Link to post
Share on other sites

You would need something like: _GUICtrlComboBox_AutoComplete Or use something like below:

 

Share this post


Link to post
Share on other sites
Just now, Subz said:

You would need something like: _GUICtrlComboBox_AutoComplete Or use something like below:

 

I'm after reading the thread, and it seems like he is trying to store the input in a variable. Would I be correct in saying that? If yes, I can follow up with some code.

 

Regards,

Supra

 

Share this post


Link to post
Share on other sites

I thought he was referring to autocomplete, although I could be wrong, and yes no need to ask if you want to follow up with some code ,:thumbsup:

Share this post


Link to post
Share on other sites

supraaxdd,

When you reply in future, please use the "Reply to this topic" button at the top of the thread or the "Reply to this topic" editor at the bottom rather than the "Quote" button - responders know what they wrote and it just pads the thread unnecessarily. Thanks in advance for your cooperation.

M23

 


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
1 minute ago, Melba23 said:

supraaxdd,

When you reply in future, please use the "Reply to this topic" button at the top of the thread or the "Reply to this topic" editor at the bottom rather than the "Quote" button - responders know what they wrote and it just pads the thread unnecessarily. Thanks in advance for your cooperation.

M23

 

Will do so in the future. Sorry for the inconvienience.

 

Regards,

Supra

Share this post


Link to post
Share on other sites
Posted (edited)

Try this:

#include <GUIConstants.au3>


$vMainGUI = GUICreate ( "Select a Category", 400, 300) ; will create a dialog box that when displayed is centered
$ButtonExit = GUICtrlCreateButton("Exit", 310, 260, 80, 30)
$ButtonConfirm = GUICtrlCreateButton("Proceed", 220, 260, 80, 30)

$val_discount = GUICtrlCreateInput ( "Enter Discount", 100, 130, 200)
GUISetState (@SW_SHOW) ; will display an empty dialog box

; Run the GUI until the dialog is closed

While 1
    $nMsg = GUIGetMsg()
        Switch $nMsg

            Case $ButtonExit
                Exit

            Case $ButtonConfirm
                ComboRead()

        EndSwitch
Wend

Func ComboRead() ;This function checks what is chosen in the combobox and stores it as a variable.


            Global $discount = GUICtrlRead($val_discount)
            MsgBox(0,"","You have typed in: " & $discount)

EndFunc ;==> ComboRead

Edit: I forgot to change the "Enter Discount" part. It won't change anything, it's just what is inside the input box when you first open up the GUI.

Edited by supraaxdd

Share this post


Link to post
Share on other sites
6 hours ago, supraaxdd said:

Do you want to randomize the input each time or have the program read the input box and store it as a variable?

 

Regards,

Supra

Yes, I would like to store it as a variable. 

Share this post


Link to post
Share on other sites
Posted (edited)

The script above takes the input and stores it as a variable for later use. In this case, I made a MsgBox that say the variable. Play around with it, that will be the best ways to learn.

Best of luck!

 

Regards,

Supra

Edited by supraaxdd

Share this post


Link to post
Share on other sites

Always there to help! Remember that if you have any problems, ask the community. These guys are amazing. Just as a heads up, I recommend that you read the Forum rules because sanctions are tough sometimes if you break a rule!

 

Regards,

Supra

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

×
×
  • Create New...