Nova 0 Posted November 20, 2004 Im sure thsi is something really simple and im going to kick myself when I find out what im doing wrong but here goes anyway ! How can I make the text sent to a GUICtrlEdit appear letter by letter as if its being typed ? The below code makes all lines of text appear at once ! Ive messed with SendKeyDelay,Send and ControlSend but I cant seem to get the effect im looking for ! #include <GUIConstants.au3> GUICreate("My GUI edit") ; will create a dialog box that when displayed is centered $Info=GUICtrlCreateEdit ("", 176,32,121,97,$ES_AUTOVSCROLL) GUISetState () Send ("Hello: This is my first GUI edit !") ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Share this post Link to post Share on other sites
scriptkitty 1 Posted November 20, 2004 Maybe something like this. I think controlsend is a bit better. #include <GUIConstants.au3> GUICreate("My GUI edit"); will create a dialog box that when displayed is centered $Info=GUICtrlCreateEdit ("", 176,32,121,97,$ES_AUTOVSCROLL) GUISetState () $send="Hello: This is my first GUI edit !" ; Run the GUI until the dialog is closed While 1 controlsend("My GUI edit","","Edit1",StringLeft($send,1)) $send=StringTrimLeft($send,1) sleep(300) $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend AutoIt3, the MACGYVER Pocket Knife for computers. Share this post Link to post Share on other sites
Jos 2,165 Posted November 20, 2004 - or use GUICTRLsetData like: #include <GUIConstants.au3> GUICreate("My GUI edit"); will create a dialog box that when displayed is centered $Info = GUICtrlCreateEdit("", 176, 32, 121, 97, $ES_AUTOVSCROLL) GUISetState(@SW_SHOW) Sleep(1000) ;opt("Sendkeydelay",500) $Txt = "Hello: This is my first GUI edit !" For $x = 1 To StringLen($Txt) GUIctrlsetdata($info,StringLeft($txt,$x)) Sleep(200) Next ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend 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. Share this post Link to post Share on other sites