caramen Posted August 11, 2014 Share Posted August 11, 2014 (edited) Hello guys i whant to setup a GUICtrlSetData 2 time and make it in the same input box without erasing the first data how to explain better... I got one input box EMPTY [ ] If i push buttom 1 it set the input box like this [A] if i push buttom 2 also after 1 (BUT BUTTOM B SEND ONLY THE LETTER B .... ) Actualy B is erazing A i whant [AB] I tryed this Then GUICtrlSetData($Listen,$Listen & 'B') dont work... any help ? Edited August 11, 2014 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
MikahS Posted August 11, 2014 Share Posted August 11, 2014 (edited) If you take a look at the helpfile; Using: GUICtrlSetData will replace the text. I would try using this instead of the second call to GUICtrlSetData: #include <GuiListBox.au3> _GUICtrlListBox_InsertString($Listen, 'B', 0) Give that a try and see if that is any help. Edited August 11, 2014 by MikahS Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
caramen Posted August 11, 2014 Author Share Posted August 11, 2014 If you take a look at the helpfile; Using: GUICtrlSetData will replace the text. I would try using this instead of the second call to GUICtrlSetData: #include <GuiListBox.au3> _GUICtrlListBox_InsertString($Listen, 'B', 0) Give that a try and see if that is any help. I am not sure this is possible becose if i use Buttom B first that wont work there is 15 buttom possible so i need to hit any of them without erase anything ... any other solution? My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
MikahS Posted August 11, 2014 Share Posted August 11, 2014 (edited) I am not sure this is possible becose if i use Buttom B first that wont work there is 15 buttom possible so i need to hit any of them without erase anything ... any other solution? Make input box start with " " EDIT: if this does not help; I'm thinking posting your code will help us give you a better solution. Edited August 11, 2014 by MikahS Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
mikell Posted August 11, 2014 Share Posted August 11, 2014 $oldtext = GuiCtrlRead($input) GuiCtrlSetData($input, $oldtext & $newtext) Link to comment Share on other sites More sharing options...
caramen Posted August 11, 2014 Author Share Posted August 11, 2014 $oldtext = GuiCtrlRead($input) GuiCtrlSetData($input, $oldtext & $newtext) Nice one . i am trying right now and come back to you guys My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
czardas Posted August 11, 2014 Share Posted August 11, 2014 (edited) Exactly what Mikell said (beat me to it): ; #include <GUIConstantsEx.au3> Global $hGUI = GUICreate("test", 200, 100) Global $hInput = GUICtrlCreateInput("",10,10,180,20) Global $hBtnA = GUICtrlCreateButton("A", 10, 40, 40) Global $hBtnB = GUICtrlCreateButton("B", 60, 40, 40) GUISetState(@SW_SHOW) Global $msg, $sEditContents While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop ElseIf $msg = $hBtnA Then $sEditContents = GUICtrlRead($hInput) ; Read the contents of the input control GUICtrlSetData($hInput, $sEditContents & "A") ; Concatenate A ElseIf $msg = $hBtnB Then $sEditContents = GUICtrlRead($hInput) ; Read the contents of the input control GUICtrlSetData($hInput, $sEditContents & "B") ; Concatenate B EndIf WEnd ; Edit - spelling. Edited August 11, 2014 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
mikell Posted August 11, 2014 Share Posted August 11, 2014 Except that I was too lazy to write the complete script Link to comment Share on other sites More sharing options...
czardas Posted August 11, 2014 Share Posted August 11, 2014 Well, that's not like you Mikell. operator64 ArrayWorkshop 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