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

[Q] Can the VariableImporter script be triggered from ExtendScript?

Explorer ,
Jan 24, 2025 Jan 24, 2025

I am a huge fan of the VariableImporter script.

 

I was wondering whether I can trigger this script from ExtendScript. I'd be happy with running the default script, transposing the data and specifying the path to the CSV. I think I then need to be able to hit return twice for the script to run.

 

Background:

 

My workflow now is:

- generate an Illy file with ExtendScript

- run VariableImporter script manually to load a CSV

- run some post-processing on the Illy file

 

I guess I could write some ExtendScript code to load a CSV myself but I'm really happy with how VariableImporter works.

Any help appreciated.

TOPICS
How-to , Scripting , Third party plugins
398
Translate
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
Community Expert ,
Jan 26, 2025 Jan 26, 2025

You should just be able to evaluate the script file. Here's a helper function I use for executing other scripts from inside of a script. Let me know if this works for you? Cheers!

function runExternalScript(filePath) {
  f = new File(filePath);
  if (!f.exists) {
    alert("Script Not Found!\nThe script file was not found at the path\n" + filePath);
  } else {
    $.evalFile(f);
  }
}

 

Translate
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
Explorer ,
Feb 04, 2025 Feb 04, 2025

Hi Duncan,

 

Great stuff, thank you very much. Would there also be ways to trigger the return button twice?

Translate
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 ,
Feb 05, 2025 Feb 05, 2025

Not from within the original script that calls the VariableImporter script... You could edit the VariableImporter script to skip any dialogs and just hardcode the values you want it to use. I'm not that familiar with it but it shouldn't be that hard.

Translate
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
Explorer ,
Feb 06, 2025 Feb 06, 2025
LATEST

Jeesh, that is so clever, why didn't I think of that. For some reason, I always think of third party scripts as executables but of course they human readable, editable code.

 

Many thanks for your help.

Translate
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