Single script fetching of both name and address?

When custom scripts are being used, the code required to fetch a name can often duplicate the code required to fetch an address.

When the name and code string cost a lot of duplicated Apple Events to separately retrieve, this can slow down the opening of the Hook dialog.

Might it be possible to find a way to return both name and address from a single custom script, returning both in a key:value record, for example, or binding both to a pair of reserved names ?

(in the meanwhile, if there is a consistent pattern to the order in which Get Name and Get Address are evaluated, the second of them might, I guess, be able to retrieve a second value left waiting for it in the clipboard by the first script. A little fragile though.)


Thanks for the suggestion, Rob. That seems feasible at this point. We’ll take some measures and discuss the idea internally. There’s lots in the pipeline.



In the latest version of Hook (1.2.0) the Get Address script can return a markdown link which contains the name and address e.g. [title](address)

Hook won’t run the Get Name script if the Get Address script returns a markdown link with a valid title.


Many thanks for implementing that :ok_hand:

1 Like

Wow, great creative thinking in response to the original request! :ok_hand:

1 Like