NegativeNrG Posted December 13, 2005 Posted December 13, 2005 Im working on my Text Editor and i dont know how to save the WHOLE text written in the EDIT box. heres my Sample code: $Form1 = GUICreate("Simple Text v0.1", 477, 299, 199, 129) $Edit1 = GUICtrlCreateEdit("", 8, 32, 465, 249, -1, $WS_EX_CLIENTEDGE) GUIctrlsetdata($Edit1,"") $menu = GUIctrlcreatemenu("File") $item1 = GUIctrlcreatemenuitem("Open",$menu) $item = GUIctrlcreatemenuitem("Save As..",$menu) GUISetState(@SW_SHOW) While 1 $msg = GUIgetmsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $item $save = FileSaveDialog("Save To..","C:\","Text Documents(*.txt)",16) FileWrite($save,$Edit1) The FileWrite doesnt work, ive tried FileWriteline, but also doesnt work. Can anyone help me? [size=20]My File Upload[/size]Register at my site and upload.
NegativeNrG Posted December 13, 2005 Author Posted December 13, 2005 oops, Sorry for Double Threading, i lagged, and pressed back,new topic a couple of times. [size=20]My File Upload[/size]Register at my site and upload.
Francis Lennert (France) Posted December 13, 2005 Posted December 13, 2005 hello I think that you save the reference of the EditBox and not the Data. You must use GUICtrlRead to get the data from the EditBox and save them. FileWrite($save, GuictrlRead($Edit1))
NegativeNrG Posted December 13, 2005 Author Posted December 13, 2005 yeh, problem solved in the other Thread of this. [size=20]My File Upload[/size]Register at my site and upload.
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