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

Pass Variable From Javascript to AppleScript

Enthusiast ,
May 06, 2016 May 06, 2016

Hi All,

My request is zip the folder.

I create the folder using Javascript and the variable is "Folder_Path"

For to zip, I pass the Folder_Path variable to the AppleScript. But can't success.

Please help

Regards

Siraj

TOPICS
Scripting
764
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

correct answers 1 Correct answer

People's Champ , May 08, 2016 May 08, 2016

have a look at scripts args ;

var main = function() {

  app.scriptArgs.setValue ("path", "/path/to/folder" );

  var scpt  = 'tell application "Adobe InDesign CC 2015"\

  tell script args\

  set v to get value name "path"\

  display dialog  v\

  end tell\

  end tell';

  app.doScript ( scpt, ScriptLanguage.applescriptLanguage );

}

main();

HTH

Loic

Ozalto | Productivity Oriented - Loïc Aigon

Translate
People's Champ ,
May 08, 2016 May 08, 2016
LATEST

have a look at scripts args ;

var main = function() {

  app.scriptArgs.setValue ("path", "/path/to/folder" );

  var scpt  = 'tell application "Adobe InDesign CC 2015"\

  tell script args\

  set v to get value name "path"\

  display dialog  v\

  end tell\

  end tell';

  app.doScript ( scpt, ScriptLanguage.applescriptLanguage );

}

main();

HTH

Loic

Ozalto | Productivity Oriented - Loïc Aigon

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