Copy link to clipboard
Copied
I use a fairly popular extention called KBar. One of it's uses is to launch menu items with a button interface.
However when I try to use it to "Run Script File..." it throws me an error "Affer Effects worning: Attempt was made to run a second script while another script was already running. Scond script was not run. Try launching AE with the -ro or -so flag to override this behaviour."
This was not a problem with ftToolbar another "depricated" toolbar extention.
When I contacted the vendor, they said that something changed at Adobe and that they've contacted you about it.
So I hope that you all might be able to fix what ever changed, or allow this one command to be possible with KBar and other tools.
Thanks.
So all you want is to have a dialog box popup to select a script file and then run that script? You can easily rewrite that functionality like this:
var path = File.openDialog('Run a script', ['*.jsx'], false);
if(path){
$.evalFile(path);
}
Copy link to clipboard
Copied
It sounds like an issue with the script file. Is it a script you wrote of from somewhere else? Do you get the same error when you run it directly from AE without KBar?
Copy link to clipboard
Copied
I think you misunderstand.
When I want to have a KBar button that executes "Run Script File..." from the File/Scripts menu I get the error.
The KBar guys say it's something in the Adobe code that they can not get around. I recall something about a script (KBar) running a second script (Whatever json file I'm using from Syntheyes).
Running json files works as expected from the menu, just running them from a Kbar button that Opens the Run script dialog fails.
Copy link to clipboard
Copied
Typically you can't just run a JSON file, as it's just data, no execution instructions like a JS file. I haven't used Kbar a ton, but I think it stores it's script prefs in JSON files, is that what you're referring to?
Are you saying that you're trying to use Kbar to launch the Syntheyes panel?
Copy link to clipboard
Copied
Apologies. I meant to write .jsx file. When tracking in SE, it generates a jsx file that builds a scene with camera, trackers, geo, etc. This is the file I am trying to "launch" from a KBar button. ftToolbar didn't have this issue, KBar can't do it.
The response I get from KBar is as follows,
"it kills me everytime someone points this out. Tragically this is a restriction of the technology After Effects provides that allowed me to build KBar (i.e. CEP). There's no way for me to fix this. It can only be fixed by Adobe."
So to be clear, I would like to make a button on KBar, that executes File>Scripts>Run Script File...
That should open up the Open Script dialog box where I can then path to a specific .jsx file. That's it.
Copy link to clipboard
Copied
Hmm, well that's interesting. I'm not familiar with any limitations to running jsx files in CEP or ExtendScript. Is the issue with actually running the file or just finding where SE saved the JSX file?
Copy link to clipboard
Copied
None that I'm aware of.
Again. That's not the problem I'm reporting. Just the inability to create a button that executes "File>Scripts>Run Script File..."
Copy link to clipboard
Copied
So all you want is to have a dialog box popup to select a script file and then run that script? You can easily rewrite that functionality like this:
var path = File.openDialog('Run a script', ['*.jsx'], false);
if(path){
$.evalFile(path);
}
Copy link to clipboard
Copied
Well, I don't know about easy (not a coder), but this, THIS was it! I was able to make a scriptlet button to launch this, and it works as advertised.
Thank you so very much.
Copy link to clipboard
Copied
Awesome!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now