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: Iurista GmbH <email@hidden>
- Date: Thu, 06 Mar 2014 13:33:11 +0100
One may learn every day something new :-)
Many thanks to all for helping me out here. The last mail of Chris was the easiest solution to add to my scripts.
Rudolf
Am 06.03.2014 um 04.06 schrieb Christopher Stone:
> 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