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

[ExtendScript] Illustrator- How to Shear a text

Jan 29, 2025 Jan 29, 2025

Copy link to clipboard

Copied

I’ve been trying for several days to apply shear to text using ExtendScript, but I haven’t been able to get any results. In the GUI, I simply change the value to 7, and that’s it. However, I can’t find a way to do it in the code. This is the property that I want to use with ExtendScript

 

Jaime33551855kfcj_0-1738157534215.png

 

TOPICS
How-to , Scripting

Views

64

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 , Jan 29, 2025 Jan 29, 2025

Hi @Jaime33551855kfcj - Please try the following

 

function applyShearTransform(value) {
    actionString = [
        '/version 3',
        '/name [ 5',
        '	5365742031',
        ']',
        '/isOpen 1',
        '/actionCount 1',
        '/action-1 {',
        '	/name [ 5',
        '		5368656172',
        '	]',
        '	/keyIndex 0',
        '	/colorIndex 0',
        '	/isOpen 1',
        '	/eventCount 1',
        '	/event-1 {',
        '		/useRulersIn1stQuadrant 0',
        '		/internalN
...

Votes

Translate

Translate
Adobe
Participant ,
Jan 29, 2025 Jan 29, 2025

Copy link to clipboard

Copied

I do not think this is possible in a simple way from Extendscript.

 

I do however think you can do this by making a one-time action to load via scripting, using the action to shear, then deleting it. Untested, but just my hunch

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
Community Expert ,
Jan 29, 2025 Jan 29, 2025

Copy link to clipboard

Copied

LATEST

Hi @Jaime33551855kfcj - Please try the following

 

function applyShearTransform(value) {
    actionString = [
        '/version 3',
        '/name [ 5',
        '	5365742031',
        ']',
        '/isOpen 1',
        '/actionCount 1',
        '/action-1 {',
        '	/name [ 5',
        '		5368656172',
        '	]',
        '	/keyIndex 0',
        '	/colorIndex 0',
        '	/isOpen 1',
        '	/eventCount 1',
        '	/event-1 {',
        '		/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 [ 6',
        '				53686561723a',
        '			]',
        '			/value 4',
        '		}',
        '		/parameter-2 {',
        '			/key 1986096245',
        '			/showInPalette 4294967295',
        '			/type (unit real)',
        '			/value ' + value.toFixed(1),
        '			/unit 591490663',
        '		}',
        '	}',
        '}'
    ].join('\n')
    var f = new File(Folder.desktop + "/shear.aia");
    if (f.exists) {
        f.remove();
    }
    f.open('w')
    f.write(actionString)
    f.close()
    app.loadAction(f)
    app.doScript('Shear', 'Set 1')
    app.unloadAction('Set 1', '');
    f.remove();
}

applyShearTransform(7);

 

 

Best regards

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