Jump to content

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>

$Admin = GUICreate("Admin", 234, 168, 192, 229, $GUI_SS_DEFAULT_GUI, BitOR($WS_EX_OVERLAPPEDWINDOW,$WS_EX_TRANSPARENT,$WS_EX_WINDOWEDGE))
    GUISetBkColor(0xB4B4B4)
    $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)
    GUISetState(@SW_SHOW)

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

While 1
    $msg = GUIGetMsg(1)
        Switch $msg[0]
        Case $GUI_EVENT_CLOSE
            Exit
        Case $exit
            GUIDelete($Admin)
            Exit
    EndSwitch
WEnd

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

Func CMD_2();
    GUICtrlSetData($cmd, "Line 3" & "{ENTER}")
    GUICtrlSetData($cmd, "Line 4" & "{ENTER}")
EndFunc
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

×
×
  • Create New...