I’m trying to reduce the apps I’m running on my Mac Pro 2 and one I want to get rid of (if I can) is KBM. I’m only using it to run three macros now, and I think I may be able to replace them with Apple Script. I’m not sure if it is feasible though. The three macros are:
When GoodTask is fronted trigger the CMD-L key and move the app to specific coords coords (from edge / top of the screen.
When the Vivaldi browser is fronted hit the CNT-CMD-E key to open the extensions page
When the Vivaldi browser is fronted hit the CNT-CMD-B key to open the Bookmarks page
Each of the above would ideally run as Apple Script within an Apple Shortcut. The shortcuts would then be executed by a keystroke assigned using the Shortery app.
I don’t know what GoodTask or Vivaldi are, but none of what you post sounds like a problem as long as the applications are at least minimally scriptable. While I’d usually go for a direct AppleScript approach, at the very least you should be able to do this with UI Scripting…
When GoodTask is fronted trigger the CMD-L key and move the app to specific coords coords (from edge / top of the screen.
tell application "GoodTask"
activate
end tell
tell application "System Events"
tell application process "GoodTask"
keystroke "L" using {command down}
end tell
end tell
-- some applications define a window's bounds (left, top, right, bottom)
tell application "GoodTask" to set bounds of window 1 to {100, 200, 1000, 2000}
-- while others support position (x, y) of the top-left corner
tell application "GoodTask" to set position of window 1 to {100, 200}
When the Vivaldi browser is fronted hit the CNT-CMD-E key to open the extensions page
tell application "Vivaldi"
activate
end tell
tell application "System Events"
tell application process "Vivaldi"
keystroke "E" using {command down, control down}
end tell
end tell
When the Vivaldi browser is fronted hit the CNT-CMD-B key to open the Bookmarks page
tell application "Vivaldi"
activate
end tell
tell application "System Events"
tell application process "Vivaldi"
keystroke "B" using {command down, control down}
end tell
end tell