Escaping Quotes?
zryip theSlug
zryip.theslug at gmail.com
Wed Mar 31 15:25:45 EDT 2010
2010/3/31 Andrew Kluthe <andrew at rjdfarm.com>:
>
> I tried what is recommended in this post
>
> http://n4.nabble.com/put-shell-and-escaping-quotes-how-to-do-this-td991042.html#a991074
>
> but the shell still ends up getting it with no quotes and effectively
> breaking it.
>
> put quote & "C:\Program Files\Visual CUT 11\Visual CUT.exe" & quote & " -e"
> into vcPath
>
> put quote & "C:\Rev\FOM2\Lease Reports\All
> Leases\LeasePaymentsbyLeaseName.rpt" & quote into sReportName
>
> put quote & "Parm1:2010" & quote into sParams
>
> put "[[vcPath]] [[sReportName]] [[sParams]]" into sCommand
> put shell( merge(sCommand) )
>
>
> This outputs the same message from the console that I would get if I put it
> straight in with no quotes:
>
> 'C:\Program' is not recognized as an internal or external command,
> operable program or batch file.
> --
This code works fine for me to open a pdf with acrobat:
put shell(quote"e&"C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe"
"e&"e&"C:\Program Files\Revolution Enterprise\4.0.0-gm-1\Documentation
\pdf\First Stack - Part One.pdf""e"e)
Note that I double the quote at start and end of the string.
If I transpose this test to your case I obtain:
put quote&"C:\Program Files\Visual CUT 11\Visual
CUT.exe""e&&"-e"&"e&"C:\Rev\FOM2\Lease
Reports\All Leases\LeasePaymentsbyLeaseName.rpt""e&"e&"Parm1:2010""e
into sCommand
put shell(quote&sCommand"e)
How this code works for you?
For me it returns "The system cannot find the path specified.". Not
really odds because Crystal Report is not installed on my PC. ;)
Regards,
--
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
More information about the use-livecode
mailing list