5/12/02 chris :
>Ok, I officially give up...
I can't investigate it now, but here are some thoughts.
UPD : OK, I see you don't need all this anymore, but I wrote it anyway, so here it is.
>(the log function
>works great... as long as you can run the script from inside the script
>editor... but you can't do that when trying to run the script from inside
>iPhoto!!!)
Everybody probably already does that, but it won't hurt to repeat -- when I'm unsure
of a value (common after coercions), I usually either:
- insert the following statement at the point where I want to test it
display dialog theVariableInQuestion -- as text if it is not already text, since
dialogs only display text strings; this covers most cases (I think there's a way tto
use yellow notification windows now, but I got used to that dialog thing long ago)
- or return the variable to an editor at that point, which allows values of any class,
something like this may work:
return theVariableInQuestion
-- will return it to the calling handler, probably useless from iPhoto
tell app "Smile" to return theVariableInQuestion
-- should put it in Smile's log without leaving iPhoto
>The script MUST be called "Mail.scpt", and you must
>quit and relauch iPhoto after editing the script (it only appears to load
>it when iPhoto starts).
Testing modified script gets very annoying if one has to relaunch the app each time.
So unless there's a specific need for that script to be triggered from iPhoto's
built-in tools (sorry, I wasn't paying attention), my suggestion is to create another
script to run from the system's Scripts menu or YoupiKey's shortcuts, this will allow
modifying the script without quitting iPhoto.
Also, if the script HAS to be triggered the original way, but you want normal editing
too, you could set the original script to just trigger another external script, and
put the guts of your script there. The original script will probably have to get and
pass some parameters to the other, like the selected photos etc.
>The only thing I can't manage is to get the new email to open and be
>displayed. But that is nothing more than a minor annoyance in my book. If
>anyone knows how to tell Emailer to open a particular message for
>editing, speak up and we can add it to the script.
My "Zoom" script does that:
open theMessage
where theMessage is a reference to the message :)
---------- the "Zoom" script ----------
(*
If we're looking at the Browser, open the selected message(s) and if they are
incoming, close the address and enclosures panes and zoom the window(s). If we're
looking at an incoming message, close the panes and zoom the window.
Stephen Withers ([EMAIL PROTECTED]) V2.0 16 Sep 1997
Improved to handle outgoing messages, VRic 06/00
*)
tell application "Claris Emailer"
if the class of the front window is browser window then
set messagesOfUnknownClass to the selection of the front window
repeat with theMessage in messagesOfUnknownClass
open theMessage
doTheZoom() of me
end repeat
else
doTheZoom() of me
end if
end tell
on doTheZoom()
tell application "Claris Emailer"
if the class of the front window is incoming message window or �
the class of the front window is outgoing message window then
set headers displayed of the front window to false
set enclosures displayed of the front window to false
set zoomed of the front window to true
end if
end tell
end doTheZoom
---------- end "Zoom" script ----------
----
VRic
___________________________________________________________________________
To unsubscribe send a mail message with a SUBJECT line of "unsubscribe" to
<[EMAIL PROTECTED]> or <[EMAIL PROTECTED]>