opening email app in Windows

Peter Brigham pmbrig at comcast.net
Sat May 20 02:02:35 EDT 2006


On Fri, 19 May 2006 13:47:50 +0200 Mark Schonewille  
<m.schonewille at hidden> wrote:

 >>>>
Re: opening email app in Windows

Peter,

What's wrong with the revMail command or with revGoURL ""? You can
just leave the destination address behind.
 >>>>


The problem with using either revMail or revGoURL and a "mailto:"  
prefix is that both open up a new message in the email application.  
My stack will essentially always be used after the user has already  
started composing a message, and the function of the stack is to put  
some text on the clipboard (a signature with a quote inserted into  
it) for pasting into a mostly completed message. I suppose I could  
simply expand my stack to allow the user to compose the message  
entirely in the Rev environment, insert the signature on command,  
then use revMail to open a new message with the entire text ready to  
send, but that would mean duplicating all the functionality of an  
email app in Rev. I don't wish to re-invent the wheel. All I want is  
to be able to activate the email app's frontmost window (which will  
be the mostly-completed message).

If this is not do-able, my stack will still be OK, but automatically  
activating the email app window would provide a small convenience  
that would be a nice touch. And it works already on the Mac. At some  
point I will want to port this to Windows and I was trying to work  
out how to do this....

For those who missed or forgot my attempt to crib from the revGoURL  
backscript, I reproduce it below. If anyone out there knows windows  
shell commands well enough to help, I'd love some advice.... I wonder  
if I need a different queryRegistry argument to avoid opening a new  
message...?

(watch for long line wraps:)

 >>>>
...<snip>...
else if the platform is "Win32" then -- Windows
   revSetWindowsShellCommand
   put queryRegistry("HKEY_CLASSES_ROOT\mailto\shell\open\command\")  
into tMailApp

   replace quote & "%1" & quote with pWhich in tMailApp
   -- ? comment out the above ?
   replace "%1" with pWhich in tMailApp
   -- ? comment out the above ?

   --  older versions use %l ("percent L")
   replace quote & "%l" & quote with pWhich in tMailApp
   -- ? comment out the above ?
   replace "%l" with pWhich in tMailApp
   -- ? comment out the above ?

   --  for Windows XP
   replace "%ProgramFiles%" with $ProgramFiles in tMailApp

   open process tMailApp for neither
end if


My question is regarding the pWhich variable substitutions. In the  
script for revGoURL, pWhich contains the email address, which I do  
not want to specify. If I simply don't substitute anything for "%1"  
in the result of the queryRegistry function, will Windows just  
activate the email app without objection?
 >>>>

-- Peter

Peter M. Brigham
pmbrig at comcast.net
http://home.comcast.net/~pmbrig/

~~~~
AMAZING BUT TRUE... Having children is hereditary. If your parents  
didn't have
any, then you probably won't either.
~~~~




More information about the Use-livecode mailing list