Pauletp Posted February 10, 2009 Share Posted February 10, 2009 I want to use AutoIt3 to run a command line program. The program is called "c:\midi2abc.exe" Example: In Windows when I enter "c:\midi2abc -k 2 test.mid > test.abc -k 2 c:\test.mid > c:\test.abc" at the command line the output is a text file called "c:\test.abc" which has the content I expect. ------ I tried the following line with AutoIt Run(@ComSpec & " /c midi2abc -k 2 test.mid > test.abc -k 2 c:\test.mid > c:\test.abc", "", @SW_HIDE) The script executes but the result is an empty file . Have I messed up the syntax somehow? Thanks anyone for a tip. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 10, 2009 Developers Share Posted February 10, 2009 you don't have the path infront of the program anymore so are you sure the workdir is c:\ ? 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...
Pauletp Posted February 10, 2009 Author Share Posted February 10, 2009 you don't have the path infront of the program anymore so are you sure the workdir is c:\ ? ---- Thanks for the tip. Wasn't sure about the working directory but I inserted "C:\" as follows Run(@ComSpec & " /c midi2abc -k 2 test.mid > test.abc -k 2 c:\test.mid > c:\test.abc", "C:\", @SW_HIDE) ... and it works ...! 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