ExtendScript GUI Designer

Posted on 26. Nov, 2008 by in Blog

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.

Download: VB6 ExtendScript GUI Designer (Visual Basic 6)

Usage instructions:

  1. Open up VB6 and start a new project
  2. Design your form
  3. Make sure you set ScaleMode of your form to Pixels
  4. Add downloaded module to your project
  5. Add this code for Form_Click

Private Sub Form_Click()
GenerateExtendScriptGUI Me
End Sub

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.

Tags:

6 Responses to “ExtendScript GUI Designer”

  1. David Holtkamp

    27. Nov, 2008

    Why am I not surprised that you managed to use VB6 for this? C#, i’m telling you, its great.

  2. Maltaannon

    27. Nov, 2008

    Hehe – I bet it is. It’s just that it took just few lines of code. And once again… its not my application. I’m just using VB’s GUI designer interface, and then I’m enumerating all the controls on the form and create ExtendScript compliant code. Clever, huh?

  3. David Holtkamp

    29. Nov, 2008

    Yeah it is. It really was/is a great language. And truthfully, I have no room to talk. I did the same thing to make windows for the “Synchronize” plug-in using the VB windows manager to make code to create windows for the old Adobe Dialog Mangaer (ADM). A couple months later they ripped it out of the next release. I’m still a bit bitter…

  4. Jim

    05. Dec, 2008

    Thanks for the neat tool.

  5. Jesus

    05. Jul, 2009

    An error found!

    VisualBasic complains of the use of ‘Me’ keyword on line 81.
    Where it says Me.Name, must say myform.Name

    script = script + myform.Name + “.center(); ” + myform.Name + “.show();”

    Now it works as expected. Great work!

  6. Jon

    14. Oct, 2009

    Neat Idea. Let me know if you ever get the Air version setup.
    I’m hard coding things, but if you could get enough of the major options automated it would be simpler.