Re: Changing File Type
Re: Changing File Type
- Subject: Re: Changing File Type
- From: Michelle Steiner <email@hidden>
- Date: Fri, 8 Jun 2001 13:45:27 -0700
On 6/8/01 6:05 AM, Mac <email@hidden> wrote:
>
I have a open handler script that loops through each picture file
>
and performs a photoshop action and then imports each file into it's
>
appropriate picture box in quarkXpress great time saver. I have a problem
>
that if a certain picture file was not created in photoshop then it opens
>
the application that created it. Can somebody help me with the code to check
>
each file and change it's creator type if necessary or perhaps some other
>
method. Maybe I'm nested wrong. I gotta add that I love my macintosh.
Here's one that I wrote a while back.
property creatortype : "GKON"
on run
display dialog ,
"Enter the creator type." default answer creatortype buttons,
{"Cancel", "GKON", "Text Field"} default button 3
if button returned of the result is "GKON" then
set the creatortype to "GKON"
else
set the creatortype to text returned of the result
(* There is no need to evaluate clicking on "Cancel" because
The script will quit at that point, and not change anything
*)
end if
end run
on open (theFiles)
tell application "Finder"
repeat with theFile in theFiles
set the creator type of theFile to the creatortype
end repeat
end tell
end open
If you double click the droplet, it lets you change the creator type it
will use. I have it defaulted to Graphic Converter.
If you drop files on the droplet, it will change the file creator to the
creator that you had previously specified.
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------