Real Software Forums
http://forums.realsoftware.com/

Drop files from finder on to app to launch
http://forums.realsoftware.com/viewtopic.php?f=7&t=47200
Page 1 of 1

Author:  DaveY [ Thu Mar 07, 2013 12:32 pm ]
Post subject:  Drop files from finder on to app to launch

Hi all,

Is there a way to enable the dropping of multiple files (all of the same type, e.g. PDF) on to an application icon to open it and then handle the dropped items. I've established it's quite easy using app.openDocument, but this only handles one file (even if you drop more than one). I'm guessing I'll have to use the app.HandleAppleEvent, but the documentation on this seems elusive (to me).

Any help, as always, greatly appreciated.

Kind regards,
Dave.

Author:  DaveY [ Thu Mar 07, 2013 4:53 pm ]
Post subject:  Re: Drop files from finder on to app to launch

Ignore me - I'm the village idiot.

Author:  classone [ Thu Mar 07, 2013 5:13 pm ]
Post subject:  Re: Drop files from finder on to app to launch

How did you handle multiple files. I thought I knew, but in trying to answer your post, couldn't get it to work.

Author:  DaveY [ Thu Mar 07, 2013 5:35 pm ]
Post subject:  Re: Drop files from finder on to app to launch

Embarrassed really... it calls the app.openDocument event for each file dropped on to the icon. I just created an array in the app and appended the 'item' in the openDocument event to it, then processed the array later.

Dave.

Author:  classone [ Thu Mar 07, 2013 5:47 pm ]
Post subject:  Re: Drop files from finder on to app to launch

That's right. Multiple event calls. I was thinking there was an array passed and couldn't find it. Thanks

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/