なんだか FileType を変更する Tool というのが FAQ のようなので、ここにも書いておくとしよう。
#!/usr/bin/env perl
MacPerl::SetFileInfo('ttxt', 'TEXT', @ARGV);
#!/usr/bin/env python
import MacOS, macostools, sys
if __name__ == '__main__':
for x in sys.argv[1:]:
MacOS.SetCreatorAndType(f, 'ttxt', 'TEXT')
macostools.touched(f)
on open argv
tell application "Finder"
repeat with i in argv
set i's file type to "TEXT"
end repeat
end tell
end open
勿論 Classic 環境用。
#!/usr/bin/env perl
open CAT, "> dogCow.cat" or die;
print CAT <>;
close CAT;
#!/usr/bin/env python
import sys
if __name__ == '__main__':
o = open('dogCow.cat', 'w')
o.write(sys.stdin.read())
o.close()
on open argv
open for access (choose file name) with write permission returning total
repeat with i in argv
open for access i returning part
write (read part) to total
close access part
end repeat
close access total
end open
tell application "Finder"
tell preferences folder's folder "Mpack"
if exists it then delete folders
end tell
end tell