iceberg Posted July 2, 2007 Share Posted July 2, 2007 hi guys, wats the best possible way to edit a java.policy file? i need to do a "filewrite" thanks. mouse not found....scroll any mouse to continue. Link to comment Share on other sites More sharing options...
lod3n Posted July 2, 2007 Share Posted July 2, 2007 What format is a java.policy file? JSON? I don't think there are any AutoIt functions created to deal with that format directly. What is normally used to edit a java.policy file? [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
iceberg Posted July 4, 2007 Author Share Posted July 4, 2007 wordpad mouse not found....scroll any mouse to continue. Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 4, 2007 Share Posted July 4, 2007 wordpadFileRead()/FileWrite() don't work...? Is it Unicode? If so, you just have to use the latest version of AutoIt and some extra parameters. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
iceberg Posted July 7, 2007 Author Share Posted July 7, 2007 yap it is in unicode. wat are the extra stuffs i need to add. thanks. mouse not found....scroll any mouse to continue. Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 7, 2007 Share Posted July 7, 2007 yap it is in unicode. wat are the extra stuffs i need to add.thanks.AutoIt now supports Unicode, if you are running the current version. You just specify that by options when you do FileOpen(). Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
iceberg Posted July 8, 2007 Author Share Posted July 8, 2007 $file = FileOpen("d:\java.policy", 128) ; Check if file opened for writing OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf FileWriteLine($file, "Line1") FileWriteLine($file, "Line2" & @CRLF) FileWriteLine($file, "Line3") FileClose($file) i tried the open codes. when i output to a msgbox its fine...but i just cant get it to write some data into it... i tried with 32 and 64 as well. same problems. mouse not found....scroll any mouse to continue. Link to comment Share on other sites More sharing options...
Siao Posted July 8, 2007 Share Posted July 8, 2007 (edited) If you set FileOpen mode just as 128 or 64 or 32, it means file will be opened in read mode (0). UTF8 (over)write mode would be 128+2 Edited July 8, 2007 by Siao "be smart, drink your wine" Link to comment Share on other sites More sharing options...
iceberg Posted July 8, 2007 Author Share Posted July 8, 2007 thanks siao, i should have looked at the Help more carefully before posting. ok, another thing is this...... #include <File.au3> $file2 = FileOpen("d:\java.policy", 130) ; Check if file opened for writing OK If $file2 = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf _FileWriteToLine($file2, 3, "my replacement for line 3", 1) FileClose($file2) Why doesnt my _FileWriteToLine work? thanks. mouse not found....scroll any mouse to continue. Link to comment Share on other sites More sharing options...
Siao Posted July 8, 2007 Share Posted July 8, 2007 Because _FileWriteToLine doesn't support file handles, it takes filename and does FileOpen/FileClose automatically. "be smart, drink your wine" Link to comment Share on other sites More sharing options...
iceberg Posted July 9, 2007 Author Share Posted July 9, 2007 alright...cool. mouse not found....scroll any mouse to continue. 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