Highlighted

Actions to Javascript

New Here ,
May 27, 2020

Copy link to clipboard

Copied

Hello there,

 

Does anyone know of any scripts or methods that exist in which you can output the actions from illustrator?

 

For example, drawing a rectangle in Illustrator would be translated to:

 

var rec1 = docRef.pathItems.rectangle(0, 0, 100, 100);

 

 

TOPICS
Scripting

Views

372

Likes

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

Actions to Javascript

New Here ,
May 27, 2020

Copy link to clipboard

Copied

Hello there,

 

Does anyone know of any scripts or methods that exist in which you can output the actions from illustrator?

 

For example, drawing a rectangle in Illustrator would be translated to:

 

var rec1 = docRef.pathItems.rectangle(0, 0, 100, 100);

 

 

TOPICS
Scripting

Views

373

Likes

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
May 27, 2020 0
Adobe Community Professional ,
May 27, 2020

Copy link to clipboard

Copied

Hi, as far as I know, this is not possible. You can record the actions in the illustrator and save the action file. The action file will look like

 

/version 3
/name [ 5
	5365742031
]
/isOpen 1
/actionCount 1
/action-1 {
	/name [ 8
		416374696f6e2031
	]
	/keyIndex 0
	/colorIndex 0
	/isOpen 1
	/eventCount 2
	/event-1 {
		/useRulersIn1stQuadrant 0
		/internalName (ai_plugin_rectTool)
		/localizedName [ 14
			52656374616e676c6520546f6f6c
		]
		/isOpen 1
		/isOn 1
		/hasDialog 1
		/showDialog 0
		/parameterCount 6
		/parameter-1 {
			/key 1953460076
			/showInPalette 4294967295
			/type (integer)
			/value 15
		}
		/parameter-2 {
			/key 2003072104
			/showInPalette 4294967295
			/type (unit real)
			/value 102.7972027972
			/unit 592476268
		}
		/parameter-3 {
			/key 1751607412
			/showInPalette 4294967295
			/type (unit real)
			/value 57.3426573427
			/unit 592476268
		}
		/parameter-4 {
			/key 1668182644
			/showInPalette 4294967295
			/type (boolean)
			/value 0
		}
		/parameter-5 {
			/key 1668183128
			/showInPalette 4294967295
			/type (unit real)
			/value 141.4405594406
			/unit 592476268
		}
		/parameter-6 {
			/key 1668183129
			/showInPalette 4294967295
			/type (unit real)
			/value -170.6153846154
			/unit 592476268
		}
	}
	/event-2 {
		/useRulersIn1stQuadrant 0
		/internalName (ai_plugin_transformPalette)
		/localizedName [ 15
			5472616e73666f726d2050616e656c
		]
		/isOpen 1
		/isOn 1
		/hasDialog 0
		/parameterCount 2
		/parameter-1 {
			/key 1954115685
			/showInPalette 4294967295
			/type (enumerated)
			/name [ 24
				536574205265666572656e636520506f696e7420546f3a20
			]
			/value 8
		}
		/parameter-2 {
			/key 1919247984
			/showInPalette 4294967295
			/type (enumerated)
			/name [ 8
				546f70204c656674
			]
			/value 0
		}
	}
}

 

 

I recorded this action to draw a reactangle.

 

Best regards

Likes

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
Reply
Loading...
May 27, 2020 1
Adobe Community Professional ,
May 27, 2020

Copy link to clipboard

Copied

are you looking for something similar to ScriptListener in Photoshop? no, there isn't anything like that for Illustrator.

Likes

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
Reply
Loading...
May 27, 2020 2
Resources