I am trying to write an applescript to hide the menubar in fullscreen when i watch movies. Otherwise i want it always turned on. I have come so far as to reveal the tab "Dock & Menu Bar" but i don't know how to click the right checkbox. The following code is what i have come up with but as stated it isn't much.
tell application "System Preferences" activate set the current pane to pane id "com.apple.preference.dock" end tell
For reference: I want to click the checkbox "Automaticly hide and show the menu bar in full screen"