How to reveal a record with Applescript

If I want to reveal a record with Applescript, how should I write it? I searched for the keyword reveal in the dictionary, but there seems to be no results.

My original script looks like this, it allows me to open the record, but I want to rewrite it to show the record in the file structure.

set win1 to open window for record thisRecord
activate win1

Hope to receive your answer!

Try this:

set win1 to open window for record parent 1 of thisRecord
set selection of win1 to {thisRecord}
activate
1 Like

As parents can be also tags, I’d recommend to use location group instead:
set win1 to open window for record (location group of thisRecord)

4 Likes

Thanks :pray:

Thank you!!

And as a quick illustration…

1 Like

Very instructive and informative: many thanks! :pray:

Stephen

1 Like