


Tell process frontApp to set frontmost to trueĭo shell script "lsappinfo setinfo -app " & quoted form of frontApp & " ApplicationType=UIElement" (*fix to make sure the menu bar is not stuck*) Tell process frontApp to set value of attribute "AXFullScreen" of first window to false


Tell process frontApp to set value of attribute "AXFullScreen" of first window to not isFullScreenĭo shell script "lsappinfo setinfo -app " & quoted form of frontApp & " ApplicationType=Foreground" Tell process frontApp to set isFullScreen to value of attribute "AXFullScreen" of first window Set frontApp to (localizedName of runningApp) as text Repeat with runningApp in current application's NSWorkspace's sharedWorkspace's runningApplications() Save the following AppleScript to a file named fullscreen.scpt: use framework "AppKit"
