Building Applescript ObjectSpecifier With Name in Javascript

Is there a way to build an ObjectSpecifier using name instead of array number in Javascript Applescript?

search = ObjectSpecifier().buttons["Add"].value

items = items.groups.whose({_match:[search,"Selected"]})

The index for "add button" is different in each item, so if I build the ObjectSpecifier with buttons[3] Instead of buttons["Add"], it only returns the

items that have add button at the index 3. I also tried "ObjectSpecifier().buttons.byName("Add").value", but it doesn't work.

Thanks!!!

MacBook Pro, OS X Yosemite (10.10.5)

Posted on Aug 26, 2016 8:20 AM

Reply
1 reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Building Applescript ObjectSpecifier With Name in Javascript

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.