metalicaman8 Posted April 4, 2008 Share Posted April 4, 2008 I was wondering if there is any way to save your data without saving to an external file. If there is no such way then how do you save it to an external file such as a text file and is there a way to make this file hidden? Thank you in advance. [center]Take the Magic: The Gathering 'What Color Are You?' Quiz.[/center] Link to comment Share on other sites More sharing options...
Swift Posted April 4, 2008 Share Posted April 4, 2008 You can store information inside a variable. Or, use a file and then use: FileSetAttrib() and set it to: +SH Link to comment Share on other sites More sharing options...
Zedna Posted April 4, 2008 Share Posted April 4, 2008 Save it into Windows registry. AutoIt has RegWrite() TegRead() functions. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
metalicaman8 Posted April 4, 2008 Author Share Posted April 4, 2008 You can store information inside a variable. Or, use a file and then use: FileSetAttrib() and set it to: +SH If I store something to a variable will it be there next time I open the script? [center]Take the Magic: The Gathering 'What Color Are You?' Quiz.[/center] Link to comment Share on other sites More sharing options...
SkinnyWhiteGuy Posted April 4, 2008 Share Posted April 4, 2008 Look into Data Streams on NTFS drives. Link to comment Share on other sites More sharing options...
metalicaman8 Posted April 5, 2008 Author Share Posted April 5, 2008 Look into Data Streams on NTFS drives.Got that figured out and its very useful thanks.Now I need to know how to save data to a text file. I know you can call commands from the au3 file but I can read about the specifics later in the help file. I can't figure out how to save data to a text file though. Also, can say test.au3 read and save to data stream file test.au3:hidden.txt?Thank you again. [center]Take the Magic: The Gathering 'What Color Are You?' Quiz.[/center] Link to comment Share on other sites More sharing options...
metalicaman8 Posted April 5, 2008 Author Share Posted April 5, 2008 Never mind saving to external text file I figured it out. I'm trying to make a modification on the encryptor that comes in the examples that saves your data to a text file hidden in an alternate data stream. To save I am doing this CODE $Msg = GuiGetMsg() If $msg = $EncryptButton Then ; When you press Encrypt ;~~ GuiSetState(@SW_DISABLE,$WinMain) ; Stops you from changing anything ;~~ $string = GuiCtrlRead($EditText) ; Saves the editbox for later ;~~ GUICtrlSetData($EditText,'Please wait while the text is Encrypted/Decrypted.') ; Friendly message ;~~ GuiCtrlSetData($EditText,_StringEncrypt(1,$string,GuiCtrlRead($InputPass),GuiCtrlRead($InputLevel))) ; Calls the encryption. Sets the data of editbox with the encrypted string ;~~ FileOpen ("encryptor.au3:pass.txt", 2 ) FileWrite ("encryptor.au3:pass.txt", $EditText ) GuiSetState(@SW_ENABLE,$WinMain) ; This turns the window back on ;~~ EndIf the fileopen and filewrite near the bottom are my additions. To call the data back I am using this CODE$openthis = FileOpen ("encryptor.au3:pass.txt", 0) $text = FileRead ( "encryptor.au3:pass.txt") FileClose ($openthis) and CODE$EditText = GuiCtrlCreateEdit( '' ,5,5,380,350) ; Creates main edit ;~~ GUICtrlSetData ($EditText,$text) when I open the script for the first time all goes fine. When I open any time after that no matter what I try to encrypt the main edit box has a value of 3. When in dos prompt I query start encryptor.au3:pass.txt I get something about how I do not have permission to access the file. Please help. [center]Take the Magic: The Gathering 'What Color Are You?' Quiz.[/center] 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