Jump to content

My GUI edit


Nova
 Share

Recommended Posts

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

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

  • Developers

- 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...