AetherMaster Posted April 11, 2009 Share Posted April 11, 2009 I know this is my first post, but I'm trying to solve a big problem I'm having.I'm trying to run a command-line program using the RunWait command, as seen in this line:RunWait("lame --decode " & @ScriptDir & "\sound.mp3 " & $CmdLine[2])This works fine, unless my script is in a directory with spaces in the name, for example, "C:\Program Files\"Although I can force a path, I don't want to, because I'm trying to make the script non-directory-dependent.Is there a way for me to enclose this command in double quotes without having to get rid of the "@ScriptDir"?Thank you in advance for any help! Link to comment Share on other sites More sharing options...
frew Posted April 11, 2009 Share Posted April 11, 2009 Sorry I don't know what I'm talking about really, but you could try placing some single quotes around some of the double quoted items...that has helped me at times. frew Link to comment Share on other sites More sharing options...
Alpinestar Posted April 11, 2009 Share Posted April 11, 2009 (edited) You can also change the @scriptdir to @scriptfullpath and get rid of the \ from sound.mp3. Hope that helps Edited April 11, 2009 by Alpinestar Link to comment Share on other sites More sharing options...
AetherMaster Posted April 11, 2009 Author Share Posted April 11, 2009 You can also change the @scriptdir to @scriptfullpath and get rid of the \ from sound.mp3. Hope that helpsWouldn't that include the .au3 file in the path, though? Meaning the result would be "C:\Program files\My Script\script.au3sound.mp3" Link to comment Share on other sites More sharing options...
Mat Posted April 11, 2009 Share Posted April 11, 2009 (edited) the first reply was the most meaningful, the second was not valid if I get what your trying to do... use ' "stuff in quotes" ' that works. edit, you can also double up the quote marks to get them in there. Edited April 11, 2009 by mdiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
Valuater Posted April 11, 2009 Share Posted April 11, 2009 Wouldn't that include the .au3 file in the path, though? Meaning the result would be "C:\Program files\My Script\script.au3sound.mp3" Yes. Try this MsgBox((0x0, "Test","lame --decode " & @ScriptDir & "\sound.mp3 " & $CmdLine[2]) this used to help me all the time 8) 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