• 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
Passing dropped items to shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Passing dropped items to shell script


  • Subject: Passing dropped items to shell script
  • From: Marconi <email@hidden>
  • Date: Thu, 14 May 2009 14:19:28 -0700

I'm trying to get an AS droplet to pass each dropped file to a shell script:

on open dropped_items
	repeat with i from 1 to the count of dropped_items
		set this_item to (item i of dropped_items)
		set thepath to POSIX path of this_item
		set myMessage to (do shell script "/path/to/perl/script.pl \"thepath\"")
		display dialog myMessage
	end repeat
end open

I get no errors (myMessage is "") but the script does not do its thing. If I pass the file in terminal. the script works. So... I'm probably not passing it properly.

Anyone?

Also, is it possible to put the perl script in the application bundle and call it there?

--

"A man who believes in nothing will fall for anything." -- Malcolm X
_______________________________________________
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: Passing dropped items to shell script
      • From: Doug McNutt <email@hidden>
    • Re: Passing dropped items to shell script
      • From: Luther Fuller <email@hidden>
    • Re: Passing dropped items to shell script
      • From: Roger Howard <email@hidden>
  • Prev by Date: Re: Finder Window Scroll?
  • Next by Date: Folder Icons
  • Previous by thread: Re: Finder Window Scroll?
  • Next by thread: Re: Passing dropped items to shell script
  • Index(es):
    • Date
    • Thread