MACSCRPT Archives

December 2010

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Mark J. Reed" <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Tue, 7 Dec 2010 09:46:37 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
Try taking the " ' " out of the hard drive name, ie. re name the hard drive
to "BillsHD" instead of "Bill'sHD" then change this line from:



       open file "Bill'sHD:Users:billsteele:Desktop:foo.txt"



to:



       open file "BillsHD:Users:billsteele:Desktop:foo.txt"


See if that works


if that's not particularly palatable then you could also try (in the script
only):



       open file "Bill\'sHD:Users:billsteele:Desktop:foo.txt"


But I don't know if the \ is the escape character in apple script, someone
here will correct me if i'm wrong.


Dave.


Apostrophes aren't special in AppleScript strings; there's no need to escape
them at
all.   Backslash (\) is indeed the escape character, but it's only legal in
front of double quotation marks (") or another backslash.

If you're using do shell script, "quoted form of" automatically handles
apostrophes correctly (though you're probably better off not looking at the
result :)).

ATOM RSS1 RSS2