AntiVirusGuy Posted May 20, 2005 Share Posted May 20, 2005 I have these three lines in my script just to show the process has run. Only the 3rd (irtools.txt) gets created no matter what I do the other two will not create the files even though I can run the command in a dos box and it creates the tex files fine RunWait ("C:\cscirtemp\0506a\xpfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt") RunWait ("C:\cscirtemp\0506a\2kfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt") RunWait ("C:\cscirtemp\0506a\irtools.exe >C:\cscirtemp\0506a\logs\irtools.txt") Link to comment Share on other sites More sharing options...
herewasplato Posted May 20, 2005 Share Posted May 20, 2005 I have these three lines in my script just to show the process has run. Only the 3rd (irtools.txt) gets created no matter what I do the other two will not create the files even though I can run the command in a dos box and it creates the tex files fineRunWait ("C:\cscirtemp\0506a\xpfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt")RunWait ("C:\cscirtemp\0506a\2kfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt")RunWait ("C:\cscirtemp\0506a\irtools.exe >C:\cscirtemp\0506a\logs\irtools.txt")<{POST_SNAPBACK}>...very strange indeed...Did you copy/paste exactly the code that you are running? If so, then would be overwriting the first text file - were it working for you.My next suggestion might not make much sense, but when one is grasping at straws......try running the first of the three lines above in a script by itself... [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
AntiVirusGuy Posted May 22, 2005 Author Share Posted May 22, 2005 It is cut and pasted exactly and when I paste it in a command prompt it works perfect...very strange indeed...Did you copy/paste exactly the code that you are running? If so, then would be overwriting the first text file - were it working for you.My next suggestion might not make much sense, but when one is grasping at straws......try running the first of the three lines above in a script by itself...<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
GaryFrost Posted May 22, 2005 Share Posted May 22, 2005 I have these three lines in my script just to show the process has run. Only the 3rd (irtools.txt) gets created no matter what I do the other two will not create the files even though I can run the command in a dos box and it creates the tex files fineRunWait ("C:\cscirtemp\0506a\xpfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt")RunWait ("C:\cscirtemp\0506a\2kfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt")RunWait ("C:\cscirtemp\0506a\irtools.exe >C:\cscirtemp\0506a\logs\irtools.txt")<{POST_SNAPBACK}>TryRunWait (@ComSpec & " /C C:\cscirtemp\0506a\xpfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt") RunWait (@ComSpec & " /C C:\cscirtemp\0506a\2kfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt") RunWait (@ComSpec & " /C C:\cscirtemp\0506a\irtools.exe >C:\cscirtemp\0506a\logs\irtools.txt") SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
MrSmiley Posted May 22, 2005 Share Posted May 22, 2005 I have these three lines in my script just to show the process has run. Only the 3rd (irtools.txt) gets created no matter what I do the other two will not create the files even though I can run the command in a dos box and it creates the tex files fineRunWait ("C:\cscirtemp\0506a\xpfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt")RunWait ("C:\cscirtemp\0506a\2kfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt")RunWait ("C:\cscirtemp\0506a\irtools.exe >C:\cscirtemp\0506a\logs\irtools.txt")<{POST_SNAPBACK}>My guess is the second write to the file xpfix.txt is happening too fast, causing the second write to fail, effectively deleting the file. Change the filename of the second file to 2kfix.txt instead, so there's no attempt to write to the same file twice in a row, and see if you still have missing files. Link to comment Share on other sites More sharing options...
GaryFrost Posted May 22, 2005 Share Posted May 22, 2005 also on the 1st 2 are writing to same file, "creating" might want to change > to >> SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
PerryRaptor Posted May 22, 2005 Share Posted May 22, 2005 I've run into this before...GaFrost is right about the double >> to append new text to a file. Also, you can write too fast...put some Sleep() inbetween those three lines or use FileOpen() and FileReadLine() to open three seperate logfiles and join them into one. On my Athlon 64 3800, MS-DOS commands execute under 1/10 of a second. Link to comment Share on other sites More sharing options...
AntiVirusGuy Posted May 23, 2005 Author Share Posted May 23, 2005 thanks guys I thank you much I will try it in the amTryRunWait (@ComSpec & " /C C:\cscirtemp\0506a\xpfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt") RunWait (@ComSpec & " /C C:\cscirtemp\0506a\2kfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt") RunWait (@ComSpec & " /C C:\cscirtemp\0506a\irtools.exe >C:\cscirtemp\0506a\logs\irtools.txt")<{POST_SNAPBACK}> 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