• 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: Using AppleScript to drop a PDF file on a droplet.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using AppleScript to drop a PDF file on a droplet.


  • Subject: Re: Using AppleScript to drop a PDF file on a droplet.
  • From: Luther Fuller <email@hidden>
  • Date: Sun, 25 Jun 2006 19:46:58 -0500

I'm not sure exactly what you are asking, but I think maybe that you want both Drag & Drop and Select & Launch interfaces. The code isn't too complicated, so I'll just post it anyway and if it isn't on target, no problem.

on run
	my getFinderSelection() -- a list of aliases
	tell me to open the result
end run ---------------------------------------------

on open dropList
	-- your Drag & Drop code goes here
end open -------------------------------------------

on getFinderSelection()
	tell application "Finder"
		try
			set selList to selection
		on error
			return {}
		end try
		--
		set listCount to (count items of selList)
		if listCount = 0 then return {}
		repeat with i from 1 to listCount
			(item i of selList) as alias
			if (class of item the result) = alias file then
				set item i of selList to (original item of the result) as alias
			else
				set item i of selList to the result
			end if
		end repeat
		return selList
	end tell
end getFinderSelection ---------------------------------------


On Jun 25, 2006, at 7:20 PM, email@hidden wrote:

Hi all,

A few months back (if memory serves me correctly) someone was asking about
using AppleScript to drop a file onto a droplet. I'm now in need of such
code.


I have a PDF "Pre-Flight" droplet that I created from Acrobat 7 and I need
to have AppleScript drop a PDF (that the script just helped build) onto
this droplet. The results will be that the PDF is scanned and a log
report is produced. This is then read by AppleScript to look for errors.


I was hoping to launch the droplet then tell it to open a file but when
the droplet is launched without a PDF being dropped on it, it immediately
quits.


Any thoughts?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Using AppleScript to drop a PDF file on a droplet. (From: email@hidden)

  • Prev by Date: Re: Using AppleScript to drop a PDF file on a droplet.
  • Next by Date: Re: What's wrong with the following script ?
  • Previous by thread: Re: Using AppleScript to drop a PDF file on a droplet.
  • Next by thread: Re: Using AppleScript to drop a PDF file on a droplet.
  • Index(es):
    • Date
    • Thread