Jump to content

Search the Community

Showing results for tags 'input'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • Forum
  • AutoIt


  • Community Calendar

Found 39 results

  1. Hello... How i can write data from txt to +3 Input? Example: In txt i have: Michael XYZ, 21, Boston Olex Marshal, 17, Boston Alex XYZ, 19, Boston And now i want load that data to input in autoit. Name y.o city [ Input1] [Input2] [Input3] [ Input4] [Input5] [Input6] [ Input7] [Input8] [Input9] After load should be: Name y.o city [Michael XYZ] [21] [Boston] [ Olex Marshal] [17] [Boston] [ Alex XYZ] [19] [Boston] FileOpen("Test.txt",0)                          $aas = GUICtrlSetData($Input1, FileReadLine("Test.txt",1))             FileClose("Test.txt") But its wrong. ofcourse its load all to input 1. So now how do you load this data directly into each input separately? The comma stop sign is here. Each line is a new person
  2. Hi All: How to set the input border color? tks in advance
  3. Hello Guys this is my gui and i need the numeric value typed in the highlighted inputbox. if this value is greater than 1 i need to perform some operations \ Here is the summary about that field which i got from wininfo tool i tried writing the code as shown below.. but the msgbox is popping up empty value..when the same code is pasted under some button action i am able to access the value present in the field..but when placed alone as written in the attached script i am unable to fetch it... here i am using the valu present in the field can you guys tell me what's wrong??? or how can i get that value? My_GUI.au3
  4. Hey, i would like to set a value into an INPUT field. Checked the _IEFormElementSetValue function but that does require _IEFormGetObjByName and this is where the problem comes in. The input field I want to write to is not a part of a form tag. It is part of a table. <input type="text" class="w2" id="nabidka_vozidel_formular_tach_od" name="nabidka_vozidel_formular_tach_od" onchange="GLOBAL.pocetInzerceNZ(&quot;nabidka_vozidel_formular&quot;,&quot;tach_od&quot;,&quot;&quot;);" autocomplete="off"> I tried this but that didn't work: $oDownloadSamples = _IEGetObjById($oIE, "nabidka_vozidel_formular_tach_od") _IEFormElementSetValue($oDownloadSamples, "123") If you want to try the site I'm working with is https://www.tipcars.cz/. There is a menu on the top left hand side and if you click the "vyhledat" button the input fields will show up. Thanks
  5. i'm trying to create a program that let's the user type a word in an input field (gui) and when a button is pressed the letters of the word are replaced by 1 word each from a list of words in a text file i created the gui for it but i need help to add some more code to make it work like intented each letter of a word should be replaced by a word from a text file the text file is a source for replacing letters is a file with 2 columns separated by tab that contains the entire alphabet (26 rows) please help if possible i posted an example gui screenshot
  6. hello Greetings to all dears i have a big problem in the bass.dll e.g If you play an audio file using the bass.dll and You changed the audio output Such as setting or removing headphones The sound output of bass.dll does not change Is there any solution If it exists, please give it to me Greetings and thanks in advance I apologize for my bad English
  7. I have 2 items (a field box and a bypass checkbox). every time the box is checked i need the field to become writable. unchecked is read only displaying some text. this is as far as i got as I am stuck at making it read/write toggle #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <EditConstants.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("Test", 500, 500) Global $hCombo = GUICtrlCreateInput("", 10, 10, 200, 20, BitOR($ES_AUTOHSCROLL,$ES_READONLY)) GUICtrlSetBkColor($hCombo,0xe7e5e5) Global $cbox = GUICtrlCreateCheckbox ("", 40,50,10,20) GUICtrlSetState($cbox, $GUI_Unchecked) GUISetState() Global $sCurrCombo = "" While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cbox If GUICtrlRead($cbox) <> $sCurrCombo Then $sCurrCombo = GUICtrlRead($cbox) GUICtrlSetStyle ($hCombo, $SS_LEFTNOWORDWRAP) GUICtrlSetBkColor($hCombo,0xFFFFFF) MsgBox(0, "Choice", "PLease enter the text") EndIf EndSwitch WEnd
  8. Good morning I'm working with a popup GUI, which shows some data, that is read-only display... On the event "click on a button", I'd like to change the style of the Input to Read-only to Editable... Any suggestions? Thanks
  9. Hello. I've got a problem. I want to center my input vertically, but I don't have any single idea how to do it. There's my example code: #include <GUIConstantsEx.au3> $GUI = GUICreate("Gui", 237, 93, 192, 124) $Input1 = GUICtrlCreateInput("Center vertically isn't correct", 16, 16, 201, 62) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd What could I do? Greetings, "genotypek".
  10. I'm having trouble in making an input box where I can limit the characters that can be inputted. Anybody have an idea how this can be done in Auto IT? Specifically I would like to create an input field where the user would enter a MAC address. What I would like to do is to limit the characters that can be inputted to only HEX values (A-F and 0-9 as well as the - character). This is so that the user cannot input invalid characters. The program is going to be used by very non-technical people, so the idea is to remove as many chances for errors that we can think of. I would also prefer to limit the field to only 17 characters, so that there is only enough space to enter the MAC address with the - character as the separator. Thank you all in advance for any suggestions!
  11. Hi Guys, i am working on a translation app. There are a couple of regular input fields with text that the user is supposed to change to a new language. I want to change the color of the input field as soon as the user leaves the input field. Is there a way to do that? I know how to do this with a button, but i don't know how i can work with focus. Has any of you done something like this before? Thanks!
  12. Hi, I have an input box which is disabled, and populates with a value after a button is pressed. I want to leave this box disabled after there is a value in it, but still allow the user to right click and copy the boxes contents, is this kind of thing possible somehow?
  13. Hi, iam not able to "activate" (the blue border of the edit control should be displayed) the created input control when clicking on a listview item. All i want is, when the edit control is created, it's active (blue border displayed) and you can directly write in it (cursor at the end), but i can't get it work. Can someone help? #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include <WindowsConstants.au3> #include <GuiEdit.au3> #include <Misc.au3> Global $Debug_LV = False ; Check ClassName being passed to ListView functions, set to True and use a handle to another control to see it work Global $bChanged = False, $hDLL = DllOpen("user32.dll") Global $aClick_Info[2] Global $hListView, $hTmp_Edit Global $GUI, $hImage $GUI = GUICreate("(UDF Created) ListView Create", 400, 300) $hListView = _GUICtrlListView_Create($GUI, "", 2, 2, 394, 268) _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES)) GUISetState() GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") ; Load images $hImage = _GUIImageList_Create() _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0xFF0000, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0x00FF00, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0x0000FF, 16, 16)) _GUICtrlListView_SetImageList($hListView, $hImage, 1) ; Add columns _GUICtrlListView_InsertColumn($hListView, 0, "Column 1", 100) _GUICtrlListView_InsertColumn($hListView, 1, "Column 2", 100) _GUICtrlListView_InsertColumn($hListView, 2, "Column 3", 100) ; Add items _GUICtrlListView_AddItem($hListView, "Row 1: Col 1", 0) _GUICtrlListView_AddSubItem($hListView, 0, "Row 1: Col 2", 1) _GUICtrlListView_AddSubItem($hListView, 0, "Row 1: Col 3", 2) _GUICtrlListView_AddItem($hListView, "Row 2: Col 1", 1) _GUICtrlListView_AddSubItem($hListView, 1, "Row 2: Col 2", 1) _GUICtrlListView_AddItem($hListView, "Row 3: Col 1", 2) ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) #forceref $hWnd, $iMsg, $iwParam Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo $hWndListView = $hListView If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView) $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $NM_CLICK ; Sent by a list-view control when the user clicks an item with the left mouse button Local $iIndex, $iSubItem, $sTmp_Text, $aRect, $aPos $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) $iIndex = DllStructGetData($tInfo, "Index") $iSubItem = DllStructGetData($tInfo, "SubItem") ; make sure user clicks on the listview & only the activate If $iIndex <> -1 And Not $bChanged Then $bChanged = True Local $iTimer = TimerInit() Local $iCounter = 1 Local $DOUBLE_CLICK_TIME_DELTA = 1200 While 1 If _IsPressed("01", $hDLL) Then $iCounter+=1 ConsoleWrite("_IsPressed - clicked." & @CRLF) ; Wait until key is released. While _IsPressed("01", $hDLL) WEnd ConsoleWrite("counter: " & $iCounter & " timer: " & TimerDiff($iTimer) & @CRLF) EndIf If $iCounter = 2 And TimerDiff($iTimer) < $DOUBLE_CLICK_TIME_DELTA Then ConsoleWrite("yes." & @CRLF) ExitLoop EndIf If TimerDiff($iTimer) > $DOUBLE_CLICK_TIME_DELTA Then ConsoleWrite("over." & @CRLF) $bChanged = False Return 1 EndIf WEnd GUICtrlDelete($hTmp_Edit) $aClick_Info[0] = $iIndex $aClick_Info[1] = $iSubItem ;~ GUISetAccelerators($aAccelKeys) $sTmp_Text = _GUICtrlListView_GetItemText($hWndListView, $iIndex, $iSubItem) ConsoleWrite("item: " & $iIndex & " subitem: " & $iSubItem & " text: " & $sTmp_Text & @CRLF) If $iSubItem = 0 Then $aRect = _GUICtrlListView_GetItemRect($hWndListView, $iIndex, 2) Else $aRect = _GUICtrlListView_GetSubItemRect($hWndListView, $iIndex, $iSubItem) EndIf $aPos = ControlGetPos("", "", $hWndListView) ConsoleWrite("Information :" & StringFormat("Item 2 Rectangle : [%d, %d, %d, %d]", $aRect[0]+ $aPos[0], $aRect[1]+ $aPos[1], $aRect[2], $aRect[3]) & @CRLF) $hTmp_Edit = GUICtrlCreateEdit($sTmp_Text, $aRect[0] + $aPos[0], $aRect[1] + $aPos[1], $aRect[2] - $aRect[0], $aRect[3] - $aRect[1], 0) GUICtrlSetState($hTmp_Edit, $GUI_FOCUS+$GUI_SHOW+$Gui_ontop) _GUICtrlEdit_SetSel(GUICtrlGetHandle($hTmp_Edit), 2, 15) EndIf EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY
  14. This function parser printing-like intervals (like "1,2,3-5") and returns an array with every page number as item. Ex.: "1,2,3-5" will return an array which 0th element is "5" (page count) and the items are 1, 2, 3, 4 and 5. The array is given in the order the $interval parameter is set, and reverse intervals are also supported (e.g.: "8,4,7-5" will return items 8, 4, 7, 6, 5 and 0th element is 5). If it fails, it will return False and set error to non-zero (invalid string). #cs Range parser This function parser printing-like intervals (like "1,2,3-5") and returns an array with every page number as item. @author Jefrey S. Santos <jefrey[at]jefrey.ml> #ce Func rangeparser($interval) $interval = StringReplace($interval, " ", "") If Not StringRegExp($interval, "([0-9\-\,])") Then Return SetError(1, 0, False) $interval = StringSplit($interval, ",") Dim $return[1] For $i = 1 To $interval[0] If StringInStr($interval[$i], "-") Then $split = StringSplit($interval[$i], "-") If $split[0] <> 2 Then Return SetError(1, 0, False) If $split[1] = $split[2] Then ReDim $return[UBound($return)+1] $return[UBound($return)-1] = $split[1] Else If $split[1] < $split[2] Then $step = +1 Else $step = -1 EndIf For $j = $split[1] To $split[2] Step $step ReDim $return[UBound($return)+1] $return[UBound($return)-1] = $j Next EndIf Else ReDim $return[UBound($return)+1] $return[UBound($return)-1] = $interval[$i] EndIf Next $return[0] = UBound($return)-1 Return $return EndFunc
  15. Hello everyone, i am working atm at a small programm, i want to make it work like this: I click on "NEW" i can add a new Customer, i want to read the input and save it (the thing is i want to make it work for me and my friend in the internet so i think we need a internet database but firstly i want to make it work on my laptop only for me) i dont know in what to save it cuz "txt" is a bit weird , why? becouse later i want to make a button which search for the "customer" if i press on the other button not "NEW", if i press on "Search", then i have to write the customers name in, and the info i got from the customer has to show up and be changeable. i hope someone understand my poor english xD , well here is the script which is not finisht cuz i dont know how to finish the idea. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $GUI = GUICreate("Form1", 429, 148, 249, 151) $NEW = GUICtrlCreateButton("NEW", 48, 24, 75, 25) $Search = GUICtrlCreateButton("Search", 48, 54, 75, 25) $SAVE = GUICtrlCreateButton("SAVE", 328, 112, 75, 25) $EDIT = GUICtrlCreateButton("EDIT", 328, 112, 75, 25) GUISetState(@SW_SHOW, $GUI) GUICtrlSetState ($SAVE, $GUI_HIDE) GUICtrlSetState ($EDIT, $GUI_HIDE) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $NEW GUICtrlSetState ($SAVE, $GUI_SHOW) _NewCustomer() Case $Search GUICtrlSetState ($EDIT, $GUI_SHOW) _SearchCustomer() Case $SAVE ;not completed yet cuz i dont know in which format to save it to ;read it again in the GUI to make it edit able. EndSwitch WEnd Func _SearchCustomer() $Input2 = GUICtrlCreateInput("", 136, 57, 121, 21) EndFunc Func _NewCustomer() $Input1 = GUICtrlCreateInput("", 136, 27, 121, 21) EndFunc test functions.au3
  16. Hello, I am trying to create an input box that when a user types something like the character "." that it will prevent that character from entering the input box and display a message stating why the input was prevented. Something like what $ES_NUMBER style does for the input box, but for a floating point number. I can work out the logic of how to do that, but I am not yet sure how to correctly capture keyboard input before it arrives IN the input box. This should only run on the particular input box in question as it is an aid to help clean up user input before it gets sent to a SQL query. I was hoping for something like: $msg = GUIGetMsg() Switch $msg Case $keyboardInput ; pre processing function called hereI have searched for something similar to this but I cannot seem to find one that does exactly what I am looking for. Any help is appreciated. Thanks, K
  17. CSV to Webform

    Good morning, Apologies if this thread already exists or I've completely missed the answer in a similar thread. I'm new to Autoit since yesterday, albeit that I've had an account for 3 years, I'm only starting to get into it. I am trying to create a script which will read my CSV row by row and create a variable per cell on that row. In my job I'm going to need to fill out a webform 100 times over so I would like to input each variable into my chosen field on this webform and repeat. I've been playing with AutoIT and this is what I've done so far, am I on the right track? I was thinking of using the StringSplit functions but I am a bit clueless to be honest. Any help would be Great to get me started. #include <file.au3> #include <FileConstants.au3> #include <array.au3> _BrowseForFile() Global $aOutput, $FilePath _FileReadToArray ($FilePath,$aOutput,4,",") _ArrayDisplay($aOutput) Func _BrowseForFile() ;Sets $FilePath global $FilePath=FileOpenDialog("Browse for CSV",@DesktopDir,"csv files (*.csv)",$FD_MULTISELECT + $FD_FILEMUSTEXIST) EndFunc
  18. Assume a simple gui with one input. I have the usual code using a while loop: While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $Input consolewrite("Input triggered" & @CRLF) endswitch wend What I want to achieve is this. When a user enters text in the input ad presses enter, it triggers. However, if they enter or change the input and then click somewhere else, without hitting enter in only that input box, it will not trigger. What is the best way to do this? My best idea so far is to ho a hotkeyset("{enter}", "inputhandler"), but then I need to check the window and keep unsetting / send enter / setting it if they hit enter in another window. Is there a better way?
  19. How can I get input from the user when my program is compiled as a CUI? Thanks in advance, TD
  20. Hello all, i have another question. My script not working, how is it correct ? Need script for this: If is Input 2 empty then call function odoslat() Else call function obrazok2() Thanks for help Func obrazok1() Local $oForm = _IEFormGetObjByName ($oIE, "formpridani") $obrazok1 = GUICtrlRead($Input1) $obrazok2 = GUICtrlRead($Input2) $oUpload = _IEGetObjByName($oForm, "souborp") Sleep (500) _IEAction($oUpload, "focus") Send("{SPACE}") Sleep (500) Send($obrazok1) Send("{Enter}") If $obrazok2 = (0) Then Call ("odoslat") Else Call ("obrazok2") EndIf EndFunc
  21. Hi all, So ive had a form for a while now, which the input boxes don't always display correctly, easiest way is to show you so plz see example.png As you can see all the input boxes except for the third column are not showing correctly, if I hover my mouse over them they then do, which is what I did for the boxes in the third row for the example. Anyone got any idea of the cause and the fix?
  22. HI, I cannot work out how to connect to the input box on this link: https://cms.bskyb.2wire.com/manage/login My usual method is in my code but it does not seem to find the elements I need to connect with. I can see that "text" and "password" are on the page but im confused about putting input to it. Can someone point me in the right direction? Kind Regards Dave #include <IE.au3> #include <MsgBoxConstants.au3> $PACE = _IEAttach("https://cms.bskyb.2wire.com/manage/login", "url") If @error Then MsgBox($MB_SYSTEMMODAL, "Error", "PACE not attached") $PACE =_IECreate("https://cms.bskyb.2wire.com/manage/login") EndIf $colForms = _IEFormGetCollection ($PACE ) For $oForm In $colForms $colElements = _IETagNameAllGetCollection ( $oForm ) For $oElement In $colElements If StringInStr ( $oElement.getAttribute ( "tkPid", 2 ), "PID19" ) <> 0 Then MsgBox(0, "Result", "Success") _IEFormElementSetValue($oElement, "username") ;~ _IEAction ( $oElement, "click" ) Else EndIf If StringInStr ( $oElement.getAttribute ( "__eventBits=", 2 ), "7409" ) <> 0 Then MsgBox(0, "Result", "Success") _IEFormElementSetValue($oElement, "password") ;~ _IEAction ( $oElement, "click" ) Else EndIf Next Next Local $oInputs = _IETagNameGetCollection($PACE, "input") Local $sTxt = "" For $oInput In $oInputs $sTxt &= $oInput.type & @CRLF if $oInput.type = "text" Then EndIf Next MsgBox($MB_SYSTEMMODAL, "Form Inqput Type", "Form: " & $oInput.form.name & @CRLF & @CRLF & " Types :" & @CRLF & $sTxt)
  23. How to click the tag <input type="submit" name="submit" id="submit" value="Publish this ad"> on this kind of form? <form name="publish_form" id="publish_form" method="post" action="http://www.example.com/jobs/publish/xxxxx/"> <fieldset> <div class="right"> <div class="suggestion">If you changed your mind, you may <a href="http://www.example.com/jobs/deactivate/xxxxx/" title="cancel posting this ad">cancel posting this ad</a></div> </div> <input type="submit" name="submit" id="submit" value="Publish this ad"> &nbsp;or&nbsp; <a href="http://www.example.com/jobs/post/xxxxx/" title="Edit it">Edit it</a> </fieldset> </form> I already tried this code: #include <IE.au3> Local $oForm = _IEFormGetObjByName($oIE, "publish_form") Sleep(2000) _IEFormSubmit($oForm) But it caused a problem: --> IE.au3 T3.0-1 Error from function _IEFormSubmit, $_IEStatus_COMError (-2147352573) Is there any other way to submit that kind of form?
  24. I am taking some idea from here: '?do=embed' frameborder='0' data-embedContent>> But what I am looking to accomplish is simple, I want to have an input box with a hidden input box below it. I will also have a defined list of items. When the text box has any value in it that does not directly equal an item in the pre defined list, the edit box should show. and populate suggested items based on whats being typed which I will do that part later, should be easy. I am stuck on a simple portion which should be easy and i'm not sure why I am having trouble with it. The way thr code below should work is, as long as there is a value in the Input box, the edit box will appear, if there is no value in the input box, the edit box should be hidden. here is what I have so far: #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 615, 438, 192, 124) $Input1 = GUICtrlCreateInput("", 64, 72, 313, 21) $Edit1 = GUICtrlCreateEdit("", 64, 96, 313, 177) GUISetState(@SW_SHOW) GUICtrlSetState($Edit1, $GUI_HIDE) While 1 $words = GUICtrlRead($Input1) If $words NOT = "" then GUICtrlSetState($Edit1, $GUI_SHOW) else GUICtrlSetState($Edit1, $GUI_HIDE) endif $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd func flopdrop() If BitAnd($Edit1,2) AND $words = "" Then GUICtrlSetState($Edit1, $GUI_HIDE) Else GUICtrlSetState($Edit1, $GUI_SHOW) EndIf endfunc the problem with this is a nasty flicker when you move the mouse or do anything else. I will get rid of the scroll bars too, but thats once I solve this flicker issue. I know its happening because I have the check being performed within the While statement, but I can't think of any other way to do it.. I even tried using a timer to only check once every few seconds, but that didn't seem to work either: If $words NOT = "" AND (@SEC = 00 OR 10 OR 20 OR 30 OR 40 OR 50) AND (@MSEC < 20)) Then ; Blah blah blah endIf Does anyone have any thoughts or has anyone been able to do this? Thanks in advance!!
  25. I created a search GUI with an InputBox and a Button to empty the input box. I read the inputbox using GuiCtrlRead and empty the input box using GUICtrlSetData. When I click a search button or click the "empty inputbox" button, everything works fine. However after having done the 1st search and I click again on the search button or whatever other button the input box field is not updated GUICtrlRead($RWSearch) --> gives a value '0' What did I wrong? Same thing when I empty the input box. The 1st time it works well. When I empty the inputbox after having done a search it doesn't work anymore. Nothing happens. My search GUI is always on TOP so I don't reuse the hotkey between searches. (The GUI is not deleted after a search), My code: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <String.au3> #include <GuiButton.au3> #include <Constants.au3> HotKeySet("^4", "searchmenu") While 1 Sleep(10000) WEnd Func searchmenu() global $url Send("^c") $InEditBox = ClipGet() ;========GUI============= $Form5 = GUICreate("Search Menu", 345, 410, 100, 100) $RWSearch = GUICtrlCreateInput($InEditBox, 16, 10, 270, 25) $clipc = GUICtrlCreateButton("x", 300, 10, 15, 20) $textGoogle = GUICtrlCreateLabel("Google:", 20, 50, 100, 20) $bsearch = GUICtrlCreateButton("Search", 110, 50, 60, 20) $bimages = GUICtrlCreateButton("Images", 175, 50, 60, 20) GUISetState(@SW_SHOW) ;========GUI============= While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GuiDelete($Form5) ExitLoop Case $clipc ; empty inputbox GUICtrlSetData($RWSearch, "") Case $bsearch ; search text in google $RWSearch = GUICtrlRead($RWSearch) $RWSearch = StringRegExpReplace($RWSearch, "(\s+)", "+") $url = "https://www.google.com/search?q=" & $RWSearch SearchMenuExec() Case $bimages ; search images in google $RWSearch = GUICtrlRead($RWSearch) $RWSearch = StringRegExpReplace($RWSearch, "(\s+)", "+") $url = "http://images.google.com/images?hl=en&q=" & $RWSearch SearchMenuExec() EndSwitch WEnd EndFunc Func SearchMenuExec() ClipPut($url) ShellExecute($url) EndFunc