thanks Andy -

so, to define a global variable I just write

global: "nameVariable"

and that would apply as a variable to PM and to iCal... as it is global.
correct? and I would do that before even "on run"?

that might have been my problem before. I kind of bypassed the variable
by using "the clipboard", assuming if the Script Editor turns it blue,
it's some global thing, and it seems to work.

but as you assumed, defining the selection has a bit a drawback, I really
need to have the text selected, which does not work with the From or
Reply-To field, they deselect the moment I move the mouse.

how would I "assign in the usual fashion" a FROM to selection or to
clipboard or whatever so I could pass it on and paste it later in the
script into iCal?

---marlyse

------------ former message(s) quotes: -------------

> *This message was transferred with a trial version of CommuniGate(tm)
> Pro* Marlyse,
> Here's what I do. I usually don't like defining global variables. I
> define a global variable at the beginning of the script
> 
> global: "theText"
> 
> tell application "PowerMail"
> 
> set theText to the selection  --if that works then it's really simple
> end tell
> 
> I find this takes care of the problem between passing variables
> between different tell statements. See if that works for you. If PM
> doesn't like the assignment of the variable from the selection you'll
> have to figure something else from the message that you want to
> capture (From, Subject, whatever) and assign that in the usual
> fashion. I think defining a global variable will make the difference
> for you here.
> --
> 
> Andy Fragen


Reply via email to