Jump to content
Sign in to follow this  
metalicaman8

filewrite saves as 1, 2, or3

Recommended Posts

when I put in

CODE
If $msg = $Save Then

;When you press Save

;~~

$name = FileSaveDialog("Save file", @DesktopDir, "Encrypted Text File (*.txe)")

FileWrite($name&'.txe, $EditText)

EndIf

and save anything I end up with a file that has the correct extension of .txe but when opened in notepad it shows a 3 instead of the saved text. Can somebody tell me what is wrong with my saving script?

Share this post


Link to post
Share on other sites

when I put in

CODE
If $msg = $Save Then

;When you press Save

;~~

$name = FileSaveDialog("Save file", @DesktopDir, "Encrypted Text File (*.txe)")

FileWrite($name&'.txe, $EditText)

EndIf

and save anything I end up with a file that has the correct extension of .txe but when opened in notepad it shows a 3 instead of the saved text. Can somebody tell me what is wrong with my saving script?
You don't show the code for where you get/set the value for $EditText, but I suspect that it's from something like

$EditText = GuiCtrlCreateEdit(.......)

In which case, your capturing the instance number of the gui created element.

You need something like

$EditedText = GuiControlRead($EditText)

then

FileWrite($name&'.txe, $EditedText)
Edited by ResNullius

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...