I’m used to Linux environments however I’ve to make use of a Mac for work. Now I’m questioning why it appears to be not possible to open new workspaces in OSX with out utilizing the mouse.
I understand how to modify between them or transfer home windows in several workspaces, when they’re already open, however there appears no technique to open or shut a workspace simply by keyboard shortcuts. I’m already utilizing Amethyst nevertheless it appears to not assist with this downside.
I already tried utilizing an AppleScript, that I discovered in one other thread. However it does not work since, Mission Management is just not obtainable as an software within the present OSX.
Consumer
inform software "System Occasions"
do shell script "/Functions/Mission Management.app/Contents/MacOS/Mission Management"
inform course of "Dock"
set countDesktops to rely buttons of record 1 of group 1
--new desktop
click on button 1 of group 1
--switch to new desktop
repeat till (rely buttons of record 1 of group 1) = (countDesktops + 1)
finish repeat
click on button (countDesktops + 1) of record 1 of group 1
finish inform
finish inform
I requested ChatGPT to regulate it and this got here out:
inform software "System Occasions"
-- This is able to be the place you'd simulate opening Mission Management,
-- however since we will not instantly do "Management + Up Arrow", we would contemplate different strategies
-- or handbook activation earlier than working the script.
inform course of "Dock"
set countDesktops to rely buttons of record 1 of group 1
-- Assuming Mission Management is already open, try to create a brand new desktop
click on button 1 of group 1
delay 1 -- Look ahead to the animation to finish; modify delay as vital
-- Try to modify to the brand new desktop, assuming it has been created
set newCountDesktops to rely buttons of record 1 of group 1
if newCountDesktops > countDesktops then
click on button newCountDesktops of record 1 of group 1
finish if
finish inform
finish inform
I saved it as an AppleScript in Automator and assigned a hotkey to it. After I now open mission management manually and press my assigned hotkeys, nothing occurs.
How could I debug this script or in any other case resolve the primary downside ?