on 9/23/02 9:39 AM, [EMAIL PROTECTED] purportedly said: >> I set the creator/type of a file likeso: >> >> my $of = "extract.u8"; >> open OF, "> $of" >> or die "cannot create `$of': $!"; >> my @creator = qw(LING McPL TBB6 MOSS); >> #0 #1 #2 #3 >> MacPerl::SetFileInfo($creator[0], "TEXT", $of); >> >> and after perl writes the data to OF, I'd like perl to tell the creator >> app (in this case "LING") to open $of. The creator app is not apple >> scriptable, though I guess this might not matter, if perl can tell the >> finder to tell the app. to open the file. >> >> Does someone here have example code?
It seems the MacPerl-specific pod doesn't talk about AppleScript anymore, but you can still find it by looking at the pod for MacPerl.pm. In a nutshell, you ant something like: MacPerl::DoAppleScript('tell application "Finder" to open "full:or:rel:file:path"'); My AS is a little rusty, but you can test the script in the script editor before pasting to this function. If you set the type and creator properly, there should be no problem for the Finder to open the file in the right app. Keary Suska Esoteritech, Inc. "Leveraging Open Source for a better Internet"