Copy link to clipboard
Copied
Hi everyone!
Does anyone know if it is possible to access, add or open another script or plugin through a button?
This is because I bought a very useful script on http://aescripts.com/, called Un-PreCompose from Batch Frame Software (http://aescripts.com/un-precompose/). My idea now is to create a button where I can access this script / plugin through simply clicking a GUI button. This because I then don't have to go up to Layer -> Un-PreCompose everytime I gonna use it (it's often!).
The file is a .AEX file and the script / plugin lie under layer in The AE Menu.
Un-PreCompose is also installed under the support files -> plugins folder
1 Correct answer
Correct answer:
Run plug-in:
David Torno
http://forums.adobe.com/message/5833529#5833529
Run script from script:
var file = new File('/c/Program Files/Adobe/Adobe After Effects CS6/Support Files/Scripts/_Your_Script_.jsx');
file.open("r");
eval(file.read());
file.close();
}
Copy link to clipboard
Copied
aescripts+aeplugins also has ft-Toolbar which does exactly that. you can create buttons to launch scripts, apply plugins, etc...
Copy link to clipboard
Copied
Hi David Trono
Yes, I know about ft-Toolbar!
Looks like a very good script. But right now I'm trying to learn AE scripting, and decided that I would try to make my own toolbar. I thought it would be a great challenge for me and a good way to learn scripting in AE.
So that's why I'm wondering about this question.
Do you know how I can script it by myself? I've already made ​​all the rest of my own toolbar, the only thing I'm missing is just the function to import the script / plugin Un-PreCompose.
Anyway thanks for the reply!
Copy link to clipboard
Copied
Page 52 of the Javascript Tools Guide pdf mentions this. I believe there are a few ways to launch scripts from a script. I haven't messed much with doing that though.
execute()
fileObj.execute ()
Opens this file using the appropriate application, as if it had been double-clicked in a file browser.
You can use this method to run scripts, launch applications, and so on.
Returns true immediately if the application launch was successful.
Copy link to clipboard
Copied
Ok, thank you. Will try it out!
Copy link to clipboard
Copied
Did not get the function to work
execute()
fileObj.execute ()
Does anyone know how I can open a plugin / script (the file is a. AEX) with a button?
Copy link to clipboard
Copied
I am unaware of what .aex files are. I was under the impression you were launching a .jsx or .jsxbin After Effects script or you were trying to apply an effects plugin to a layer within After Effects.
Copy link to clipboard
Copied
Thanks for your help anyway. I think the code you gave me and the page number will be verry helpful to me in further research.
I did some research, and found out that: .plugin are used on MAC while, .aex are used on Win.
Copy link to clipboard
Copied
Correct answer:
Run plug-in:
David Torno
http://forums.adobe.com/message/5833529#5833529
Run script from script:
var file = new File('/c/Program Files/Adobe/Adobe After Effects CS6/Support Files/Scripts/_Your_Script_.jsx');
file.open("r");
eval(file.read());
file.close();
}
Copy link to clipboard
Copied
Ah, you are trying to run a script, not a plugin. That makes sense. just for future reference, a plugin generally referrs to the effect filter plugins of After Effects that you apply directly to a composition layer. Stuff like Blur, Distort, CC Glass, etc... It can probably be argued that Scripts are plugins as well, but for sake of clarity, Scripts usually apply, move, modify, effect plugin properties and/or help create pseudo plugins.
Glad you figured out your issue either way.
Copy link to clipboard
Copied
Thanks for your tips David!

