>For some reason, OS X's Script Editor 
>won't create a new script that works with Emailer.

I checked the new ones and they work. Sorry for the inconvenience.

http://vric.free.fr/mac/Emailer/

Just don't use the "reveal trashed files" button under OS X, you may have 
to wait for an AppleEvent timeout before recovering control of the 
calling application (if someone knows why Finder X won't                select (every 
alias of someResult) in my script please tell me, otherwise I may disable 
that since it isn't very useful anyway, I needed it while coding in case 
the scripts would go berserk).

>The script appears in the AppleScript menu in Emailer but with the 
>message selected in the InBox or open - nothing happens when I select the 
>script.

Because the script looks empty to OS 9. When I tried those "bad" scripts 
under OS X I got an error from AppleScript (-39, probably bad end of file 
since it tries to read from an empty fork), then Emailer crashed. I hope 
I didn't cause anyone to loose something.

The problem was indeed OS X's Script Editor, which stores the script in 
the data fork instead of resource fork (to allow saving scripts to flat 
filesystems, ie prevent stupid PC servers from destroying them). Too bad 
it has the side effect of causing OS9/Classic users headaches.

>At least I couldn't get it to do it.
>
>What I did to get around the problem was duplicate an existing, working 
>Emailer script, then open it, delete everything in it, and paste in my 
>new code. Save and rename it, and it worked fine.

Scripts created using Smile 2.4.6 under X work normally.

Note that saving an existing script will retain it's current data or 
resource nature (even using Smile) because the alternate fork doesn't 
exist. You have to create a new file for the format option to take 
effect. That's why saving new code in an old script works for you and why 
I thought I was safe saving changes. But apparently Apple's Script Editor 
2.0 beta DOES switch forks when saving existing scripts. BAD. And it uses 
unix linefeeds too: not only will it render existing scripts incompatible 
with classic versions of Script Editor, but it will also mess up the text 
wrapping in other editors.

Maybe there is (was) a workaround without Smile: OS X's Script Editor 
(NOT the new 2.0 beta) gives 2 seamingly identical options when saving 
which are in fact different. The "format" popup menu in save as... 
dialogs looks like:

compiled script
--- separator ---
text
compiled script
application

One of the "compiled script" items supposedly saves to data fork (works 
in X only), the other saves to ressource fork like old versions did 
(works for both 9 and X). And items below the separator are localized in 
french, which could help recognizing the "good" one once found ;)

Of course using Smile to begin with is simpler (it's free and better 
anyway, what was I thinking using Apple's Script Editor?)

----
VRic

___________________________________________________________________________
To unsubscribe send a mail message with a SUBJECT line of "unsubscribe" to
<[EMAIL PROTECTED]>  or  <[EMAIL PROTECTED]>

Reply via email to