I always knew that theres a huge potential in Tea Cups With Lids Amber Rings Wholesale Tea Trays Toddler Sleeping Bags ExtendScrupt Toolkit from Adobe to extend build-in functionality of my favorite Adobe apps, but I never actually had a need to develop anything for myself… until few days back.
I’m currently working on a long term project. It’s a feature animation film called “Jeż Jerzy” (“George the hedgehog”) that should be out mid 2010. I’ve been ask by a group of animators to develop a set of tools for them to help out in animating the characters and other things.
Expressions are fine, but for few of the things I knew I’d need to use ExtendScript Toolkit. So thats how I started my adventure with scripting After Effects. The problem is unfortunatelly designing the GUI for the scripts. ExtendScript Toolkit doesn’t come with any GUI designer, so everything needs to be hard coded in the script. For example to add a simple button:
someObject.add('button', [10,10,80,30], 'Click me');
It seems simple, but is really a pain in the back to do the whole GUI that way. So I thought I’ll build a tool for designing GUI for ExtendScript Toolkit using Adobe AIR. It’s a great idea and I’m sure that all you script developers out there would be grateful for a tool like that, but it would take a lot of work to do it, and since I needed a tool like that right away, I figured out something else.
Before Adobe AIR came along I was a hard core VisualBasic6 developer (stop laughing – it’s the best programming language out there) so I figured out a way, to use VB6 IDE to design my forms, windows, buttons and other elements, and then convert it to ExtendScript.
Since I’m a nice guy I will share this little piece of code with you. Please note that you need to have VisualBasic6 for it to work.
- Open up VB6 and start a new project
- Design your form
- Make sure you set ScaleMode of your form to Pixels
- Add downloaded module to your project
- Add this code for Form_Click
Private Sub Form_Click()
Now run your project, and simply click on your form. The generated ExtendScript code will be placed in your clipboard ready to be pasted into your script.
The way I’m using it is that I have one project file for all of my forms for all of my scripts. To generate code for a specyfic form I simply change the Startup Form in the project properties.
By the way – I will develop Adobe AIR version for this as well… eventually.
Hope you’ll find this useful. Enjoy.