#include <GUIConstantsEx.au3>
#include <EditConstants.au3>
$hGUI = GUICreate("Test Script", 300, 200)
$iLabel = GUICtrlCreateEdit("Data", 20, 20, 260, 160, $ES_READONLY, 0)
GUISetState(@SW_SHOW, $hGUI)
GUICtrlSendMsg($iLabel, $EM_SETSEL, -1, -1)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd