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

Script can't run correctly when it starts by action

New Here ,
May 21, 2024 May 21, 2024

Copy link to clipboard

Copied

Hi all. I have one strange problem.
1. I have a script which delete actions and upload new versions of deleted

function deleteActionSet(actionSetName) {
    try {
        var iddelete = charIDToTypeID("Dlt ");
        var desc = new ActionDescriptor();
        var ref = new ActionReference();
        ref.putName(charIDToTypeID("ASet"), actionSetName);
        desc.putReference(charIDToTypeID("null"), ref);
        executeAction(iddelete, desc, DialogModes.NO);
    } catch (e) {
        alert(e.message)
    }
}
deleteActionSet("Set1");
deleteActionSet("Set2");

app.load(new File("C:/Program Files/Adobe/My Tools/Actions/Set1Updated.atn"));
app.load(new File("C:/Program Files/Adobe/My Tools/Actions/Set2Updated.atn"));

alert("UPDATED!");

2. I have an action which launch this script

So i have a problem with launching script using actions. After launching action my old actions was deleted and "UPDATE!" message  was showed and thats all. I don't see new, updated, actions. But if i starting script by File-Scripts-Browse it works correctly. Old actions deleting and new adding and i don't know why and how can i fix it.
Sorry for my Eng.

TOPICS
Actions and scripting , Windows

Views

56

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
no replies

Have something to add?

Join the conversation
Adobe