Re: variables vrs properties
Re: variables vrs properties
- Subject: Re: variables vrs properties
- From: KOENIG Yvan <email@hidden>
- Date: Wed, 5 Jan 2011 23:20:15 +0100
Le 5 janv. 2011 à 22:49, Shane Stanley a écrit : On 6/1/11 5:25 AM, "Ed Stockly" < email@hidden> wrote: A script must execute within another process. You run a script typically from
a script menu either in an application or from the system’s script menu.
An Applet or Droplet works as its own application, even if you launch it from
a script menu.
When you run a script you save the time it takes to launch applet as an
application.
In many cases developers have optimized the processes involved in executing
scripts making them much faster. It’s often faster to run the same script from
the InDesign script menu than it is from the System Script menu.
So depending on the context, scripts can execute either a little quicker or a
lot faster.
The situation is complicated by the fact that the standard AS applet shell is very slow. You can wrap a script in a "run script", or use a simple AppleScriptObjC shell, and the difference in performance is like night and day.
Hello
Do you know why in this short script :
property list_of_items : {}
on run set p2d to "" & (path to desktop) set my list_of_items to {p2d & "Courrier 96.cwk" as alias, p2d & "Converted document.doc" as alias} run script do_the_duty end run
on open sel copy sel to my list_of_items run script do_the_duty end open
script do_the_duty display dialog (list_of_items as text) end script
when I drop items on the droplet icon I get : "The variable «do_the_duty» isn't defined"
To my knowledge, it's defined exactly as it is in the on run / end run block.
Yvan KOENIG (VALLAURIS, France) mercredi 5 janvier 2011 23:20:04
|
_______________________________________________
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