metalicaman8 Posted May 14, 2008 Posted May 14, 2008 when I put in CODEIf $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? [center]Take the Magic: The Gathering 'What Color Are You?' Quiz.[/center]
ResNullius Posted May 14, 2008 Posted May 14, 2008 (edited) when I put in CODEIf $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 May 14, 2008 by ResNullius
metalicaman8 Posted May 14, 2008 Author Posted May 14, 2008 One more question. If I compile it to an exe and it has CODE#include <guiconstants.au3> #include <string.au3> If I move it to another computer do I need to move these files? Should I copy paste them into my code instead? [center]Take the Magic: The Gathering 'What Color Are You?' Quiz.[/center]
BAM5 Posted May 14, 2008 Posted May 14, 2008 No you don't. The include function compiles the library in the brackets right into the exe. [center]JSON Encoding UDF[/center]
metalicaman8 Posted May 14, 2008 Author Posted May 14, 2008 thanks. It works now thanks to you guys. It is an edited version of the encryption tool that comes as an example. It saves the file as a .txe and opens .txe files. It also remembers the level of encryption and automatically sets it when you open a .txe file. [center]Take the Magic: The Gathering 'What Color Are You?' Quiz.[/center]
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