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

[Tutorial] After Effects ExtendScript Script Writing

Advocate ,
Apr 20, 2013 Apr 20, 2013

Copy link to clipboard

Copied

Hi all, just wanted to share a new tutorial series I have launched today that I think a lot of you may find helpful.

We've all posted here in this forum looking for help with scripting. There are many reasons why too. One of which that keeps making the rounds is the lack of documentation for ExtendScript. When I first started scripting for After Effects five years ago, the CS3 guide is all there was and it did contain the proper information, but as a newbie I was unable to understand the guide to get any real help from it. I didn't know Javascript then and I was super frustrated. Asking questions and searching forums like this was my only option really. No real training existed, that I'm aware of, that truly covered how to use ExtendScript. That is, until now. I have spent the better part of my weekends over the past year recording this training series to give the After Effects community a decent collection of information in one place to help get people started in scripting. This series comes in at over ten hours in length and is being released in segments on a weekly basis as of today. There is a lot to cover in ExtendScript and I do cover much of it. I'm unable to hit 100% of it as I too am still learning some of the more advanced aspects of it. I do cover however the basics of Javascript, looping through project items, creating folders, creating comps, creating layers, reading various project information, building GUI's, creating/reading txt documents, etc...

If you are a newbie looking to learn ExtendScript, a frustrated artist who's confused by programming, a script developer looking for more info, then at one point or another I believe this series will help you.

The first three episodes begin here:

http://provideocoalition.com/news/video/after-effects-extendscript-training-ep-1-2-3

Keep an eye out for more posts each week. thanks, and I hope you find this resource useful.

-David Torno

TOPICS
Scripting

Views

27.5K

Translate

Translate

Report

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
Engaged ,
Apr 21, 2013 Apr 21, 2013

Copy link to clipboard

Copied

Many thanks David, will check it out...

Votes

Translate

Translate

Report

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
Advocate ,
Apr 21, 2013 Apr 21, 2013

Copy link to clipboard

Copied

Thanks, hope you find it helpful.

Votes

Translate

Translate

Report

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
Apr 21, 2013 Apr 21, 2013

Copy link to clipboard

Copied

Excellent. I eagerly anticipate the rest of the series.

Votes

Translate

Translate

Report

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
Advocate ,
Apr 21, 2013 Apr 21, 2013

Copy link to clipboard

Copied

Thanks Todd, with all of our scripting guide communication over the years and the long wait for the CS6 guide, it has always been a passion project of mine to put together a video series on this subject to help people who are in the same boat as I was so many years ago. 🙂 Took me awhile, but here I am and while this is no replacement for the hard work you and Jeff Almasol have put into making the pdf guides, it hopefully will be a nice companion to to smooth over the learning curve of understanding ExtendScript and the CS6 guide for non programming artists like myself. Thank god I have a tech oriented mind, lol. If you are able to help spread the word, please feel free to do so. 😉 Thanks for all your help over the years too, it's very much appreciated. Many beers are owed to you. 😉

Votes

Translate

Translate

Report

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
Apr 21, 2013 Apr 21, 2013

Copy link to clipboard

Copied

> If you are able to help spread the word, please feel free to do so.

You can count on that.

Votes

Translate

Translate

Report

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
Advocate ,
Apr 21, 2013 Apr 21, 2013

Copy link to clipboard

Copied

Much appreciated, friend. 🙂

Votes

Translate

Translate

Report

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
Advocate ,
May 04, 2013 May 04, 2013

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

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
New Here ,
May 05, 2013 May 05, 2013

Copy link to clipboard

Copied

These guides have come at just the right time for me as I too was struggling to understand how ExtendScript was working and how to make the best use of the scripting pdfs.

Looking foward to the rest of your series of videos and hopefully I will be able to automate an idea I have had for sometime with my new understandings of writing scripts.

Thank you for creating these!

Regards

Chris Forrester

Votes

Translate

Translate

Report

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
Advocate ,
May 05, 2013 May 05, 2013

Copy link to clipboard

Copied

You are very welcome Chris. I'm glad to hear from someone that this series is aim at, respond so possitively about it. There are plenty more posts coming, you haven't even reached the half point of the series yet. Thanks for the feedback too, it makes creating these tutorials worth while when hearing from the viewers.

Votes

Translate

Translate

Report

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
Advocate ,
Jun 08, 2013 Jun 08, 2013

Copy link to clipboard

Copied

Episode 10 just went up. I also included the other links here with descriptors so you know what each episode subject focus was.

Episodes 1, 2, & 3:          (Intro / Javascript Basics p1 / Javascript Basics p2)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-1-2-3

Episode 4:          (After Effects Object Model structure overview / Script Preparation and development tips / Single Item Access of various project items, comps and layers)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-4

Episode 5:          (Access Renderqueue items, output modules and file paths / Multiple item access of project items, comps and layers / Batch change all renderqueue items file paths)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-5

Episode 6:          (Collecting data into an Array() / Changing values / Various tips)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-6

Episode 7:          (Create new comps and folders / Create Null, Solid, and Text layers)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-7

Episode 8:          (Create multiple comps of various sizes / Use Undo group / Add solids to match each comp / Various tips)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-8

Episode 9:          (Globally change blue solids to red / Replace solid name blue with red)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-9

Episode 10:          (Build a custom function to collect all CompItem objects / Modify function to dynamically allow for choice of CompItem, FolderItem or FootageItem)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-10

Episode 11:          (Build a GUI with groups, buttons, checkboxes, radio buttons, dropdown lists, progress bars, icon buttons, images, static text, edit text boxes, sliders, scroll bars, panels with names, tabbed panels with multiple tabs, listbox lists, listbox lists with multiple columns, or tree view lists)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-11

Episode 12:          (Build a GUI with groups, buttons, checkboxes, radio buttons, dropdown lists, progress bars, icon buttons, images, static text, edit text boxes, sliders, scroll bars, panels with names, tabbed panels with multiple tabs, listbox lists, listbox lists with multiple columns, or tree view lists)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-12

Votes

Translate

Translate

Report

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
Advocate ,
Jun 22, 2013 Jun 22, 2013

Copy link to clipboard

Copied

Episode 12 went live just a moment ago.

Note to all After Effects CC users, Adobe has changed the ScriptUI for ExtendScript and the code explained in both episode 11 and 12 of my series may not work properly for you. I am trying my best to find out the newly updated info on the ScriptUI and will try to update the tutorials as soon as I can for CC.

If anyone comes across info related to the ScriptUI CC update, I would love to know. thanks.

Votes

Translate

Translate

Report

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
Jun 22, 2013 Jun 22, 2013

Copy link to clipboard

Copied

> If anyone comes across info related to the ScriptUI CC update, I would love to know.

We're working on a post with that information now. It should be up later this week.

Votes

Translate

Translate

Report

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
New Here ,
Jun 25, 2013 Jun 25, 2013

Copy link to clipboard

Copied

hi David just wanna thank you for this video tutorials they are just  great But I would like to know how you changed the background color of the document I tried to do the same in the preferences but it only changes the main window and not the current document it keeps with a white background color or maybe it is only available in Mac cause I use a windows based machine.

Once again thank you for great effort you are pputting those video tutorials  

Votes

Translate

Translate

Report

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
Advocate ,
Jun 25, 2013 Jun 25, 2013

Copy link to clipboard

Copied

Thank you for the kind words Edgar. As far as the background color, I personally didn't code or alter that, it was it's native color. I was using AE CS6 on Mac OS X 10.7.2. Now there also are going to be variances between AE versions as too how the UI looks. Adobe has been changing things each time to better match the script ui look to the current AE application look. So things like grey window panel, square looking buttons, etc... are happening behind the scenes. With that said, there is an option to change background color for Groups, Panels,  via the ScriptUI Graphics object. Jeff Almasol came up with a solution way back when that I still use from time to time. Here is a quick sample of coloring a palette window and a group within that window.

var win = new Window("palette", "New", undefined);     //Creates window

     var grp = win.add("group");

     var but = grp.add("button", undefined, "TEST");

var winGfx = win.graphics;

var black = winGfx.newPen(winGfx.BrushType.SOLID_COLOR, [0,0,0], 1);

var blue = winGfx.newBrush(winGfx.BrushType.SOLID_COLOR, [0,.75,1], 1);

var green = winGfx.newBrush(winGfx.BrushType.SOLID_COLOR, [0,1,0], 1);

var red = winGfx.newBrush(winGfx.BrushType.SOLID_COLOR, [1,0,0], 1);

var yellow = winGfx.newBrush(winGfx.BrushType.SOLID_COLOR, [1,1,0], 1);

grp.graphics.backgroundColor = green;     //Set group color

win.graphics.backgroundColor = red;     //Set window color

win.center();

win.show();

Votes

Translate

Translate

Report

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
New Here ,
Jun 25, 2013 Jun 25, 2013

Copy link to clipboard

Copied

Hey man thanks for giving  me those tips But I realized that my question was not properly made I meant the ESTK´s document background color yours have a grayish color mine is totallly white even after I change it in the ESTK preferences. Maybe that´s how it is in the windows side

only the main window change color not the document´s

Sorry for my poor English   

Votes

Translate

Translate

Report

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
Advocate ,
Jun 25, 2013 Jun 25, 2013

Copy link to clipboard

Copied

Oh, hahaha, well that I did by going to Preferences > Fonts and Colors. I then checked "All Display Items", then chose "Gray" under the "Item Background" dropdown list.

There was a bug I ran into where only certain colors were useable, like the basic colors, not the fancy name colors like Sky Blue. Those would render as solid black. I filed a bug report way back in CS5 I believe and they've never fixed it as far as I know. Last I check was in CS6. Haven't tried changing colors in CC yet though.

Votes

Translate

Translate

Report

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
New Here ,
Jun 25, 2013 Jun 25, 2013

Copy link to clipboard

Copied

Thanks for sharing those tips I´ll give it try

Votes

Translate

Translate

Report

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
Advocate ,
Jul 06, 2013 Jul 06, 2013

Copy link to clipboard

Copied

Episode 14 Just went live.

Episode 1:    (Intro)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-1-2-3

 

Episode 2:    (Javascript Basics p1)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-1-2-3/P2

Episode 3:    (Javascript Basics p2)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-1-2-3/P3

Episode 4:    (After Effects Object Model structure overview / Script Preparation and development tips / Single Item Access of various project items, comps and layers)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-4

Episode 5:    (Access Renderqueue items, output modules and file paths / Multiple item access of project items, comps and layers / Batch change all renderqueue items file paths)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-5

Episode 6:    (Collecting data into an Array() / Changing values / Various tips)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-6

Episode 7:    (Create new comps and folders / Create Null, Solid, and Text layers)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-7

Episode 8:    (Create multiple comps of various sizes / Use Undo group / Add solids to match each comp / Various tips)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-8

Episode 9:    (Globally change blue solids to red / Replace solid name blue with red)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-9

Episode 10:    (Build a custom function to collect all CompItem objects / Modify function to dynamically allow for choice of CompItem, FolderItem or FootageItem)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-10

Episode 11:    (Build a floating GUI with groups, buttons, checkboxes, radio buttons, dropdown lists, progress bars, icon buttons, images, static text, edit text boxes, sliders, scroll bars, panels with names, tabbed panels with multiple tabs, listbox lists, listbox lists with multiple columns, or tree view lists)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-11

Episode 12 Part 1 & 2:    (Build a dockable & floating combo GUI with groups, buttons, checkboxes, radio buttons, dropdown lists, progress bars, icon buttons, images, static text, edit text boxes, sliders, scroll bars, panels with names, tabbed panels with multiple tabs, listbox lists, listbox lists with multiple columns, or tree view lists)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-12

Episode 13:    (ExtendScript Developer Utility script release / Retrieve a list of all project item footage file paths)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-13

Episode 14:    (Processing text strings)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-14

Votes

Translate

Translate

Report

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
Advocate ,
Jul 12, 2013 Jul 12, 2013

Copy link to clipboard

Copied

Not sure if this is a place for comments..

Regarding your Epidsode 13, at the beginning, windows vs dockable panels:

The difference between launching a script from the File tab or the  Window tab is the 'this' object (current object when entering the script).

  • For scripts launched from the File tab (which lists the scripts in the Scripts folder), the 'this' object is the global object: it has no UI, to get a window container one has to create it (var scriptPal = new Window(...))
  • For scripts launched from the Window tab (which lists the scripts in the SciptUI Panels folder), the 'this' object is already a Panel object, which After Effect has instantiated for us to do what we want with. There is no need to create a window container it is already there.

For instance an empty script placed in the Scripts folder does nothing, while placed in the ScriptUI Panels folder it will launch an empty panel. A script with a one line code: this.add("button"); launched from the File tab will cause an error (the global object has no add() method) while launched from the Window tab it will create a panel with a button, etc...

For a unified treatment, one creates a variable for the main UI container, which is either 'this' when 'this' is already a Panel, or a new Window in the (only) other case ('this' is the global object): var pal = (this instanceof Panel) ? this : new Window();

I'm realy sorry if this is obvious to everyone, but it was not for me (!!!) and it's an awful mistery to break when one starts from scratch.

Votes

Translate

Translate

Report

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
Advocate ,
Jul 12, 2013 Jul 12, 2013

Copy link to clipboard

Copied

UQg, that is a great explanation. When explaining the panel vs. window in episode 12 I needed a better explanation and I just didn't have it. If you don't mind I would like to copy this over to the comments for the actual video post to keep it nearby the relavent content to help other newbies. 🙂

Votes

Translate

Translate

Report

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
Advocate ,
Jul 12, 2013 Jul 12, 2013

Copy link to clipboard

Copied

You are welcome. I'm actually glad if you liked it.

Votes

Translate

Translate

Report

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
Advocate ,
Jul 13, 2013 Jul 13, 2013

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

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
Advocate ,
Jul 21, 2013 Jul 21, 2013

Copy link to clipboard

Copied

We create a script that reads a tab delimited document and creates text layers.

Episode 16 Part 1 & 2

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-16

Votes

Translate

Translate

Report

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
Advocate ,
Jul 27, 2013 Jul 27, 2013

Copy link to clipboard

Copied

This week is about exporting property information to a text document as well as property recursion to access multiple properties automatically.

Episode 17:          (Export property info to text document)

http://provideocoalition.com/pvcexclusive/video/after-effects-extendscript-training-ep-17

Votes

Translate

Translate

Report

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