applescript, shell script problem

Terry Vogelaar terry at discovery.nl
Tue Nov 26 23:20:01 EST 2002


> I have been using the applescript method of executing shell scripts to
> gret effect since I learned about the trick a couple days ago.
>
> However, I have this problem:
>
> I keep getting errors when I try and execute a shell command that 
> contains
> quotes. What is the proper way of dealing with this?

It is not a problem restricted to AppleScript, but there's a good way 
to deal with it. A quote ends the string in Transcript. So if you write:
ask "What do you mean with "OK"?"
it sees OK as a part that needs to be executed, because the string 
ended with the second quote in the line.

Solution: replace every quote that needs to be part of the string like 
this:
ask "What do you mean with " & quote & "OK" & quote & "?"
(or use 'single quotes' when possible)

Terry




More information about the use-livecode mailing list