Parthptl Posted May 9, 2019 Share Posted May 9, 2019 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. Link to comment Share on other sites More sharing options...
supraaxdd Posted May 9, 2019 Share Posted May 9, 2019 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 Link to comment Share on other sites More sharing options...
Subz Posted May 9, 2019 Share Posted May 9, 2019 You would need something like: _GUICtrlComboBox_AutoComplete Or use something like below: Link to comment Share on other sites More sharing options...
supraaxdd Posted May 9, 2019 Share Posted May 9, 2019 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 Link to comment Share on other sites More sharing options...
Subz Posted May 9, 2019 Share Posted May 9, 2019 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 , Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 9, 2019 Moderators Share Posted May 9, 2019 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 supraaxdd 1 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
supraaxdd Posted May 9, 2019 Share Posted May 9, 2019 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 Link to comment Share on other sites More sharing options...
supraaxdd Posted May 9, 2019 Share Posted May 9, 2019 (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 May 9, 2019 by supraaxdd Link to comment Share on other sites More sharing options...
Parthptl Posted May 10, 2019 Author Share Posted May 10, 2019 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. Link to comment Share on other sites More sharing options...
supraaxdd Posted May 10, 2019 Share Posted May 10, 2019 (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 May 10, 2019 by supraaxdd Link to comment Share on other sites More sharing options...
Parthptl Posted May 10, 2019 Author Share Posted May 10, 2019 Thanks everyone and supraaxdd! Appreciate it. supraaxdd 1 Link to comment Share on other sites More sharing options...
supraaxdd Posted May 10, 2019 Share Posted May 10, 2019 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now