Sign in to follow this  
Followers 0
tiger223

Run Help With Quotes

8 posts in this topic

$CmdLine[0] = 1

$VAR = $CmdLine[1]

if $CmdLine[0] > 0 then

Run("C:\param.exe "test - " & $CmdLine[1] & " " "keys" , "", @SW_HIDE)

endif

My param.exe takes paramters like this (with the quotes)

param.exe "test - Cmdline1" "key blah"

how would i add quotes within quotes to the Run Command.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

2 options:

Run("C:\param.exe ""test - " & $CmdLine[1] & " ""keys" , """", @SW_HIDE)

or

Run('C:\param.exe "test - ' & $CmdLine[1] & ' "keys" , '"', @SW_HIDE)
Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Thanks I did as you said, although i do get Invalid workingdir error, was there something wrong with it?

I tried both methods.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

You don't need quotes in working directory, you can leave blank.

the thing in commas right before @SW_HIDE

Run('C:\param.exe "test - ' & $CmdLine[1] & ' "keys" ', '', @SW_HIDE)

not sure if you are missing anything else though like where you want the other "

Run('C:\param.exe "test - ' & $CmdLine[1] & '" "keys" ', '', @SW_HIDE)

Normally you would have matching number of "

edit...

Normally you would have an even number of "

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

You don't need quotes in working directory, you can leave blank.

the thing in commas right before @SW_HIDE

Run('C:\param.exe "test - ' & $CmdLine[1] & ' "keys" , '', @SW_HIDE)

not sure if you are missing anything else though

Your right ScriptKitty, I was to enthusiastic with the quotes.... tnx :whistle:

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Now theres another error which says "missing quotes" and I pasted what you did into my code.

Share this post


Link to post
Share on other sites

Yea its confusing ... :whistle:

Run('C:\param.exe "test - ' & $CmdLine[1] & ' "keys"' , '', @SW_HIDE)

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Yeah i figured it out, but thanks :whistle:, it was much easier in c and delphi B)

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  
Followers 0