• 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: Could someone try the following script run as an app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Could someone try the following script run as an app
      • From: Yvan KOENIG <email@hidden>
    • Re: Could someone try the following script run as an app
      • From: Yvan KOENIG <email@hidden>
References: 
 >Could someone try the following script run as an app (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: Re: Could someone try the following script run as an app
  • Next by Date: Re: Could someone try the following script run as an app
  • Previous by thread: Re: Could someone try the following script run as an app
  • Next by thread: Re: Could someone try the following script run as an app
  • Index(es):
    • Date
    • Thread