Re: ASEditor Drag&Drop
Re: ASEditor Drag&Drop
- Subject: Re: ASEditor Drag&Drop
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 28 Oct 2013 10:43:11 -0700
- Thread-topic: ASEditor Drag&Drop
Title: Re: ASEditor Drag&Drop
On 10/28/13 9:56 AM, "Luther Fuller" <email@hidden> wrote:
I rewrite this as …
posix file "/Users/lutherfuller/Desktop/some "file".rtf"
which gives a syntax error. In order to avoid the error, I have to insert
slashes before the internal quotes to get …
POSIX file "/Users/lutherfuller/Desktop/some \"file\".rtf"
I can use the work around, described in my original post, to convert this to an alias.
This is a confusing behavior in ASE that can be worked around, but it's simpler to use Smile
But having to use backslashes to escape internal quotes within quotes has been around ever since the beginning of AppleScript. It's not a workaround - it's just how the language works. Otherwise how would you - and the compiler - ever know that they were internal quotes? It would just see one pair of quotes ending and another beginning:
posix file "/Users/lutherfuller/Desktop/some "
file".rtf"
You can see Smile does the same thing for you, inserting the backslashes.
ASE is just reflecting the new regime where Posix paths are going to be more common than the older syntax. Inconvenient for us who still prefer the older form, or are used to it, but there you are. I imagine both will go on working forever, but when converting one to the other you certainly have to remember the AS language rule abouuyt escaping internal quotes inside other quotes. All languages have some method for escaping internal quotes.
--
Paul Berkowitz
_______________________________________________
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