Guest cbreaker Posted July 13, 2004 Posted July 13, 2004 (edited) I've tried a few different ways before posting, and having no ideas left i figure'd i'd ask here- what's the proper way to have a textmode application put it's output into a file? I've been trying: $catchAll = RunWait(@COMSPEC & " /c" & " ..\..\au3\sed.exe s:CHANGEME:" & $answer & ":g " & $randomFolder & "\" & $file & " >" & $file & $file, "") ($file$file gets created but has a zero size) Believe me, it wasn't that ugly when I started I'm doing this because I need to modify some config files with sed.. anyone have any advice for what I'm missing? thanks crap, is it because of not having quotes around the path for the incoming file? hmm. i'm an idiot then, exscuse this post. Edited July 13, 2004 by cbreaker
Developers Jos Posted July 13, 2004 Developers Posted July 13, 2004 When you do this command from the Commandprompt, does it then work and create a capture file ?... if so , how does it look ? 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.
Guest cbreaker Posted July 13, 2004 Posted July 13, 2004 When you do this command from the Commandprompt, does it then work and create a capture file ?... if so , how does it look ?I knew it was going to be something stupid Know of any way to retrieve AutoIt's process ID easily? i don't see a macro(wanted something cleaner for tmp files than the filename twice)
pekster Posted July 13, 2004 Posted July 13, 2004 If you just need a temp file you can use something like this: $temp1 = @TempDir & "\temp" & Int(Random(1,1000)) & ".tmp" That will generate a random filename between temp1.tmp and temp999.tmp. It also uses the user's temp directory so that if a script is executed from a read-only directory it will still succeed. If I need more than 2 or 3 tempfiles, I'll use a for loop at the top to create an array of temp file locations and just referance by array index. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.
emmanuel Posted July 13, 2004 Posted July 13, 2004 compiled scripts use their name as the process name, as does any app, I think that the Process* functions are only in unstable, but check your helpfile for ProcessExists which should be able to give you the PID for any given running process... if @compiled = 1 then $PID = ProcessExists(@Scriptname) else $PID = ProcessExists("autoit3.exe") endif "I'm not even supposed to be here today!" -Dante (Hicks)
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