Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Atom text editor for after effects scripting

  • Atom text editor for after effects scripting

    Posted by Andrei Popa on December 6, 2017 at 8:52 am

    Hey guys. I lost quite some time trying to do this with no results whatsoever. Does anyone know how to configure the Atom text editor to run scripts for after effects. It looks and acts way way better than extendscript. But i can’t configure it to run the scripts and I don’t even know what topics to search in order to get there. Any information would be helpful.

    Andrei
    My Envato portfolio.

    Tom Scharstein replied 8 years ago 5 Members · 9 Replies
  • 9 Replies
  • Demarc Johnson

    December 7, 2017 at 1:38 am

    You can use the $.evalFile() method to use upload an external file. Inside evalFile you are going to add the address of the file on your computer. If you are working in Windows use ‘Copy Path’ in the window explorer to get the file’s address. You can code and save the file in Atom or any text editor and After Effects will see the code and run it. Write your code how you usually would in After Effects and everything should be good.

    Tip: Since JavaScript and Expression are very similar languages save your file as a js file which stand for JavaScript. Atom will give you more options as js rather than a txt file.

    I’d also did a video on it in a little bit more detail…
    https://www.youtube.com/watch?v=NXkKGd-6T5s

    //Example:
    var path = "C:\\Users\\Admin\\Desktop\\Coding After Effects\\Episodes\\Back to Basics\\Text Editor\\Document\\expression.js";
    //Use a double backslashes or a single forward slash because a single backslash will take the text out of the string
    $.evalFile(path);

    For Expression Tutorials:
    https://www.youtube.com/channel/UCe77szX2n1WSKsGs-2gmbDw

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

  • Andrei Popa

    December 7, 2017 at 9:11 am

    Thanks for that sir. Great information. But that is not what i was talking about. I know that you can use the Atom text editor to run scripts directly from the editor. I wasn’t talking about expression. Just like you hit that play button in Extendscript. I hope you understand what i mean.

    Andrei
    My Envato portfolio.

  • Demarc Johnson

    December 7, 2017 at 4:05 pm

    I don’t know if it’s possible, but I looked at Atom’s plugins. Out the all the major text editors I would say that Atom has the most plugins (Atom has a lot of plugins). Most of the plugin involving ExtendScript seem to compile it, but not run it. I’ve tried looking at Node.js npm packages which is kind of like a huge plugin database for any text editor, and I didn’t find anything. Just try looking at both Atom’s plugins and npm, even if they don’t have exactly what you want they still have some cool stuff.

    For Expression Tutorials:
    https://www.youtube.com/channel/UCe77szX2n1WSKsGs-2gmbDw

  • Demarc Johnson

    December 10, 2017 at 12:48 am

    Yesterday, I did seen a plugin for Atom called atom-to-photoshop that runs ExtendScript/jsx files. There is a good chance that atom-to-photoshop work with ExtendScript for After Effects by adding #target aftereffects in the first line if not I know that the brackets version does, example here https://github.com/JavierAroche/brackets-to-photoshop. The only catch is it only runs on Mac OS. I have a Windows so I couldn’t try it out, so I don’t know if works, but it’s worth trying. I’m still looking for a Windows solution.

    For Expression Tutorials:
    https://www.youtube.com/channel/UCe77szX2n1WSKsGs-2gmbDw

  • Rainier Raydán

    December 13, 2017 at 7:06 pm

    Hi guys!

    I’m also very interest on this… Atom is way better than ExtendScript but that run buttom… I hope someone finds the answer.

  • Andrew Hildebrand

    January 8, 2018 at 4:15 am

    There’s actually a very useful package for this called Process-Palette (by morassman) that let’s you run shell commands directly from Atom. And you can run Extendscripts directly from there. Same as hitting the play button in Exendscript.

    Go to Atom>Preferences and in Settings choose Install

    Search for Process-Palette under Packages and click Install

    Now from the menu choose Packages > Process Palette > Edit Configuration > Global Configuration

    Click Add to add a new command

    Give it whatever Namespace and Action Name you want.

    Under Shell Command if you’re on a Mac enter:
    osascript -e 'tell application "Adobe After Effects CC 2018" to activate' -e 'tell application "Adobe After Effects CC 2018" to DoScriptFile "{fileAbsPath}"'

    Windows enter:
    "C:\Program Files\Adobe\Adobe After Effects CC 2018\Support Files \afterfx.exe" -r {fileAbsPath}

    Under Keystroke give it a hotkey that’s not used anywhere else in Atom.

    Scroll down to Notifications, and you’ll probably want to turn off both Success & Error

    While you’re at it another package you may want to install is: React.js (by orktes), it makes it so Atom recognizes .jsx files for the auto-color functionality.

  • Andrei Popa

    January 8, 2018 at 10:12 am

    You are a lifesaver. I fell like Smeagol receiving the ring :D. And a bonus. React package is awesome. The batch comman did not work like this though, i had to replace the HTML-code \ with the actual character. Just saying this, in case anyone else has the same problem. Thanks a lot man! I owe you big time!

    Andrei
    My Envato portfolio.

  • Andrew Hildebrand

    January 8, 2018 at 3:48 pm

    You’re definitely right. That’s funny. When I pasted it , it was totally a backslash. The cow must have switched it out.

    Also, for some reason using the hotkey inside of Process Palette gives some kind of error in AE about trying to run the script 2x. To get around it you have to set up the hotkey in the Atom keymap.

    I actually got this info from this tutorial series. https://www.fxphd.com/details/539/
    It’s behind a paywall, but you can just sign up for a month, get access to all of their tutorials, and then cancel. REALLY helpful.

  • Tom Scharstein

    May 14, 2018 at 1:17 am

    I followed the tips here and it would be a great alternative to ExtendScript because I love and use Atom, but Process-Path terminates as soon as the script finishes. If I don’t use an alert() to wait for input, it seems to flash on then close before I can see any results. How do I prevent it from immediately terminating After Effects?

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy