232showtime Posted September 3, 2014 Share Posted September 3, 2014 (edited) sorry if i will ask a noob question again, is it possible to read the character that i typed in the input box which is not created by autoit??? I tried this one and its not working $1 = GUICtrlCreateButton("A", 32, 88, 75, 25) While 1 $x3 = GUICtrlRead("[CLASS:TEdit;INSTANCE:1]") Switch Case $1 ControlSend("Open", "", "[CLASS:Edit;INSTANCE:1]", $x3) endswitch wend Edited September 3, 2014 by 232showtime ill get to that... i still need to learn and understand a lot of codes Correct answer, learn to walk before you take on that marathon. Link to comment Share on other sites More sharing options...
Solution Muzaiyan Posted September 3, 2014 Solution Share Posted September 3, 2014 replace $hwnd with the window handle or window title $x3 = ControlGetText($hwnd,"","[CLASS:TEdit;INSTANCE:1]") Link to comment Share on other sites More sharing options...
232showtime Posted September 3, 2014 Author Share Posted September 3, 2014 (edited) hello muzaiyan i tried your code but it sends nothing even if there is a text in the inputbox... i dont know why, maybe because the window is not active? $1 = GUICtrlCreateButton("A", 32, 88, 75, 25) while 1 $x3 = ControlGetText("Documentation management system", "", "[CLASS:TEdit; INSTANCE:1]"); title to send $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $1 ControlSend("Open", "", "[CLASS:Edit;INSTANCE:1]", $x3) ; send the title from $x3 endswitch Wend gotta run thank you for replying.... Edited September 4, 2014 by 232showtime ill get to that... i still need to learn and understand a lot of codes Correct answer, learn to walk before you take on that marathon. Link to comment Share on other sites More sharing options...
Muzaiyan Posted September 3, 2014 Share Posted September 3, 2014 use AutoIt info tool to get the info about control check if window exists check value of @error after ControlGetText() check the value of $x3 after function call ControlGetText() Link to comment Share on other sites More sharing options...
MikahS Posted September 3, 2014 Share Posted September 3, 2014 (edited) You misspelled your variable name for the ControlGetText function call. "$x3" instead of "x3" 232showtime. Edited September 3, 2014 by MikahS 232showtime 1 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...
232showtime Posted September 4, 2014 Author Share Posted September 4, 2014 use AutoIt info tool to get the info about control check if window exists check value of @error after ControlGetText() check the value of $x3 after function call ControlGetText() its working now just got some typo error in controlid You misspelled your variable name for the ControlGetText function call. "$x3" instead of "x3" 232showtime. yes i misspelled the variable here, but in scite editor its correct. thanks.. ill get to that... i still need to learn and understand a lot of codes Correct answer, learn to walk before you take on that marathon. 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