• 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: Deivy Petrescu <email@hidden>
  • Date: Mon, 07 Dec 2015 14:52:17 -0500

>>
>> 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
>>
>
> Oops, I was too optimistic.
>
> (1) when I run my script from the editor, it does the job.
> (2) When I save it as an application and double click it, I get the answer 1 because the selected item is the application itself.
> (3) I didn’t tested but I guess that if I call the script from the Scripts menu I would get the correct result
> (4) When I use the script as a droplet it becomes fool.
> If I drop 16 files on it it displays : 16.
> If I drop 30 files, it displays once : 28 then it issue a second dialog displaying : 2
> If I drop 5 files + 1 folder, it displays : 2 then it issues a second dialog displaying : 4
> If I drop 1 folder + 1 package + 4 files, it display : 2 then it issues a dialog displaying 4.
>
> It seems that something is playing the fool somewhere.
>
>
> Yvan KOENIG running El Capitan 10.11.1 in French (VALLAURIS, France) lundi 7 décembre 2015 18:31:21

This is  a droplet that  has been working ever since…
However, today as I used it I did not get what I expected.
I tried and tried again and got strange results, until I checked to see if it was counting right.
It wasn’t.
As you, I dropped 8 files and with that script got 2 dialogs, one displaying 1 and another displaying 7.
I just wanted to have a corroboration.
This is a new bug in EC.

Thanks to all that tried.



Deivy Petrescu
email@hidden




 _______________________________________________
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: Shane Stanley <email@hidden>
References: 
 >Could someone try the following script run as an app (From: Deivy Petrescu <email@hidden>)
 >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>)

  • Prev by Date: RE: I really need some help
  • 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