Copy link to clipboard
Copied
Hi
I want to run extendscript in framescript. is it possible ?
Set sMsg = 'C:\DATA\Scripts\Scripto\CallClientTest.jsx';
CallClient FrameClient('ScriptingSupport') Message(sMsg);
Copy link to clipboard
Copied
Hi,
this is a Forum for ExtendScript, but there must be something similar to this in FS:
CallClient("ScriptingSupport", scriptFileName)
Hope this helps
Markus
Copy link to clipboard
Copied
Set sMsg = 'C:\DATA\Scripts\Scripto\CallClientTest.jsx';
CallClient FrameClient('ScriptingSupport') Message(sMsg);
Copy link to clipboard
Copied
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 ?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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;
}