Passing dropped items to shell script
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