Phantomass Posted May 10, 2008 Share Posted May 10, 2008 Hello, i am a beginner in AutoIt.My question:In my GUI i created "GUICtrlCreateEdit", code:GUICtrlCreateEdit("Enter text here...",5 ,105 ,180, 90)This idle time field for entering the text...How do I do that text which I in he entered was is my variable $MyVariable?GUICtrlCreateEdit("$textmesarea", 5, 105, 180, 90) - does not work :[Show example plz...Thank! Sorry for my bad English... Link to comment Share on other sites More sharing options...
Developers Jos Posted May 10, 2008 Developers Share Posted May 10, 2008 GUICtrlCreateEdit($textmesarea, 5, 105, 180, 90) or use GuiCtrlSetData() Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Phantomass Posted May 10, 2008 Author Share Posted May 10, 2008 Can you me to give the example what change variable on text which I shall enter when shall press the button? Link to comment Share on other sites More sharing options...
John Posted May 10, 2008 Share Posted May 10, 2008 (edited) Jos said: #include <GUIConstants.au3> GUICreate("Cmd",500,400) Dim $txt=GUICtrlCreateEdit("Enter text here... Wait 5 seconds..",0,0,500,400) GUISetState(@SW_SHOW) enterText() While 1 $msg=GUIGetMsg() If $msg=$GUI_EVENT_CLOSE Then ExitLoop WEnd Func enterText() Sleep(5000) GuiCtrlSetData($txt,"Text has been entered.") EndFunc ETA: There are lots and lots of working code segements just like this in the helpfile. Just put your cursor on the command in scite and hit F1. Edited May 10, 2008 by John Link to comment Share on other sites More sharing options...
Phantomass Posted May 10, 2008 Author Share Posted May 10, 2008 I do not understand :[ Link to comment Share on other sites More sharing options...
Developers Jos Posted May 10, 2008 Developers Share Posted May 10, 2008 I do not understand :[Which part is it you don't understand or is it all of it ? Have you opened the helpfile on the provided functions and looked at the descriptions and examples ? Would help when you are more specific. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Phantomass Posted May 10, 2008 Author Share Posted May 10, 2008 Programm copy - insert...I write text for copying in clipboard, in window #1.I write name a window in which me it is necessary to insert text, in window #2.I press "Copy" and is copied text which I carried in window #1 ($text).I press "Paste in window" and is switched on window which I carried in window #2 ($progname) & is inserted text which I have copied "Button Copy".as?I have done picture...Help plz... Link to comment Share on other sites More sharing options...
covaks Posted May 10, 2008 Share Posted May 10, 2008 ? Is this what you're trying to do? $hWnd = GuiCreate("") $hEdit1 = GuiCtrlCreateEdit("",5,5,395,20) $hEdit2 = GuiCtrlCreateEdit("",5,40,395,20) $hButton1 = GuiCtrlCreateButton(" Copy ",5,70) $hButton2 = GuiCtrlCreateButton("Paste in Window",50,70) GuiSetState() While 1 $msg = GUIGetMsg() Switch $msg Case -3 Exit Case $hButton1 ClipPut(GuiCtrlRead($hEdit1)) Case $hButton2 WinActivate(GUICtrlRead($hEdit2)) Send("^v{ENTER}") EndSwitch WEnd Link to comment Share on other sites More sharing options...
Phantomass Posted May 10, 2008 Author Share Posted May 10, 2008 ? Is this what you're trying to do? $hWnd = GuiCreate("") $hEdit1 = GuiCtrlCreateEdit("",5,5,395,20) $hEdit2 = GuiCtrlCreateEdit("",5,40,395,20) $hButton1 = GuiCtrlCreateButton(" Copy ",5,70) $hButton2 = GuiCtrlCreateButton("Paste in Window",50,70) GuiSetState() While 1 $msg = GUIGetMsg() Switch $msg Case -3 Exit Case $hButton1 ClipPut(GuiCtrlRead($hEdit1)) Case $hButton2 WinActivate(GUICtrlRead($hEdit2)) Send("^v{ENTER}") EndSwitch WEnd Yes! Big thanks & thanks all! 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