• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Engaged ,
May 16, 2023 May 16, 2023

Copy link to clipboard

Copied

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.

TOPICS
Scripting

Views

389

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 16, 2023 May 16, 2023

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 ma

...

Votes

Translate

Translate
Adobe
Community Expert ,
May 16, 2023 May 16, 2023

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 17, 2023 May 17, 2023

Copy link to clipboard

Copied

LATEST

   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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines