• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Change type/creator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change type/creator


  • Subject: Re: Change type/creator
  • From: Luca Pozzato <email@hidden>
  • Date: Wed, 22 Sep 2004 12:07:16 +0200

hi,
this change just one file at timeŠ

property mySTOREDcreator : ""
property mySTOREDfiletype : ""

on open thefile
    tell application "Finder"
        set mycreator to creator type of file (thefile as text)
        set myfiletype to file type of file (thefile as text)

        if mySTOREDcreator ‚ "" or mySTOREDfiletype ‚ "" then
            set mybuttons to {"Cancel", "Apply Stored", "Get Current"}
        else
            set mybuttons to {"Cancel", "Get Current"}
        end if
        set applyproperties to display dialog "Stored: " & mySTOREDcreator &
" ‹ " & mySTOREDfiletype & return & "Current: " & mycreator & " ‹ " &
myfiletype buttons mybuttons
        set mychoice to button returned of applyproperties
        if mychoice = "Get Current" then
            set mySTOREDcreator to mycreator
            set mySTOREDfiletype to myfiletype
        else
            if mychoice = "Apply Stored" then
                if mySTOREDcreator = "" or mySTOREDfiletype = "" then
                    beep
                    return
                else
                    set creator type of file (thefile as text) to
mySTOREDcreator
                    set file type of file (thefile as text) to
mySTOREDfiletype
                end if
            end if
        end if
    end tell
end open

ciao

Luca

> From: Bernard Azancot <email@hidden>
> Date: Wed, 22 Sep 2004 08:30:20 +0200
> To: AppleScript <email@hidden>
> Subject: Change type/creator
>
> I have written a bunch of little simple applets each one changing the
> type/creator of documents to others (TextEdit -> Tex Edit pro...).
>
> I would like to know how to write an applet which first reads
> type/creator from a first dropped document file and change a second
> dropped file's one.
> Thanks in advance.
>
> Regards.
> Bernard
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> a.it
>
> This email sent to email@hidden
>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Change type/creator
      • From: Doug McNutt <email@hidden>
References: 
 >Change type/creator (From: Bernard Azancot <email@hidden>)

  • Prev by Date: Re: Change type/creator
  • Next by Date: Re: Change type/creator
  • Previous by thread: Re: Change type/creator
  • Next by thread: Re: Change type/creator
  • Index(es):
    • Date
    • Thread