tom35i Posted November 18, 2009 Share Posted November 18, 2009 Hey all I am trying to save the contents of a memo to a text file. the memo is created using the following $hGUI = GUICreate("SOC", 600, 300) $iMemo = GUICtrlCreateEdit("", 2, 2, 596, 296, $WS_VSCROLL) GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New") any able to help? cheers YEA BOIhttp://www.myspace.com/comeoutfiringhttp://www.last.fm/music/comeoutfiringhttp://www.facebook.com/pages/comeoutfiring/75676261698http://www.reverbnation.com/comeoutfiringhttp://www.purevolume.com/comeoutfiringhttp://www.twitter.com/comeoutfiringhttp://www.youtube.com/comeoutfiring Link to comment Share on other sites More sharing options...
Mat Posted November 18, 2009 Share Posted November 18, 2009 This? #Include<WindowsConstants.au3> $hGUI = GUICreate("SOC", 600, 322) $iMemo = GUICtrlCreateEdit("", 2, 2, 596, 296, $WS_VSCROLL) GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New") $hSave = GUICtrlCreateButton ("Save", 2, 300, 80, 20) GUISetstate () While 1 Switch GUIGetMsg () Case -3 Exit Case $hSave _Save (GUICtrlRead ($iMemo), $hGUI) EndSwitch WEnd Func _Save ($sText, $hParent) Local $sFile = FileSaveDialog ("Save memo...", @WorkingDir, "Text file (*.txt)|All files (*.*)", 18, "", $hParent) If @Error Then Return 0 Local $hFile = FileOpen ($sFile, 2) FileWrite ($hFile, $sText) FileClose ($hFile) Return 1 EndFunc ; ==> _Save Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
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