Page 1 of 1

scripts will no longer support file I/O

Posted: September 18th, 2007, 11:46 am
by cardeiro
just stumbled across this in the cs3 scripting guide.

NOTE: The After Effects global functions for standard dialogs and file I/O are still supported in this release, but
are deprecated and will not be supported in future releases. For details, see the After Effects 6.5 documentation.



anybody know what they are referring to?(as usual it is not written very well)

Are they not going to let us access the filesystem anymore (if so I guess cs3 will be the last version I buy as it encompasses much of what I do with scripts)

Mike Cardeiro

Re: scripts will no longer support file I/O

Posted: September 19th, 2007, 11:16 am
by Mylenium
cardeiro wrote:just stumbled across this in the cs3 scripting guide.

NOTE: The After Effects global functions for standard dialogs and file I/O are still supported in this release, but
are deprecated and will not be supported in future releases. For details, see the After Effects 6.5 documentation.



anybody know what they are referring to?(as usual it is not written very well)

Are they not going to let us access the filesystem anymore (if so I guess cs3 will be the last version I buy as it encompasses much of what I do with scripts)

Mike Cardeiro
See my answer on the AEList.

Mylenium

Re: scripts will no longer support file I/O

Posted: September 19th, 2007, 2:51 pm
by lloydalvarez
Mylenium wrote:
See my answer on the AEList.
Care to share with people who are not subscribed to the AE List? :wink:

I think this is very pertinent to this site..

Posted: September 19th, 2007, 8:18 pm
by bradshaw1965
Additional global functions for standard user I/O (alert, confirm, and prompt) and static functions for file
I/O, are defined by ExtendScript; for detailed reference information, see the Adobe Bridge® JavaScript Reference.

NOTE: The After Effects global functions for standard dialogs and file I/O are still supported in this release, but
are deprecated and will not be supported in future releases. For details, see the After Effects 6.5 documentation.

I read that as Bridge and the ExtendScript functions will replace AE specific global functions. I'm sure Jeff or somebody on the AE team will confirm, but I think you'll still be able to do I/O via scripting. There are already a lot of useful functions and methods like the $ helper object that are Extendscript specific.

deprecated global functions

Posted: September 19th, 2007, 9:10 pm
by redefinery
i can't confirm right now, but i'm assuming it's referring to the old global functions -- fileGetDialog(), filePutDialog(), and folderGetDialog() for showing the Open, Save, and folder selection dialogs -- and nudging you to start using the ExtendScript File and Folder objects' methods for doing similar, i.e.,

fileGetDialog() --> File.openDialog()
filePutDialog() --> File.saveDialog()
folderGetDialog() --> Folder.selectDialog()

reading from and writing to files would use the File object's read*() and write*() methods. the older global functions returned File and Folder objects, so i don't think there's anything different there.

:jeff
(searching his scripts, looks like an update to rd: Script Launcher is in order. :-) )

Re: scripts will no longer support file I/O

Posted: September 20th, 2007, 9:27 am
by Mylenium
lloydalvarez wrote:
Mylenium wrote:
See my answer on the AEList.
Care to share with people who are not subscribed to the AE List? :wink:

I think this is very pertinent to this site..
In addition to the info Jeff provided I was pointing out that in the future one probably should make good use of the XML functionalities that started to appear in CS3 to parse and write stuff. Dunno how deep support will ever be since I've pretty much given up on scripting these days (simply no time for it), but I was also suggesting that if properly used one might be pretty free in doing what you want with your file using XML files and associated transform rules to manipulate streams.

Mylenium

Re: scripts will no longer support file I/O

Posted: September 20th, 2007, 12:50 pm
by bradshaw1965
Mylenium wrote: In addition to the info Jeff provided I was pointing out that in the future one probably should make good use of the XML functionalities that started to appear in CS3 to parse and write stuff. Dunno how deep support will ever be since I've pretty much given up on scripting these days (simply no time for it), but I was also suggesting that if properly used one might be pretty free in doing what you want with your file using XML files and associated transform rules to manipulate streams.

Mylenium
definitely. I don't think we ever want to lose File I/0 support, but combine AE Socket support and a good subset of ECMA-357 [E4X] XML parsing there are some great opportunities for Web 2.0 style mashups and explorations. kuler explorer anyone?

Posted: September 20th, 2007, 6:19 pm
by cardeiro
while I am sure xml parsing will be just dandy, I think it would suck for adobe to totally change such a core feature. Nearly every script I have ever written uses file i/o. I will have to take time to re-learn (and re-write) something I already know how to do.

I have no problem with adobe adding a feature to scripting such as xml parsing...great! but they should also leave in the legacy code so us developers who have been utilizing scripts from the beginning aren't screwed.

Mike Cardeiro

Posted: September 21st, 2007, 4:36 am
by Mylenium
cardeiro wrote:I have no problem with adobe adding a feature to scripting such as xml parsing...great! but they should also leave in the legacy code so us developers who have been utilizing scripts from the beginning aren't screwed.
Sure, for a while this will definitely be the case but I think in the long run the better failsafe behavior, security issues and not least cross-application compatibility will make XML more prominent and one day you'll probably be considered a complete lamer if you use conventional file I/O. ;-)

Mylenium

Posted: September 21st, 2007, 5:28 am
by bradshaw1965
cardeiro wrote:while I am sure xml parsing will be just dandy, I think it would suck for adobe to totally change such a core feature. Nearly every script I have ever written uses file i/o. I will have to take time to re-learn (and re-write) something I already know how to do.

I have no problem with adobe adding a feature to scripting such as xml parsing...great! but they should also leave in the legacy code so us developers who have been utilizing scripts from the beginning aren't screwed.

Mike Cardeiro
Mike,

It's not going away. You just have to slightly alter your code to use an Extendscript File object instead of a AE global function. Spend some time with the Javascript CS3 tools guide(pdf link) it's really thoroughly documented including all the OS edge cases you might run into.

When code becomes deprecated the idea is that the dev team gives you enough of a heads up to alter your code and learn the new direction. In this case you change the 3 lines of code Jeff outlines above and you can be done. If you check out the Extendscript File object though, you get much more robust file support then you've had before. great stuff, you get better file support not less.

Dale

Posted: September 21st, 2007, 6:18 am
by cardeiro
bradshaw1965 wrote:Spend some time with the Javascript CS3 tools guide(pdf link) it's really thoroughly documented including all the OS edge cases you might run into.
Wow! didn't even know about this...I wonder why the ae scripting docs didn't point me to this resource. Thanks Dale!

Mike Cardeiro

JavaScript Tools Guide

Posted: September 21st, 2007, 10:39 am
by redefinery
cardeiro wrote:
bradshaw1965 wrote: Wow! didn't even know about this...I wonder why the ae scripting docs didn't point me to this resource.
p. 5 of the After Effects CS3 Scripting Guide, in the ExtendScript JSX format section, mentions the JavaScript Tools Guide.

you can access it from the web site listed or, from ExtendScript Toolkit 2's Help > SDK submenu.

:jeff