Re: Could someone try the following script run as an app
Re: Could someone try the following script run as an app
- Subject: Re: Could someone try the following script run as an app
- From: Yvan KOENIG <email@hidden>
- Date: Mon, 07 Dec 2015 18:09:07 +0100
Le 2015/12/07 à 17:58, Deivy Petrescu < email@hidden> a écrit :
and tell me what do you get?
Select some files and drop it over the applet. I am getting something very weird. I just want to know if there is something wrong with my computer or with AS. Thanks
on run open selection end run
on open selection set l to selection -- files selected display dialog (count of l) end open
Deivy Petrescu
What are you getting ?
When I drop several files icons on the droplet, I get the wanted result : the count of dropped files.
When I double click the droplet application I get an error -1712 in French it says : Délai dépassé pour un Apple Event.
From my point of view the message is not related to the real situation but it’s logical to get an error because as far as I know the script is unable to understand what is the selection in such case.
It was easy to build a code doing the job in both cases.
on run tell application "Finder" my main(selection) end tell end run
on open selection my main(selection) end open
on main(something) set l to something -- files selected display dialog (count of l) end main
Yvan KOENIG running El Capitan 10.11.1 in French (VALLAURIS, France) lundi 7 décembre 2015 18:09:03
|
_______________________________________________
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