Jump to content
Sign in to follow this  
AetherMaster

RunWait and quotes

Recommended Posts

AetherMaster

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!

Share this post


Link to post
Share on other sites
frew

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

Share this post


Link to post
Share on other sites
Alpinestar

You can also change the @scriptdir to @scriptfullpath and get rid of the \ from sound.mp3. Hope that helps

Edited by Alpinestar

Share this post


Link to post
Share on other sites
AetherMaster

You can also change the @scriptdir to @scriptfullpath and get rid of the \ from sound.mp3. Hope that helps

Wouldn't that include the .au3 file in the path, though? Meaning the result would be "C:\Program files\My Script\script.au3sound.mp3"

Share this post


Link to post
Share on other sites
Mat

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 by mdiesel

Share this post


Link to post
Share on other sites
Valuater

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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.