imani Posted October 9, 2007 Posted October 9, 2007 (edited) Look in the following code. When I press the button 1 then I want to display the following output in the GUIctrlCreateedit window Output Line 1 Line 2 Line 3 I do want to add some functions before and after the GUICtrlSetData commands (Can not use @CRLF) expandcollapse popup#include <GUIConstants.au3> #NoTrayIcon Global $mainwin= GUICreate("Utility 3.1.1", 270,250) GUISwitch($mainwin) $Button_1 = GuiCtrlCreateButton("Button1", 40, 20, 170, 30) GUICtrlSetState($Button_1,$GUI_FOCUS) $Button_2 = GuiCtrlCreateButton("Button2", 40, 60, 170, 30) $Button_3 = GuiCtrlCreateButton("Button3", 40, 100, 170, 30) $exit = GuiCtrlCreateMenu ("File") $exititem = GUICtrlCreateMenuitem ("Exit",$exit) $helpmenu = GuiCtrlCreateMenu ("Help") $readmeitem = GuiCtrlCreateMenuitem ("Readme",$helpmenu) $aboutitem = GuiCtrlCreateMenuitem ("About",$helpmenu) $edit = GUICtrlCreateEdit("",0,150,270,80,BitOR($ES_READONLY,$ES_MULTILINE),$WS_EX_STATICEDGE) GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1 GUICtrlSetData($edit,"Line 1") ;I want to put separate function here GUICtrlSetData($edit,"Line 2") ;I want to put separate function here GUICtrlSetData($edit,"Line 3") Case $msg = $Button_2 Case $msg = $Button_3 Case $msg = $exititem ExitLoop Case $msg = $aboutitem Case $msg = $readmeitem EndSelect Wend Edited October 10, 2007 by imani
smashly Posted October 9, 2007 Posted October 9, 2007 Hi, Replace GUICtrlSetData($edit,"Line 1") GUICtrlSetData($edit,"Line 2") GUICtrlSetData($edit,"Line 3")oÝ÷ Ùh«¢+ÙU% ÑɱMÑÑ ÀÌØí¥Ð°ÅÕ½Ðí1¥¹ÄÅÕ½ÐìµÀì I1µÀìÅÕ½Ðí1¥¹ÈÅÕ½ÐìµÀì I1µÀìÅÕ½Ðí1¥¹ÌÅÕ½Ðì¤Cheers
smashly Posted October 10, 2007 Posted October 10, 2007 Hi again, GUICtrlSetData($edit,"Line 1") ;I want to put separate function here GUICtrlSetData($edit, GUICtrlRead($edit) & @CRLF & "Line 2") ;I want to put separate function here GUICtrlSetData($edit, GUICtrlRead($edit) & @CRLF & "Line 3") Cheers
imani Posted October 11, 2007 Author Posted October 11, 2007 Hi again, GUICtrlSetData($edit,"Line 1") ;I want to put separate function here GUICtrlSetData($edit, GUICtrlRead($edit) & @CRLF & "Line 2") ;I want to put separate function here GUICtrlSetData($edit, GUICtrlRead($edit) & @CRLF & "Line 3") CheersA simple method to do so GUICtrlSetData($edit,"Line 1","append") GUICtrlSetData($edit,@CRLF & "Line 2","append") GUICtrlSetData($edit,@CRLF & "Line 3","append")
imani Posted October 11, 2007 Author Posted October 11, 2007 Hi again, GUICtrlSetData($edit,"Line 1") ;I want to put separate function here GUICtrlSetData($edit, GUICtrlRead($edit) & @CRLF & "Line 2") ;I want to put separate function here GUICtrlSetData($edit, GUICtrlRead($edit) & @CRLF & "Line 3")oÝ÷ Ø(^z»?ªê-x"^ëa¡Ûhv(jëh×6 GUICtrlSetData($edit,"Line 1","append") GUICtrlSetData($edit,@CRLF & "Line 2","append") GUICtrlSetData($edit,@CRLF & "Line 3","append")
GaryFrost Posted October 11, 2007 Posted October 11, 2007 _GUICtrlEdit_AppendText SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now