MACSCRPT Archives

August 2010

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Daniel A. Shockley" <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Mon, 23 Aug 2010 21:49:51 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (56 lines)
Date:    Fri, 20 Aug 2010 08:29:31 +0100
> From:    John Delacour <[log in to unmask]>
> ....
> Back in 2006 I wrote this script for Eudora users
>
>        <http://bd8.com/eudora/scripts/#searcheudorasettings>
>
> that allows you to search for settings matching a regular expression,
> and the script continues to work for many users, but users of later
> versions of Mac OS X have been complaining it doesn't work any more.
>
> Since I have no access to anything later than 10.4.11 I have been
> reluctant to fix the problem and involve myself in long Q&A sessions
> with users who don't understand AppleScript.


John,

 I was able to extract the contents by using HexEdit to look at the resource
fork of your compiled script. I believe it starts with:

<x-eudora-setting:1> Use this menu to set the font to use in windows.

---- and ends with: ----

<x-eudora-setting:4516> List of extenstion NOT to be considered movies, no
matter what QuickTime thinks

So, I pulled that out of the hex editor, ran "get the clipboard"
in AppleScript Editor (Mac OS X 10.6.4), copied the resulting AppleScript
string, pasted that into the strangely empty getSettings() handler, preceded
by a "return" command, and then saved. First, I noticed that the file was
now about 393 KB. It seems that AppleScript Editor in Snow Leopard saves
strings as Unicode (not surprising), which means that each character in that
string has a padding "00" hexadecimal byte preceding it. I suspect that
there is some issue with Leopard and Snow Leopard opening a large string. It
does seem to be a bug, although it might take more time to track down
exactly what is happening.

I also had to turn off the "with icon 1001" option on display dialog. More
recently, the "display dialog" command allows you to specify icons by
reference to an ICNS file (or internal resource, if a script bundle or
application bundle/package), or to a handful of named icons:
stop/note/caution. I wasn't sure which one you were using, so I commented
out the icon.

Anyway, I saved the compiled script, zipped it (you'll have to use Stuffit
if you want it compressed that way), and attached it to this message. I
guess this can be your "Leopard and newer" version of this handy script.

Dan Shockley

P.S. I seem to have forgotten to switch my MacSCRIPT subscription over from
my old yahoo account to gmail or my personal domain. Please send any direct
replies to [log in to unmask]

ATOM RSS1 RSS2