opening email app in Windows
Peter Brigham
pmbrig at comcast.net
Thu May 18 20:44:11 EDT 2006
I have a button that puts some text on the clipboard and I want it
then to go to (or, if not already open, to launch) the user's email
application. On the "MacOS" platform I can do this just fine with a
brief Applescript "tell Finder to activate" script. However, I'm
working on a mac and have no ability to run the IDE on Windows to
debug my handling of this task for the PC.
Here's what I cribbed from the Rev backscripts (revGoURL script):
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 ?
replace "%1" with pWhich in tMailApp -- ? comment out ?
-- older versions use %l ("percent L")
replace quote & "%l" & quote with pWhich in tMailApp -- ?
comment out ?
replace "%l" with pWhich in tMailApp -- ? comment out ?
-- 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? Or should I replace "%1" by
something else (like "empty", or the equivalent)?
Context: in practice the user will already have the email app open
with a new message window open and frontmost. The button will be in a
systemwindow rev stack and after clicking on the stack button to load
the clipboard, I want to go to the email app again with the new
message window active.
-- Peter
×~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~×
! Peter M. Brigham pmbrig at comcast.net !
! http://home.comcast.net/~pmbrig/ !
! ----------------------------------------------------- !
! PROGRAM, tr.v. To engage in a pastime similar to banging !
! one's head against a wall, but with fewer opportunities for !
! reward. !
×~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~×
More information about the use-livecode
mailing list