Set focus on specific group or reference

Users asking other users for AppleScripts that work with Bookends.
Post Reply
lucius
Posts: 4
Joined: Tue Dec 03, 2019 11:19 am

Set focus on specific group or reference

Post by lucius » Tue Dec 17, 2019 9:03 am

Is it possible to set the focus (using AppleScript) on a specific group or references of the front window?
I know how to get selected references (using "set ePubList to (selected publication items"), but I want to the opposite.
The reason is that once I select a given reference I want to trigger the "Autofill from Internet" --> "All fields (shit+Command+A) using:

Code: Select all

tell application "System Events"
	tell application "Bookends" to activate
	delay 0.5
	key code 125
	delay 0.5
	keystroke "A" using {command down, shift down}
	delay 2
end tell

Thanks!

Jon
Site Admin
Posts: 8387
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Set focus on specific group or reference

Post by Jon » Tue Dec 17, 2019 9:58 am

It's not built in, but it might conceivably be might be done with GUI scripting.

Jon
Sonny Software

lucius
Posts: 4
Joined: Tue Dec 03, 2019 11:19 am

Re: Set focus on specific group or reference

Post by lucius » Wed Dec 18, 2019 3:00 am

Thanks Jon.
I looked into the possibility of using GUI scripting, but I couldn't find any "link" to specific group neither in the menubar menus nor by using "UI Browser" (https://pfiddlesoft.com/uibrowser).
It seems to me that "groups" are a kind of "ghost" in Bookends.
Any help would be very appreciated.
Thanks!
L.

Jon
Site Admin
Posts: 8387
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Set focus on specific group or reference

Post by Jon » Wed Dec 18, 2019 10:03 am

Perhaps someone who know more than I do about scripting can help.

Jon
Sonny Software

Post Reply