im starting to make a version of enhanced dock for alt tab (application switcher). currently i can identify is alt tab visible with
tell application "System Events" to tell process "Dock" to try
if subrole of list 2 is "AXProcessSwitcherList" then return true
on error
return false
end try
i can identify other ones with
delay 2
tell application "System Events" to tell process "Dock"
if (UI elements count) > 1 then
try
return name of group "Mission Control"
end try
try
return name of group "App Expose"
end try
try
return name of group "Launchpad"
end try
try
list 2
return "App Switcher"
end try
end if
end tell
im sure a variable for these would be useful
missioncontrol_active (currently returns true on Application Switcher and Application Expose)
appexpose_active
launchpad_active
appswitcher_active
I don't think there is a way to know whether app expose is active, as it triggers the same effects as mission control. Unfortunately I'm not aware of any way to differentiate between mission control and app expose ;-(
Same goes for Launchpad and app switcher - maybe there is a way to identify them via the visible window list variable
Hehe that's quite crazy but I think it should work - at least on all macOS Ventura installations. The window levels sometimes change between versions unfortunately...