CsM33 Posted September 20, 2006 Share Posted September 20, 2006 I have a batch program that has tons of lines (like 30 something) and it will take forever if I write it like FileWrite("C:\drive\test" & "\batch.bat","LINE1" & @CRLF & "LINE2" & @CRLF & "LINE3" & @CRLF & "LINE4") Is there a faster way? Link to comment Share on other sites More sharing options...
Developers Jos Posted September 20, 2006 Developers Share Posted September 20, 2006 I have a batch program that has tons of lines (like 30 something) and it will take forever if I write it likeFileWrite("C:\drive\test" & "\batch.bat","LINE1" & @CRLF & "LINE2" & @CRLF & "LINE3" & @CRLF & "LINE4")Is there a faster way?can you be more specific than "tons of lines" and "take forever" ?Do you have one FileWrite() or multiple ?It helps alot when you have multiple FileWrite() statements to do a FileOpen() and then FileWrite() to the returned FileHandle.. when done do a FileClose. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
CsM33 Posted September 20, 2006 Author Share Posted September 20, 2006 Well what I'm trying to do is to create an exe in autoit that makes a bunch of batch/other programs and sends them to a directory. Here is an example of one of the programs. This is a .reg program I'm using on my schools computer to enable command prompt and registry editing. FileWrite("C:\CsMBPG\REG" & "\EnableRegEditAndComPrompt.reg"," REGEDIT4" & @CRLF & "[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesWinOldApp]" & @CRLF & ""Disabled"=dword:0" & @CRLF & _ "[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesSystem]" & @CRLF & ""DisableRegistryTools"=dword:0") Now as you can imagine, copying and pasting each line of code is kinda difficult. Is there a way where I could just copy and paste the entire code without having to cut it and put it in qoutations and & @CRLF & after every line? Link to comment Share on other sites More sharing options...
CsM33 Posted September 20, 2006 Author Share Posted September 20, 2006 (edited) To be more specific. Is there any way to kinda just write Filewrite( "C:\CsMBPG\REG" & "\EnableRegEditAndComPrompt.reg". " REGEDIT4 [HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesWinOldApp] "Disabled"=dword:0 [HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesSystem] "DisableRegistryTools"=dword:0" ) Edited September 20, 2006 by CsM33 Link to comment Share on other sites More sharing options...
CsM33 Posted September 20, 2006 Author Share Posted September 20, 2006 I know the above code would not work, but is there any easier way? I basically don't want to have to copy and paste every like of text into new quotations. Link to comment Share on other sites More sharing options...
Developers Jos Posted September 20, 2006 Developers Share Posted September 20, 2006 (edited) I know the above code would not work, but is there any easier way? I basically don't want to have to copy and paste every like of text into new quotations.Why would you want to write a REG file with autoit3 ? I assume you have the REG file already so you could just FileInstall() it ....- or - am I mis understanding your objective ? Edited September 20, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
CsM33 Posted September 20, 2006 Author Share Posted September 20, 2006 (edited) Why would you want to write a REG file with autoit3 ? I assume you have the REG file already so you could just FileInstall() it ....- or - am I mis understanding your objective ?I'm writing lots of files but I want the autoit program to be an installer of sorts. Kinda like a winzip/rar archive but instead of all the files being held there, I want the autoit program to create them. All I'm wondering is if there is an easier way so I don't have to copy and paste each line of code, then type & @CRLF & before copying/pasting another line of code. Edited September 20, 2006 by CsM33 Link to comment Share on other sites More sharing options...
CsM33 Posted September 20, 2006 Author Share Posted September 20, 2006 Anyone know what to do? Link to comment Share on other sites More sharing options...
Confuzzled Posted September 24, 2006 Share Posted September 24, 2006 FileInstall your pre-existing files? 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