• 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: Getting a script to run itself recursively
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting a script to run itself recursively


  • Subject: Re: Getting a script to run itself recursively
  • From: Philip Aker <email@hidden>
  • Date: Sun, 27 May 2007 02:55:36 -0700

On 2007-05-27, at 00:17:01, Jim Witte wrote:

I've got the following script fragment, which tries to get the path to the current script file, and then tell the Finder to run itself:

set sPath to the path of (item 1 of the document of me)

Jim,

Unless you are writing an AppleScript Studio application, scripts don't normally have a 'document' class available.

You can run your script in Script Editor because Script Editor has a 'document' class and if the script has been saved, then Script Editor's document for your script will have a POSIX style 'path' property. And that's why you can check that the script works in Script Editor but fails elsewhere.

I believe Matt has given you more than enough info to continue to success.


Philip Aker email@hidden _______________________________________________ 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
References: 
 >Getting a script to run itself recursively (From: Jim Witte <email@hidden>)

  • Prev by Date: Re: Getting a script to run itself recursively
  • Next by Date: Re: KeyChain Scripting
  • Previous by thread: Re: Getting a script to run itself recursively
  • Next by thread: Quark Picture Usage - and font usage.
  • Index(es):
    • Date
    • Thread