• 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: Scriptable Text Editor v.1.1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scriptable Text Editor v.1.1


  • Subject: Re: Scriptable Text Editor v.1.1
  • From: Mr Tea <email@hidden>
  • Date: Sat, 15 Sep 2001 17:15:20 +0100

This from Rachel Cogent - dated 15/9/01 1.42 pm:


> This script converts every file in a folder that are Read-only Readme text
> into Tex-Edit Plus thus allowing opening in Tex Edit with a click.
> (Until now, I did this by copying the contents into a new window and naming
> it the original name)
>
> tell application "Tex-Edit Plus"
> activate
> save windows as string with creator +class TBB6;
> close windows
> end tell

You don't need to do any of this, Rachel. Applescript can change the creator
code of any file without assistance from the app you want to map the file
to.

This script, saved as an application/classic applet will change any
SimpleText read-only files dropped on it into TE+ read-only files. If you
want the files to be editable, substitute "TEXT" for "TERO".

on open (fileList)
tell application "Finder"
repeat with theFile in fileList
if creator type of theFile is "ttxt" and file type of theFile is
"ttro" then
set {creator type of theFile, file type of theFile} to
{"TBB6", "TERO"}
end if
end repeat
end tell
end open

You'll need to take out any line wraps if pasting this into your script
editor.

HTH

Mr Tea
--
Brew of the day: Darjeeling

Visit the Tea Room at:
http://homepage.mac.com/mrtea/tearoom.html


  • Follow-Ups:
    • Re: Scriptable Text Editor v.1.1
      • From: Rachel Cogent <email@hidden>
References: 
 >Re: Scriptable Text Editor v.1.1 (From: Rachel Cogent <email@hidden>)

  • Prev by Date: Re: Creating list references in handlers. Bad code or bug?
  • Next by Date: Removing item from list
  • Previous by thread: Re: Scriptable Text Editor v.1.1
  • Next by thread: Re: Scriptable Text Editor v.1.1
  • Index(es):
    • Date
    • Thread