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

How to set my path

Participant ,
Aug 28, 2013 Aug 28, 2013

Copy link to clipboard

Copied

I would like to include a script in a script... but this won't work please help.

var loadvars = File(app.path+'/Infopanel/Contents/Vars/vars.jsx');

#include loadvars

Thanks Daniel

TOPICS
Scripting

Views

673

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
Engaged ,
Aug 28, 2013 Aug 28, 2013

Copy link to clipboard

Copied

You haven't included a lot of information, but perhaps you could include it in the same script as a function and call it when you need it.

info on using functions\/

http://www.codecademy.com/courses/javascript-beginner-en-6LzGd?curriculum_id=506324b3a7dffd00020bf66...

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
Guru ,
Aug 28, 2013 Aug 28, 2013

Copy link to clipboard

Copied

LATEST

See Preprocessor Directives in the Toolkit Guide… The #include wants a file name string not a File Object.

I think it will default to Folder Current ( where the calling script is ) otherwise you will need to specify relative path using #includepath

#target illustrator

#include 'myScriptName.jsx'

//#includepath 'aRelativePath'

testMyExternalFunctions( 'muppet' );

#target illustrator

function testMyExternalFunctions( mess ) {

   

    alert( mess );

   

};

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