url gets truncated (was "launching web browser")

Klaus Major klausimausi at mac.com
Fri Jan 31 08:13:00 EST 2003


Konichi-wa Cueto-san,

> Hello,
>
> Well, looking through the archives, I found a script for lsuccessfully
> aunching a browser with an url
> (http://www.mail-archive.com/metacard@lists.runrev.com/msg06944.html ,  
> by
> Shari -- thank you!).
>
> One problem (perhaps off topic?). Although the url does get sent to the
> browser, it becomes truncated at the first ampersand:
>
> --
>  put
> "http://www.somewhere.com/ 
> business=kweto%40ma.nma.ne.jp&item_name=something&
> no_note=1" into tUrl
>  if (the platform) is "Win32" then
>     try
>       set the hideConsoleWindows to true
>       put empty into theTitle
>       if "NT" is in the systemVersion then
>         set the shellCommand to "cmd.exe"
>         put quote & quote into theTitle
>       end if
>       get shell("start" && theTitle && tURL)
> --
> I tried replacing the ampersand with %26, but still no luck.
> How do I ensure the url gets passed as is?
> Thank you.
>
> Nicolas Cueto

Hmmmm....

Try this:

....
   if "NT" is in the systemVersion then
         set the shellCommand to "cmd.exe"
        ### put quote & quote into theTitle ???
        ### "" ??? Looks like this is the li'l troublemaker
        ### maybe you mean "put QUPTE & tUrl & QUOTE into theTitle
       end if
       get shell("start" && QUOTE & tURL & QUOTE)
       ### then "get shell("start" & theTitle)  should work
--

Hope that helps.


Regards

Klaus Major
klausimausi at mac.com




More information about the metacard mailing list