• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: puzzled with script syntax error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: puzzled with script syntax error


  • Subject: Re: puzzled with script syntax error
  • From: has <email@hidden>
  • Date: Thu, 27 Jun 2002 09:56:01 +0100

Cornwall wrote:

>I think you have only two choices

>2. Enclose "set _result to (read fileRef)" in a Finder tell
>
>set fileRef to alias "Macintosh HD:Users:sharon:file1.txt"
>--open for access fileRef
>tell app "Finder"
>set _result to (read fileRef)
>end tell
>--close access fileRef

Sending osax messages to the Finder can cause its own problems (i.e. lots
of opportunity for keyword clashes there). What about sending them direct
to the AppleScript object instead?

tell AppleScript
--blah blah
end tell

[Can't recall seeing this done elsewhere, mind you. If that's the case then
is there some reason for avoiding it, or have folks simply never thought of
using it?]

has

--
http://www.barple.connectfree.co.uk/ -- The Little Page of Beta AppleScripts
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: puzzled with script syntax error
      • From: Cornwall <email@hidden>
  • Prev by Date: Applescript for Final Cut Pro and Macromedia Dreamweaver
  • Next by Date: Re: What's the easy way to do this?
  • Previous by thread: Fwd: puzzled with script syntax error
  • Next by thread: Re: puzzled with script syntax error
  • Index(es):
    • Date
    • Thread