Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Using system clock time in expressions?

  • Using system clock time in expressions?

    Posted by Tim Kurkoski on January 10, 2006 at 5:47 pm

    Is it possible to use the system time and date (ie., the current time stored in my computer’s clock) in an expression? I’ve been looking for a way but haven’t successfully found one yet.

    Tim Kurkoski replied 20 years, 4 months ago 4 Members · 7 Replies
  • 7 Replies
  • Mylenium

    January 10, 2006 at 6:01 pm

    Nope, you can’t.

    Mylenium

    [Pour Myl

  • Filip Vandueren

    January 10, 2006 at 6:07 pm

    Eventhough you can easliy do it in Javascript,
    not all javascript methods are mirrored in the aftereffects expression language.

    Why do you need this ?

  • Tim Kurkoski

    January 10, 2006 at 8:33 pm

    A friend asked if it can be done, actually, and I’m not sure of his ultimate motives. I suspect he simply wants a “true random”, if you will. One that shows different results each time you launch the application and isn’t simply the result of a pre-determined equation that’s the same each time in a given situation.

    It was an interesting question, so I decided to see if it could be done. I did find references to other types of JavaScript libraries that can do clock functions, but obviously AE can’t access those. A pity.

  • Dan Ebberts

    January 10, 2006 at 9:24 pm

    I think the nature of AE and expressions makes system time unusable if you think about it. If you were using it as random seed, that number would be changing even while you’re just sitting on the same frame. With the way expressions work, there’s no way to just seed the random number generator once and have that affect the entire comp. And there’s no way to pass the seed from one frame to the next. I’m guessing it wasn’t an oversight to leave it out, because it just wouldn’t work the way you would want it to.

    Dan

  • Tim Kurkoski

    January 10, 2006 at 11:01 pm

    Good point, Dan. In a perfect world, I’d still like to see something like it, even if it would only be a static value. (What would be the point of having a text layer running the current time, anyway? It would change each time you rendered.) Maybe something that would grab the last modified date or last accesssed date of the AE project file, like GetLastDate. If somebody truly wanted a clock, it could be incremented. Ah, well. Maybe if I cook up some clam chowder or pork chops for the engineers they’ll do it for me.

  • Filip Vandueren

    January 11, 2006 at 1:18 am

    You can always write a script that puts the current date in the text-content of a hidden text-layer, or the name of a null, then build your scripts from that….

    but it’s a bit useless…

  • Tim Kurkoski

    January 11, 2006 at 5:35 pm

    That actually occurred to me last night, too. But you’re right, it’s too much work.

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