Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects AE Script: Need to infer Script directory cross-platform

  • AE Script: Need to infer Script directory cross-platform

    Posted by Ryan Wieber on May 27, 2010 at 1:11 am

    This seems like something many folks would need to do, but I have been running around going nuts the last couple days trying to find how to do this.

    I am trying to write a script that can be dropped into the AE ScriptsUI folder along with an AEP. When the user runs the panel, it will import and utilize the AEP. The importing-a-project part is easy… but the thing is, I don’t really want to explicitly have a file path to where the scriptsUI folder is on MY computer. That doesn’t apply to everyone. I want this script to work for people that have different versions of AE (CS3 and up), different versions of Windows, different versions of Mac OS…

    I would have thought somewhere I could call up a property where AE simply knows the directory where it’s running from, and then I could modify the path from there… but I can’t seem to find anything like that. Does anyone know what I could do? Or, perhaps a smarter way of doing this?

    Thanks

    Ryan

    Ryan Wieber replied 16 years, 2 months ago 33,937 Members · 2 Replies
  • 2 Replies
  • Ryan Wieber

    May 27, 2010 at 6:45 pm

    …really? This is asking the impossible? I mean, come on, at the very least, my backup plan is to do an OS check, and based on that, simply guess the usual file paths it tends to be installed to, until it hits one that exists. I’d think that would work for many cases… but not all.

    Doesn’t it seem like, when After Effects is running, that it would know *where* it’s running?

  • Ryan Wieber

    May 28, 2010 at 6:23 pm

    I think you misunderstand my intention. I’ll attempt to elaborate.

    The goal is not to run the AEP in order to run the script. That would, indeed, be backwards. I’m conceiving of a script that loads lots of pre-created elements for the user, into their own project. Rather than do a boatload of scripting to generate these elements, it would seem much easier to have an AEP full of these elements (like comps and such) that the script simply opens and imports. So the AEP is simply a resource file that the script needs. The script is kind of an import tool, invoked within whatever project the user is working on.

    Which is why I’m trying to think of a logical and reliable place for the resource AEP to exist for the script to call upon it. It seemed logical to me that it reside along with the script itself, making “installation” simple, and to my human brain, seems like a place where it could be “found” fairly easily… if I could deduce where either the ScriptsUI folder is, or where AE is running.

    Does that make more sense?

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