At 10:35 -0500 2003.02.05, Ryan Wilcox wrote: >Is it possible to set the extended (ie: OS 8.5 =< ) Finder Info for a >file with MacPerl?
Yes. >(Specifically, I want to set the routing bit for a file (found in >ioFlXFndrInfo.fdXFlags)) > >My script currently goes something like this: > $finderInfo = FSpGetFInfo($file); > print $finderInfo.fdFlags; >the PRINT $FINDERINFO.FDFlAGS line does not work as expected (it >prints "fdFlags". That is not proper Perl syntax. You want an arrow, not a dot. print $finderInfo->fdFlags; Put this at the top of your script to help find these problems: use warnings; use strict; (If using something older than MacPerl 5.6, put "-w" after "#!perl" at the top of the script instead of "use warnings;".) >So, my two questions are: > #1: Can this _really_ be done in MacPerl? Yes. > #2: Once we get the extended finder info, we should be able > to set it using FSpSetFInfo(), right? No. Close. What you want is FSpGetCatInfo, and the ioFlXFndrInfo member. Something like this example, which clears out the fdPutAway field: my $catinfo = FSpGetCatInfo($file); my $fxinfo = $catinfo->ioFlXFndrInfo; if ($fxinfo->fdPutAway) { # file needs to be put away $fxinfo->fdPutAway(0); # current location new home $catinfo->ioFlXFndrInfo($fxinfo); # save back to catinfo FSpSetCatInfo($file, $catinfo); # save back to file } -- Chris Nandor [EMAIL PROTECTED] http://pudge.net/ Open Source Development Network [EMAIL PROTECTED] http://osdn.com/