Nova Posted November 20, 2004 Share 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 Link to comment Share on other sites More sharing options...
scriptkitty Posted November 20, 2004 Share 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. Link to comment Share on other sites More sharing options...
Developers Jos Posted November 20, 2004 Developers Share 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. 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