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

Can I implement anchor delete as a script?

Explorer ,
Sep 02, 2022 Sep 02, 2022

Copy link to clipboard

Copied

Untitled-1.jpg

 

As you know, When use pen tool, sometimes delete(To be exact, delete the path to the next direction and restart it at the desired point) anchor point.
Its simple. just alt and click that point.

But my question is, when the path is active like that, can I delete the next path with a script instead of directly deleting it with an alt-click?
If i path quickly, it can be annoying to click on the dot again like that, so if you can write a script, you can designate it as a convenient shortcut and work efficiently right away.

So. Alt + Click (for Delete anchor path line?) can make Script?

TOPICS
Actions and scripting

Views

108

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
Adobe
Explorer ,
Sep 02, 2022 Sep 02, 2022

Copy link to clipboard

Copied

I installed a script listener and tried to extract what I wanted. Alt Click Anchor Point.
And Run VScode, Delete Host~state? and History State? I don't know what it is. I searched it on YouTube and did what I saw.

And this i got the code. But it's not work... =(......



// =======================================================
var idtoolModalStateChanged = stringIDToTypeID( "toolModalStateChanged" );
var desc276 = new ActionDescriptor();
var idLvl = charIDToTypeID( "Lvl " );
desc276.putInteger( idLvl, 1 );
var idStte = charIDToTypeID( "Stte" );
var idStte = charIDToTypeID( "Stte" );
var identer = stringIDToTypeID( "enter" );
desc276.putEnumerated( idStte, idStte, identer );
var idTool = charIDToTypeID( "Tool" );
var desc277 = new ActionDescriptor();
var idIdnt = charIDToTypeID( "Idnt" );
desc277.putString( idIdnt, """penT""" );
var idTtl = charIDToTypeID( "Ttl " );
desc277.putString( idTtl, """Pen Tool""" );
var idTool = charIDToTypeID( "Tool" );
desc276.putObject( idTool, idTool, desc277 );
var idselectedTool = stringIDToTypeID( "selectedTool" );
var desc278 = new ActionDescriptor();
var idIdnt = charIDToTypeID( "Idnt" );
desc278.putString( idIdnt, """penT""" );
var idTtl = charIDToTypeID( "Ttl " );
desc278.putString( idTtl, """Pen Tool""" );
var idTool = charIDToTypeID( "Tool" );
desc276.putObject( idselectedTool, idTool, desc278 );
var idKnd = charIDToTypeID( "Knd " );
var idKnd = charIDToTypeID( "Knd " );
var idmouse = stringIDToTypeID( "mouse" );
desc276.putEnumerated( idKnd, idKnd, idmouse );
var idkcanDispatchWhileModal = stringIDToTypeID( "kcanDispatchWhileModal" );
desc276.putBoolean( idkcanDispatchWhileModal, true );
executeAction( idtoolModalStateChanged, desc276, DialogModes.NO );

// =======================================================
var idtoolModalStateChanged = stringIDToTypeID( "toolModalStateChanged" );
var desc279 = new ActionDescriptor();
var idLvl = charIDToTypeID( "Lvl " );
desc279.putInteger( idLvl, 0 );
var idStte = charIDToTypeID( "Stte" );
var idStte = charIDToTypeID( "Stte" );
var idexit = stringIDToTypeID( "exit" );
desc279.putEnumerated( idStte, idStte, idexit );
var idTool = charIDToTypeID( "Tool" );
var desc280 = new ActionDescriptor();
var idIdnt = charIDToTypeID( "Idnt" );
desc280.putString( idIdnt, """penT""" );
var idTtl = charIDToTypeID( "Ttl " );
desc280.putString( idTtl, """Pen Tool""" );
var idTool = charIDToTypeID( "Tool" );
desc279.putObject( idTool, idTool, desc280 );
var idselectedTool = stringIDToTypeID( "selectedTool" );
var desc281 = new ActionDescriptor();
var idIdnt = charIDToTypeID( "Idnt" );
desc281.putString( idIdnt, """penT""" );
var idTtl = charIDToTypeID( "Ttl " );
desc281.putString( idTtl, """Pen Tool""" );
var idTool = charIDToTypeID( "Tool" );
desc279.putObject( idselectedTool, idTool, desc281 );
var idKnd = charIDToTypeID( "Knd " );
var idKnd = charIDToTypeID( "Knd " );
var idmouse = stringIDToTypeID( "mouse" );
desc279.putEnumerated( idKnd, idKnd, idmouse );
var idkcanDispatchWhileModal = stringIDToTypeID( "kcanDispatchWhileModal" );
desc279.putBoolean( idkcanDispatchWhileModal, true );
executeAction( idtoolModalStateChanged, desc279, DialogModes.NO );

 

 

If i test that script in photoshop(When Use Pen tool), Error Coming..
dwdwad.png

Is there anyone who can help me?

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 ,
Sep 02, 2022 Sep 02, 2022

Copy link to clipboard

Copied

I've found that you can't edit a path using scripts. You can reconstruct the entire path with a script. I would love to know if someone can do this.

Also anything you get with modal change in scriptListener is garbage. 

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 ,
Sep 05, 2022 Sep 05, 2022

Copy link to clipboard

Copied

LATEST

Please provide meaningful screenshots (including all pertinent Panels) to clarify the exact process and the Tool you are using. 

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