Single versus Multiple Tell Statements

When writing an AppleScript, I am often presented with the following options and I’m never sure which way to go:

  1. Have one application tell statement (typically Finder or System Events) and include within that tell statement code that does not require the application.

  2. 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.

This is a personal style issue with some caveats. Keeping commands within a single tell block is fine, as long as (1) code therein doesn’t explicitly belong within another’s scope—e.g. standard additions; (2) the addressed application isn’t already busy or hung—e.g. Finder is performing a transfer; (3) it decreases your overall code length, thereby improving legibility.

Thanks for the response Marc Anthony. I guess I had it in my mind that multiple tell statements calling a particular application would start and stop the application each time, slowing down the script. It’s good to have the flexibility to do this either way.