Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #2691 > unrolled thread

Shellexecute with " in parameters

Started byGrzegorz Ramotowski <ramotny@tlen.pl>
First post2011-12-15 08:55 -0800
Last post2011-12-22 14:30 -0800
Articles 5 — 5 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Shellexecute with " in parameters Grzegorz Ramotowski <ramotny@tlen.pl> - 2011-12-15 08:55 -0800
    Re: Shellexecute with " in parameters dlzc <dlzc1@cox.net> - 2011-12-15 10:03 -0800
    Re: Shellexecute with " in parameters "Jamal" <vodotnet_nospam@yahoo.com> - 2011-12-15 13:21 -0500
    Re: Shellexecute with " in parameters malcolm gray <malcolm.gray@ntlworld.com> - 2011-12-17 08:40 +0000
      Re: Shellexecute with " in parameters "Heli-Team.pl Portal" <admin1@heli-team.pl> - 2011-12-22 14:30 -0800

#2691 — Shellexecute with " in parameters

FromGrzegorz Ramotowski <ramotny@tlen.pl>
Date2011-12-15 08:55 -0800
SubjectShellexecute with " in parameters
Message-ID<4680c18e-c52a-465c-b373-10a95c4ee40a@ct2g2000vbb.googlegroups.com>
Dear Friends

To avoid any report generator program I made my VO produce HTML file
and (want) use an external converter to PDF calling it with
Shellexecute():

ShellExecute(NULL, PSZ(_CAST,"open"), PSZ(_CAST,"htmltools.exe"),
PSZ(_CAST,"d:\input.html d:\outputpdf"), NULL, SW_SHOWNORMAL)

this works fine until I must use a parameter which need double quote
marks like that

htmltools.exe -breakpagebytext "end-of-page" d:\input.html d:
\outputpdf

I tried to make an outer string with " and inner with ' and also to
use chr(34)

"htmltools.exe -breakpagebytext "+chr(34)+"end-of-page"+chr(34)+" d:
\input.html d:\outputpdf

but it does not work - ie program starts but ignores paramters.

How shall I pass the " to Shellexecute?
Or maybe I shall do another way?

Every help much appreciated
Gregory

[toc] | [next] | [standalone]


#2693

Fromdlzc <dlzc1@cox.net>
Date2011-12-15 10:03 -0800
Message-ID<9d1e2169-2c59-41bc-b8a5-c733b51d142c@x7g2000yqb.googlegroups.com>
In reply to#2691
Dear Grzegorz Ramotowski:

On Dec 15, 9:55 am, Grzegorz Ramotowski <ramo...@tlen.pl> wrote:
...
> this works fine until I must use a parameter which need double quote
> marks like that

Does...

> ShellExecute(
>   NULL, ;
>   PSZ(_CAST,"open"), ;
>   PSZ(_CAST,<cVariableWithQuotesEmbedded1>),
>   PSZ(_CAST,<cVariableWithQuotesEmbedded2>),
>   NULL, ;
>   SW_SHOWNORMAL)

... work?

Where
<cVariableWithQuotesEmbedded2> := "htmltools.exe -breakpagebytext
"+chr(34)+"end-of-page"+chr(34)+" d:\input.html d:\outputpdf "

David A. Smith

[toc] | [prev] | [next] | [standalone]


#2695

From"Jamal" <vodotnet_nospam@yahoo.com>
Date2011-12-15 13:21 -0500
Message-ID<jcdds5$2cj$1@dont-email.me>
In reply to#2691
Grzegorz,

Use [   ] to surround your text.

[htmltools.exe -breakpagebytext "end-of-page" d:\input.html d:\outputpdf]

Jamal

"Grzegorz Ramotowski"  wrote in message 
news:4680c18e-c52a-465c-b373-10a95c4ee40a@ct2g2000vbb.googlegroups.com...

Dear Friends

To avoid any report generator program I made my VO produce HTML file
and (want) use an external converter to PDF calling it with
Shellexecute():

ShellExecute(NULL, PSZ(_CAST,"open"), PSZ(_CAST,"htmltools.exe"),
PSZ(_CAST,"d:\input.html d:\outputpdf"), NULL, SW_SHOWNORMAL)

this works fine until I must use a parameter which need double quote
marks like that

htmltools.exe -breakpagebytext "end-of-page" d:\input.html d:
\outputpdf

I tried to make an outer string with " and inner with ' and also to
use chr(34)

"htmltools.exe -breakpagebytext "+chr(34)+"end-of-page"+chr(34)+" d:
\input.html d:\outputpdf

but it does not work - ie program starts but ignores paramters.

How shall I pass the " to Shellexecute?
Or maybe I shall do another way?

Every help much appreciated
Gregory 

[toc] | [prev] | [next] | [standalone]


#2703

Frommalcolm gray <malcolm.gray@ntlworld.com>
Date2011-12-17 08:40 +0000
Message-ID<IzYGq.142840$aq.18190@newsfe06.ams2>
In reply to#2691
On 15/12/2011 16:55, Grzegorz Ramotowski wrote:
> Dear Friends
>
> To avoid any report generator program I made my VO produce HTML file
> and (want) use an external converter to PDF calling it with
> Shellexecute():
>
> ShellExecute(NULL, PSZ(_CAST,"open"), PSZ(_CAST,"htmltools.exe"),
> PSZ(_CAST,"d:\input.html d:\outputpdf"), NULL, SW_SHOWNORMAL)
>
> this works fine until I must use a parameter which need double quote
> marks like that



> htmltools.exe -breakpagebytext "end-of-page" d:\input.html d:
> \outputpdf
>
> I tried to make an outer string with " and inner with ' and also to
> use chr(34)
>
> "htmltools.exe -breakpagebytext "+chr(34)+"end-of-page"+chr(34)+" d:
> \input.html d:\outputpdf
>
> but it does not work - ie program starts but ignores paramters.

I am slightly confused what you are passing where - the equivalent of

 > ShellExecute(NULL, PSZ(_CAST,"open"), PSZ(_CAST,"htmltools.exe"),
 > PSZ(_CAST,"d:\input.html d:\outputpdf"), NULL, SW_SHOWNORMAL)

would be

 > ShellExecute(NULL, PSZ(_CAST,"open"), PSZ(_CAST,"htmltools.exe"),
 > PSZ(_CAST,"-breakpagebytext "+chr(34)+"end-of-page"+chr(34)+" 
d:\input.html d:\outputpdf"), NULL, SW_SHOWNORMAL)

I am also worried about psz cast with temp strings - I would use string2psz

[toc] | [prev] | [next] | [standalone]


#2740

From"Heli-Team.pl Portal" <admin1@heli-team.pl>
Date2011-12-22 14:30 -0800
Message-ID<29cf11df-5d87-4b6a-99f7-6d655fc81c33@o9g2000yqa.googlegroups.com>
In reply to#2703
On 17 Gru, 09:40, malcolm gray <malcolm.g...@ntlworld.com> wrote:
> On 15/12/2011 16:55, Grzegorz Ramotowski wrote:
>
>
>
>
>
>
>
>
>
> > Dear Friends
>
> > To avoid any report generator program I made my VO produce HTML file
> > and (want) use an external converter to PDF calling it with
> > Shellexecute():
>
> > ShellExecute(NULL, PSZ(_CAST,"open"), PSZ(_CAST,"htmltools.exe"),
> > PSZ(_CAST,"d:\input.html d:\outputpdf"), NULL, SW_SHOWNORMAL)
>
> > this works fine until I must use a parameter which need double quote
> > marks like that
> > htmltools.exe -breakpagebytext "end-of-page" d:\input.html d:
> > \outputpdf
>
> > I tried to make an outer string with " and inner with ' and also to
> > use chr(34)
>
> > "htmltools.exe -breakpagebytext "+chr(34)+"end-of-page"+chr(34)+" d:
> > \input.html d:\outputpdf
>
> > but it does not work - ie program starts but ignores paramters.
>
> I am slightly confused what you are passing where - the equivalent of
>
>  > ShellExecute(NULL, PSZ(_CAST,"open"), PSZ(_CAST,"htmltools.exe"),
>  > PSZ(_CAST,"d:\input.html d:\outputpdf"), NULL, SW_SHOWNORMAL)
>
> would be
>
>  > ShellExecute(NULL, PSZ(_CAST,"open"), PSZ(_CAST,"htmltools.exe"),
>  > PSZ(_CAST,"-breakpagebytext "+chr(34)+"end-of-page"+chr(34)+"
> d:\input.html d:\outputpdf"), NULL, SW_SHOWNORMAL)
>
> I am also worried about psz cast with temp strings - I would use string2psz

Dear Friends,
sorry for a short silence - I've been making many test...
The error was neither mine nor CAVO/Shell - it's the external
program's fault which in specific circumstances just won't work
correctly.
Recent tests with +CHR(34)+ work ok .

Thank You all very much for all clues and help.
Have a happy Christmas and better (at least not worse) 2012 :)

Gregory

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web