InDesign 2024 - startup script to disable (uncheck) Contextual Task Bar

I am looking for a startup script to disable the new Contextual Task Bar. I am about to push out InDesign 2024 to our 20+ designers and would like to disable this new feature from the get-go. The startup script just needs to uncheck “Contextual Task Bar” in the Window dropdown menu.

It’s not something I can test but it might look like this. Change the particulars as required.

tell application "InDesign"
	activate
	tell application "System Events" to tell application process "InDesign"
		
		-- open Window menu
		perform action "AXPress" of menu "Window" of menu bar item "Window" of menu bar 1
		delay 0.2
		
		set mictb to menu item "Contextual Task Bar" of menu "Window" of menu bar item "Window" of menu bar 1
		set selected of mictb to true -- visual indicator of menu item, optional
		
		-- note: this action will toggle checkmark
		perform action "AXPress" of mictb
		
	end tell
end tell

I can’t know how the checkmark in indesign works so here is an example using Safari.

tell application "Safari"
	activate
	tell application "System Events" to tell application process "Safari"
		
		-- open Develop menu
		perform action "AXPress" of menu "Develop" of menu bar item "Develop" of menu bar 1
		delay 0.2
		set mij to menu item "Allow JavaScript from Apple Events" of menu "Develop" of menu bar item "Develop" of menu bar 1
		
		set selected of mij to true
		-- note: this action will toggle checkmark
		perform action "AXPress" of mij
		
	end tell
end tell

As to deployment, you’re on your own.

This is great. Thank you. I am hoping to set it up as a startup script. Now I just need to figure out a way to have the script recognize that “Contextual Task Bar” is unchecked so it doesn’t activate it again on startup.

Glad if it helps.

I’m not sure how to approach the ‘is it unchecked’ matter. There doesn’t seem to be any built-in property that covers that. Hope you can figure it out.

Just in case:

You can access and manipulate InDesign menus using its own dictionary:

I can’t offer any ready-to-use script right now but you may want to explore this further.

p.s. although, as i realize now, all menu item properties are read-only

Use it as part of an if…then block and you should be able to control whether the ‘press’ is done or not.

Hi @matthew.fry,

Do not use GUI Scripting in an InDesign startup script. It will be unreliable. Espescially if you want to deploy your script in 20 machines.
What do you mean exactly by Contextual Task Bar? Can you provide us with a screenshot?

@leo_r

All properties of a menu item are read only because they don’t need to be changed. They are here just to help the scripter to decide should he select or not the menu item in question.
Selecting a menu item can be done by performing the attached menu action:

tell application id "InDn"
	set theMenu to menu element "Aide d'InDesign..." of submenu "Aide" of menu "Main"
	invoke associated menu action of theMenu
end tell

In InDesign 2024, the Contextual Task Bar lets users access Adobe’s AI Text to Image photo/art generator.

You don’t need a script: uncheck the menu, make a new Workspace and when prompted to save it, check on the Save Menu Customization choice.
Now you can share the Workspace file which you can find in “/Users/userName/Library/Preferences/Adobe InDesign/Version 19.5/en_US/Workspaces/”. You’ll have to change userName, version and locale (in bold).