ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Attempt to use new File() in AE CS4

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
rob mcgowan
Attempt to use new File() in AE CS4
on Feb 21, 2017 at 7:47:15 pm

hi, I'm new to AE and I'm trying to debug an expression in javascript but I'm finding it difficult to get feedback what the thing is doing.

I tried the standard Javascript alert but AE says thees no such function so I tried writing to a file with new File(name). I know this is implemented because it's in the CS3 docs, duik manages to do it and there's a checkbox in the preferences which would be a bit silly if you couldn't do so. Anyway it throws' no constructor for type File' or something like that.

I tried write()ing to the info window but either it didn't work or possibly the written text was overwritten by the standard UI updates as the mouse moves (the expression runs as I move stuff).

Anyone help me? Whats a good way to get feedback from a script?
Thanks

var f = new File("c:\\not working.txt");
alert("I dont work either!");
write("what do ya know, this dont work");
writeLn("nor this");


Return to posts index

Dan Ebberts
Re: Attempt to use new File() in AE CS4
on Feb 21, 2017 at 9:16:26 pm

You can use alert and write to files in AE scripting, but not expressions.

Dan



Return to posts index

rob mcgowan
Re: Attempt to use new File() in AE CS4
on Feb 21, 2017 at 9:40:27 pm

Thanks! I guess #include is out too! shame.


Return to posts index


rob mcgowan
Re: Attempt to use new File() in AE CS4
on Feb 21, 2017 at 10:40:26 pm

I'm wrong... #include works for expressions. Bring on the library...


Return to posts index

Dan Ebberts
Re: Attempt to use new File() in AE CS4
on Feb 21, 2017 at 10:47:22 pm

I believe somewhere along the line (apparently after CS4) they changed it so that #include no longer works, so I'd avoid it if you want your expressions to work in later versions.


Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]