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

KBar can't "Run Script File..."

Contributor ,
Nov 15, 2019 Nov 15, 2019

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.

TOPICS
Error or problem , Scripting , SDK
4.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 , Jan 07, 2020 Jan 07, 2020

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);
}

 

Translate
Community Expert ,
Jan 02, 2020 Jan 02, 2020

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?

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
Contributor ,
Jan 07, 2020 Jan 07, 2020

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.

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 ,
Jan 07, 2020 Jan 07, 2020

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?

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
Contributor ,
Jan 07, 2020 Jan 07, 2020

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.

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 ,
Jan 07, 2020 Jan 07, 2020

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?

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
Contributor ,
Jan 07, 2020 Jan 07, 2020

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..."

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 ,
Jan 07, 2020 Jan 07, 2020

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);
}

 

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
Contributor ,
Jan 07, 2020 Jan 07, 2020

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.

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 ,
Jan 07, 2020 Jan 07, 2020
LATEST

Awesome!

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