scripts will no longer support file I/O

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
cardeiro
Posts: 31
Joined: March 27th, 2006, 2:03 pm
Location: philadelphia, PA
Contact:

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
Mylenium
Posts: 139
Joined: July 20th, 2005, 12:07 am

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
[Pour Mylène, ange sur terre]
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

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..
bradshaw1965
Posts: 98
Joined: March 14th, 2006, 2:16 pm
Location: Atlanta, GA
Contact:

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.
Dale Bradshaw
Technology Director | Primal Screen
creative-workflow-hacks.com
Atlanta, GA
User avatar
redefinery
Posts: 112
Joined: April 1st, 2005, 8:16 pm
Location: CA
Contact:

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. :-) )
Mylenium
Posts: 139
Joined: July 20th, 2005, 12:07 am

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
[Pour Mylène, ange sur terre]
bradshaw1965
Posts: 98
Joined: March 14th, 2006, 2:16 pm
Location: Atlanta, GA
Contact:

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?
Dale Bradshaw
Technology Director | Primal Screen
creative-workflow-hacks.com
Atlanta, GA
cardeiro
Posts: 31
Joined: March 27th, 2006, 2:03 pm
Location: philadelphia, PA
Contact:

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
Mylenium
Posts: 139
Joined: July 20th, 2005, 12:07 am

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
[Pour Mylène, ange sur terre]
bradshaw1965
Posts: 98
Joined: March 14th, 2006, 2:16 pm
Location: Atlanta, GA
Contact:

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
Dale Bradshaw
Technology Director | Primal Screen
creative-workflow-hacks.com
Atlanta, GA
cardeiro
Posts: 31
Joined: March 27th, 2006, 2:03 pm
Location: philadelphia, PA
Contact:

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
User avatar
redefinery
Posts: 112
Joined: April 1st, 2005, 8:16 pm
Location: CA
Contact:

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
Post Reply