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

How can I run extendscript in framescript

Community Beginner ,
Jul 04, 2019 Jul 04, 2019

Hi

I want to run extendscript in framescript. is it possible  ?

TOPICS
Scripting
1.4K
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

Community Expert , Jul 04, 2019 Jul 04, 2019

Set sMsg = 'C:\DATA\Scripts\Scripto\CallClientTest.jsx';

CallClient FrameClient('ScriptingSupport') Message(sMsg);

Translate
Engaged ,
Jul 04, 2019 Jul 04, 2019

Hi,

this is a Forum for ExtendScript, but there must be something similar to this in FS:

CallClient("ScriptingSupport", scriptFileName)

Hope this helps

Markus

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 ,
Jul 04, 2019 Jul 04, 2019

Set sMsg = 'C:\DATA\Scripts\Scripto\CallClientTest.jsx';

CallClient FrameClient('ScriptingSupport') Message(sMsg);

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 Beginner ,
Jul 04, 2019 Jul 04, 2019

Thanks. but how can I return value from extendscript to framescript

I found this:

CallClient FrameClient('ScriptingSupport') Message(sMsg) ReturnVal(retVar);

how to send retVar from extendscript ?

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 ,
Jul 04, 2019 Jul 04, 2019

I don't think you can. You can try returning a value at the end of your ExtendScript script's main function, but I am not sure if it will work. Another way to do it is to have your ExtendScript script write a value to a file, then have FrameScript pick it up from the file.

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 Beginner ,
Nov 25, 2020 Nov 25, 2020

Hi,

 

do you know if I can pass argument from framescript to extendscript (doc object of active doc) ?

 

i try to use in extendscript ActiveDoc but the doc is opened in invisible mode and that's why it doesn't work.

 

 

 

 

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 ,
Nov 25, 2020 Nov 25, 2020
LATEST

You can't pass in parameters directly, but you could have your ExtendScript script loop through the open documents until it finds the one you are looking for. As long as the document is open, the loop will find it, even though it is invisible. Something like this:

 // Loop through the open documents in the session.
 doc = app.FirstOpenDoc;
 while (doc.ObjectValid () === 1) {
     // Use some criteria to locate the desired document.
     if (...) {
         return doc;
     }
     doc = doc.NextOpenDocInSession;
 }
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