• 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
SimpleText scriptable in OS X?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SimpleText scriptable in OS X?


  • Subject: SimpleText scriptable in OS X?
  • From: Rob Jorgensen <email@hidden>
  • Date: Thu, 24 May 2001 11:23:52 -0400

Greetings,

Relative versions: OS 9.1/AppleScript 1.6/Script Debugger 2.0.5 used for this/SimpleText 1.3.1

The script in question is part of this package:

<http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Macintosh/System/Mac_OS_X/Mail_Import_1.1.smi.bin>

Even though I don't have OS X, I still, in my quest for useful scripts, open and inspect various OS X scripts when I find them. I recently opened a OS X script, created by Apple, which is supposed to import mail from Eudora for use with OS X's Mail application. Apparently it doesn't actually import anything, but instead writes new mailbox files for Mail (thus the script didn't ask for the Mail app when compiling). Here's one of the parts which surprised me:

-- Begin Script Content --

tell application "SimpleText"
activate
close every document saving ask
make new document at the beginning of documents
set the name of window 1 to importFolderName
set text of document 1 to ,
"--- " & my displayTime() & ": Starting import from " & emailClient & " ---" & return & return & "Preparing mailboxes..." & return & return & ,
return & "--- Import in progress ---" & return
end tell

-- End Script Content --

Has the OS X version of SimpleText become scriptable or is this some terrible mutilation which is the result of opening an OS X script under OS 9.1? Weird thing is that it compiles on my system and does not ask for the SimpleText application. My version of SimpleText (1.3.1) does not appear to be scriptable so why would this snippet even compile?

On a somewhat related note, when I open a OS X script under OS 9.1, and the script involves OS X's Finder, it asks for finder.app in order to compile. I select the OS 9.1 Finder and the script compiles. Are there any caveats to using this method? Are the 2 versions of Finder greatly different in terms of their AppleScript libraries?

I think I've already discovered one difference in the Finder dictionaries, in the following line:

-- Character substitutions made to accommodate the list server --

tell application "Finder" to set pathToHome to (<<class home>> as string)

I suspect that this is just the beginning of a long discovery process, and that I shouldn't use OS 9's Finder to compile OS X scripts. ;-)

Thanks for any info you might offer.


Confused and possibly suffering from a caffeine deficiency,

Rob Jorgensen
Ohio, USA


  • Follow-Ups:
    • Re: SimpleText scriptable in OS X?
      • From: Chris Nebel <email@hidden>
  • Prev by Date: Fonts
  • Next by Date: Re: Outlook Express rules?
  • Previous by thread: Fonts
  • Next by thread: Re: SimpleText scriptable in OS X?
  • Index(es):
    • Date
    • Thread