Jump to content
Sign in to follow this  

GUI Edit Window

Recommended Posts


Hello how can I send a {Enter} into the edit window ($cmd)? I tried it first with:

GUICtrlSetData($cmd, "Line 1" + "{ENTER}")

but it doesn´t work. Can someone help me please?

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>

    $exit = GUICtrlCreateButton("Close", 160, 136, 65, 25)
    $cmd = GUICtrlCreateEdit("",0, 0, 225, 137, $ES_AUTOVSCROLL + $WS_VSCROLL)
    GUICtrlSetData(-1, "")
    GUICtrlSetFont(-1, 10, 400, 0, "Candara")
    GUICtrlSetBkColor(-1, 0xE3E3E3)
    $cmd_clear = GUICtrlCreateButton("Clear", 9, 136, 65, 25)

HotKeySet("{f1}", CMD_1)
HotKeySet("{f2}", CMD_2)

While 1
    $msg = GUIGetMsg(1)
        Switch $msg[0]
        Case $GUI_EVENT_CLOSE
        Case $exit

Func CMD_1();
    GUICtrlSetData($cmd, "Line 1" & "{ENTER}")
    GUICtrlSetData($cmd, "Line 2" & "{ENTER}")

Func CMD_2();
    GUICtrlSetData($cmd, "Line 3" & "{ENTER}")
    GUICtrlSetData($cmd, "Line 4" & "{ENTER}")

Share this post

Link to post
Share on other sites

You're not sending data, you're setting it. Rather than "{ENTER}" try @CRLF

√-1 2^3 ∑ π, and it was delicious!

Share this post

Link to post
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
Sign in to follow this  

  • Similar Content

    • BogdanNicolescu
      By BogdanNicolescu
      While 1 / / / A whole bunch of codes found in help and here: https://www.autoitscript.com/autoit3/docs/ / / / WEnd OR:

      HotKeySet("{ESC}", "Terminate") While 1 MouseClick("Right",674,422) MouseClick("Left",673,447) Sleep(2000) / / / A whole bunch of codes found in help and here: https://www.autoitscript.com/autoit3/docs/ / / / MouseClick("Left",675,339) SLeep(3000) WEnd Func Terminate()     Exit 0 EndFunc  
      Sorry if i should't let this here to be found by newbies like me -.-'
    • santoshM
      By santoshM
      Dear friends i am facing a problem , i have created a window in autoit some time it is moving with the mouse curser even if iam not clicking the window 
    • sumanth1980
      By sumanth1980
      Here i am wrote a simple lines to install basic applications but when i clicked on one application/program to install it was working fine but when i cancel the program in the middle to install another program it was not working. I am not an expert in this but i want a solution for this ... Can any one help me on this....
    • PleaseHelpMEIWillLoveyou
      By PleaseHelpMEIWillLoveyou
      Is there a way to use a custom terminal or something from my pc and run a script on another pc.
      please let me know if its possible
      (not for anything bad just for a project im working on)
    • juniq
      By juniq
      Hey I'm writing on a script which places a link in the context menu so you can choose several mp3 files and rename them using id3 tag udf and year / time stuff variables.
      My problem: I'm renaming the files through "FileMove", But HOW can I get the current directory of the chosen files only? I can't use stringsplit cz there are more than 1 delimiter "\". and I can't trim the string because the stringlength changes every time. How can I get ONLY the directory where the files from $cmdline chosen are?