Jump to content
Sign in to follow this  
tiger223

Run Help With Quotes

Recommended Posts

$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 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

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.
  :)

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

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:

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.
  :)

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...