When writing an AppleScript, I am often presented with the following options and I’m never sure which way to go:
-
Have one application tell statement (typically Finder or System Events) and include within that tell statement code that does not require the application.
-
Have multiple application tell statements (all of which call the same application) and do not include within the tell statement any code that does not require the application.
I wondered if either of these options is faster or better in some way.
BTW, the term, “code that does not require the application”, refers to simple stuff like looping through a list of 10 or so items to find a match. Also, I understand that this question in the abstract is difficult to answer but I thought an experienced forum member might have some general rule that he/she follows.
Thanks.