interesting failure in 9 setting creator of OSX file with double dot in name
interesting failure in 9 setting creator of OSX file with double dot in name
- Subject: interesting failure in 9 setting creator of OSX file with double dot in name
- From: Charles Arthur <email@hidden>
- Date: Wed, 15 Jan 2003 13:18:13 +0000
Is this a known problem? I have a little droplet that redoes the type and
creator of a file (sometimes useful when bringing over resource-less files
from X to 9, eg PDFs created from TextEdit).
Last night I created one in X which I accidentally called invoice..pdf
instead of invoice.pdf (two dots instead of one).
When I tried (on a different machine, booted in 9) to set the creator type
to CARO, the app would fail. When I tried to run it in SEditor, either the
app would crash or SE would crash. Renaming to .pdf solved the problem
immediately.
Here's the meat of the script (which is pretty standard) minus the on run
and on open handler structure.
tell application "Finder"
set thetype to file type of thefile
set thecreator to creator type of thefile
display dialog ("File name: " & name of thefile as string)
& return & "File type: " default answer thetype
set thetype to the text returned of the result as string
display dialog "Creator: " default answer thecreator
set thecreator to the text returned of the result as string
set the file type of file thefile to thetype
set the creator type of file thefile to thecreator
end tell
Comments?
Charles
----------------------------
http://www.ukclimbing.com : 1100+ British crags, 350+ British climbing
walls - searchable by distance and anything else you care to think of -
with weather forecasts for every one, plus maps, articles, news and
features. And there's even a cool shop attached.
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.