Re: Handler does not accept space in textstring
Re: Handler does not accept space in textstring
- Subject: Re: Handler does not accept space in textstring
- From: Christopher Stone <email@hidden>
- Date: Wed, 05 Mar 2014 21:06:51 -0600
On Mar 05, 2014, at 19:32, Christopher Nebel <email@hidden> wrote:People will sometimes advise replacing space characters in the string with “\ “, or using “quote & act & quote”, etc. Don’t. If you try to implement quoting yourself, you *will* get it wrong. Use “quoted form of” instead.
______________________________________________________________________
Listen to the mighty one and learn.
Quoted Form Of is the simplest method, because it's basically bombproof.
If you don't like writing it all the time then use a handler.
on qf(_text) return quoted form of _text end qf
set _text to "Now is the' /time for all\\ good men to come\" to the “aid” of their country." do shell script "echo " & qf(_text)
-- Best Regards, Chris
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden