Skip to main content
Inspiring
May 16, 2023 9:26 PM UTC
Answered

Need to change Area Type Options with a script (Fixed width and Auto Size)...

I'm looking for a way to turn on the Fixed width and Auto-Size options of a newly created area type object in extendscript.  Does anyone know how to do this? In Illustrator, these options are available from the menu: Type -> Area Type Options.

This topic is closed to new replies. Start a new post to keep the conversation going.
m1b
m1bCorrect answer
Community Expert
May 16, 2023 11:47 PM UTC

Hi @jsavage77, good question. I've had a bit of a deep dive, and here's what I found (which isn't much!).

 

1. The Fixed checkboxes properties don't seem to be exposed to the scripting API, and they also don't seem to be exposed via actions either. So I don't know how to set them.

 

2. I couldn't find the Auto Size property in the object model either. It can be set via a script via a dynamic action. Let me know if you want to go that way and I will post an option. Here is what the .aia action markup looks like to just set the Auto Size:

 

 

/version 3
/name [ 10
	54657374416374696f6e
]
/isOpen 1
/actionCount 1
/action-1 {
	/name [ 21
		53657420417265612054797065204f7074696f6e73
	]
	/keyIndex 0
	/colorIndex 0
	/isOpen 0
	/eventCount 1
	/event-1 {
		/useRulersIn1stQuadrant 0
		/internalName (adobe_SLOAreaTextDialog)
		/localizedName [ 17
			417265612054797065204f7074696f6e73
		]
		/isOpen 1
		/isOn 1
		/hasDialog 0
		/parameterCount 1
		/parameter-1 {
			/key 1952539754
			/showInPalette 4294967295
			/type (integer)
			/value 1
		}
	}
}

 

 

The final /value 1 is the Auto Size setting. Change it to /value 0 to turn off.

- Mark

2 replies

jsavage77Author
Inspiring
May 17, 2023 5:26 PM UTC

   Thank you.  I wish there was a way to change the AutoSize without having to bring an action in.

I do see there's an option to default the auto-size option on all new area type (Edit->Preferences->Type...) but it looks like that doesn't actually apply to area type created with a script. (bug?)

 

Adobe needs to give ExtendScript some love IMO - so many missing features.

Translate
m1b
Community Expert
m1bCommunity ExpertCorrect answer
Community Expert
May 16, 2023 11:47 PM UTC

Hi @jsavage77, good question. I've had a bit of a deep dive, and here's what I found (which isn't much!).

 

1. The Fixed checkboxes properties don't seem to be exposed to the scripting API, and they also don't seem to be exposed via actions either. So I don't know how to set them.

 

2. I couldn't find the Auto Size property in the object model either. It can be set via a script via a dynamic action. Let me know if you want to go that way and I will post an option. Here is what the .aia action markup looks like to just set the Auto Size:

 

 

/version 3
/name [ 10
	54657374416374696f6e
]
/isOpen 1
/actionCount 1
/action-1 {
	/name [ 21
		53657420417265612054797065204f7074696f6e73
	]
	/keyIndex 0
	/colorIndex 0
	/isOpen 0
	/eventCount 1
	/event-1 {
		/useRulersIn1stQuadrant 0
		/internalName (adobe_SLOAreaTextDialog)
		/localizedName [ 17
			417265612054797065204f7074696f6e73
		]
		/isOpen 1
		/isOn 1
		/hasDialog 0
		/parameterCount 1
		/parameter-1 {
			/key 1952539754
			/showInPalette 4294967295
			/type (integer)
			/value 1
		}
	}
}

 

 

The final /value 1 is the Auto Size setting. Change it to /value 0 to turn off.

- Mark

Translate