Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Applescript > Re: super simpl...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 1607 of 1636
Post > Topic >>

Re: super simple string question.

by Jolly Roger <jollyroger@[EMAIL PROTECTED] > Apr 30, 2008 at 10:12 PM

In article 
<fe4bf8a0-4e43-4315-9b98-f71c50d1f134@[EMAIL PROTECTED]
>,
 Jason8 <jason.leach@[EMAIL PROTECTED]
> wrote:

> I'm having no luck passing an escaped (spaces) path to a shell script:
> 
> set myPath to (POSIX path "/User/foo/Some Folder/My File.pdf"
> 
> do shell script "foo " * myPath
> 
> The shell script then thinks it is getting too many arguments because
> of the space. The shell script works fine if I escape them at the
> command line; but I can seem to escape them in my AppleScript string.

You'll want to use the "quoted form of" command:

set myPath to the quoted form of (POSIX path "/User/foo/Some Folder/My
File.pdf"

do shell script "foo " * myPath

-- 
Please send all responses to the relevant news group. E-mail sent to
this address may be devoured by my very hungry SPAM filter. I do not
read posts from Google Groups. Use a real news reader if you want me to
see your posts.

JR
 




 2 Posts in Topic:
super simple string question.
Jason8 <jason.leach@[E  2008-04-30 20:08:09 
Re: super simple string question.
Jolly Roger <jollyroge  2008-04-30 22:12:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 10:39:32 CDT 2008.