Saagar 0 Posted June 23, 2010 I need code to set some text in an edit box control _GUICtrlEdit_SetText($hedit, test) Trying with the above function. please advice how to make a stmt. Share this post Link to post Share on other sites
sahsanu 28 Posted June 23, 2010 I need code to set some text in an edit box control_GUICtrlEdit_SetText($hedit, test)Hello,You should take a look to GUICtrlSetDataRegards,sahsanu Share this post Link to post Share on other sites
Andreik 66 Posted June 23, 2010 You need to use GUIEdit.au3 and the text to be between ' ' Search for _GUICtrlEdit_SetText() example in help file. When the words fail... music speaks Share this post Link to post Share on other sites
UEZ 1,278 Posted June 23, 2010 (edited) Here an example: expandcollapse popup#include <Constants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> Global $iMemo $hGUI = GUICreate("Test", 640, 480) $iMemo = GUICtrlCreateEdit("", 0, 0, 640, 480, $ES_AUTOVSCROLL + $WS_VSCROLL + $ES_READONLY) GUICtrlSetLimit(-1, 0x7FFFFFFF) GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New") GUISetState() $prg = "dir " $parameter = @SystemDir & " /s" $run = Run(@ComSpec & " /c " & $prg & $parameter, @ScriptDir, @SW_HIDE, $STDOUT_CHILD) While 1 $line = StdoutRead($run) If @error Then ExitLoop MemoWrite($line) Wend While 1 $Msg = GUIGetMsg() If $Msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd $save = MsgBox(4 + 32 + 256, "Save", "Save log?", 10) If $save = 6 Then $file = FileSaveDialog("Save Log", @ScriptDir, "Log (*.log;*.txt)", 18) If Not @error Then $log = GUICtrlRead($iMemo) FileWrite($file, $log) FileClose($file) EndIf EndIf Exit ; Write a line to the memo control Func MemoWrite($sMessage) ;~ GUICtrlSetData($iMemo, $sMessage & @CRLF, 1) GUICtrlSetData($iMemo, $sMessage, 1) EndFunc ;==>MemoWrite BR, UEZ Edited June 23, 2010 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Share this post Link to post Share on other sites