• 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: Finding and shelling out to a sh script in the same directory as the AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding and shelling out to a sh script in the same directory as the AppleScript


  • Subject: Re: Finding and shelling out to a sh script in the same directory as the AppleScript
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 05 Feb 2009 07:59:30 -0600

On Feb 5, 2009, at 2:31 AM, elliottcable wrote:

I have an AppleScript to be used in an AppleScript-using application (Adium), and I don't have any other options for usage. My goal is to create the simplest AppleScript possible that will do nothing more than 'farm out' to a Ruby script in the same directory as the AppleScript.

I've gotten thus far, but subsequently ran into a so-far insurmountable problem:

    on substitute()

      try
        set rubyScript to "linktunes.rb"
        set resourcesFolder to (container of (path to me))

Everything on the web indicates that `(container of (path to me))` should provide me with an alias to the folder containing the script - instead, I get this error:

"Error: Can’t get container of alias \"Geoffrey's RAID:private:var:folders:P2:P2S5eg-AGTiyqxkapijleU+++TI:- Tmp-:untitled_1odf.tmp\"."

'path to ...' is an alias, but 'container of ...' returns a reference and is a Finder command.
Change the last line above to ...


	tell application "Finder"
		set resourcesFolder to (container of (path to me)) as alias
		...
	end tell

_______________________________________________
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
  • Follow-Ups:
    • Re: Finding and shelling out to a sh script in the same directory as the AppleScript
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Finding and shelling out to a sh script in the same directory as the AppleScript (From: elliottcable <email@hidden>)

  • Prev by Date: Re: unable to execute javascript via applescript in acrobat - result "undefined"
  • Next by Date: Re: Finding and shelling out to a sh script in the same directory as the AppleScript
  • Previous by thread: Finding and shelling out to a sh script in the same directory as the AppleScript
  • Next by thread: Re: Finding and shelling out to a sh script in the same directory as the AppleScript
  • Index(es):
    • Date
    • Thread