Close window in Indesign

Hi,

I want to close a window in Indesign (for example: Links). How can I do this with applescript?

InDesign’s scripting dictionary does not include a way to show and hide palettes.

The closest thing to what you need is to use the keyboard shortcut for the palette you want.

Like for Links it would be command-shift-D

tell application "Adobe InDesign CS4"
	activate
	delay 1
	tell application "System Events"
		keystroke "D" using {command down, shift down}
	end tell
end tell

thanks…

I am afraid I wil not work for me… :frowning:

The panel I want to close is a panel of a plug-in of Indesign. I searched de shortcut keys but I can’t give the panel a shortcut :frowning:

You can close the (Applications) panels with the following:


tell application "Adobe InDesign CS3"
	activate
	set visible of every panel whose name is "Links" to false
end tell

Not sure if this will work for any “plug-in” panel tho!

You could try and get all of the properties of all of the panels with:


tell application "Adobe InDesign CS3"
	activate
	set wProp to properties of every panel
	get wProp
end tell

and see if your plug-in panel appears in the result.