Automatically open Data Viewer?

Keyboard Maestro is so useful. I've got it set to "Toggle" the Data Viewer, where by "toggle" I mean opening it if not already open, and otherwise toggling it between being fully on-screen versus slid down to the edge of the screen so only the title bar is visible. It is thus easily moved out of the way without being actually closed. This is useful when you are developing as a non-FullAccess account, since you would otherwise have to re-authenticate every time you reopen it from being closed.
The attached AppleScript can be added to a Keyboard Maestro macro to accomplish this. It also opens the authenticate prompt in the Watch tab, if the current user is not already a Full Access account, to enable use of the Watch tab by a developer using a non-FullAccess account.
You could run this from whatever utility you find useful - all the code that actually does anything is in the attached file.
Data Viewer Toggle Position - 2023-07-20.applescript.zip (3.8 KB)

1 Like