• 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: Launching TextEdit with a TEXT document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Launching TextEdit with a TEXT document


  • Subject: Re: Launching TextEdit with a TEXT document
  • From: Craig Hoyt <email@hidden>
  • Date: Mon, 16 Feb 2004 17:11:15 -0800

On 2/15/04 16:41:57, "Andrew Oliver" <email@hidden> wrote:

> filePath is a string

And therein lies your problem. You're asking TextEdit to open a string,
which makes no sense. You need to coerce the string to a file reference.

Fortunately this is easy to do:

tell application "TextEdit"
open file filePath
end tell

Andrew, thank you for your reply. I tried your code without luck. I'm
calling this AppleScript from a compiled Application and am not getting any
error feedback. A slightly different script does work for a Classic run (it
launches SimpleText instead of TextEdit) but this script only launches
TextEdit with an Untitled document in an OSX run. Is there any way I can
display error codes or other info from the script so I can glean what this
problem is? Are there any other issues that are specific to OSX and
AppleScript that I should be aware of?

Thanks,
Craig
_______________________________________________
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: Launching TextEdit with a TEXT document
      • From: Walter Ian Kaye <email@hidden>
    • Re: Launching TextEdit with a TEXT document
      • From: Walter Ian Kaye <email@hidden>
  • Prev by Date: Re: defining range by system date
  • Next by Date: Re: Launching TextEdit with a TEXT document
  • Previous by thread: Re: 'store script' 2 times => busy!?
  • Next by thread: Re: Launching TextEdit with a TEXT document
  • Index(es):
    • Date
    • Thread