Re: opening email app in Windows

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: opening email app in Windows

xtalkprogrammer
Peter,

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

Mark

--

Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Salery is the easiest way to get your own web store on-line: http://
www.salery.biz/salery.html



Op 19-mei-2006, om 2:44 heeft Peter Brigham het volgende geschreven:

> 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.
<snip>


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Kind regards,

Drs. Mark Schonewille

Economy-x-Talk Consultancy and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
Facebook: http://facebook.com/LiveCode.Beginner
KvK: 50277553
Reply | Threaded
Open this post in threaded view
|

Re: opening email app in Windows

Peter Brigham
On Fri, 19 May 2006 13:47:50 +0200 Mark Schonewille  
<m.schonewille@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
[hidden email]
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.
~~~~

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: opening email app in Windows

xtalkprogrammer
Hi Peter,

If you don't specify an e-mail address with revGoURL or revMail, it  
still works. So, I'd assume that not leaving %L empty doesn't do any  
harm. It is surely worth a try.

Best,

Mark

--

Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Salery is the easiest way to get your own web store on-line: http://
www.salery.biz/salery.html



Op 20-mei-2006, om 8:02 heeft Peter Brigham het volgende geschreven:

<snip revGoURL script>

>
>
> 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
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Kind regards,

Drs. Mark Schonewille

Economy-x-Talk Consultancy and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
Facebook: http://facebook.com/LiveCode.Beginner
KvK: 50277553
Reply | Threaded
Open this post in threaded view
|

Re: opening email app in Windows

Peter Brigham
In reply to this post by xtalkprogrammer
On Sat, 20 May 2006 12:58:13 +0200 Mark Schonewille  
<m.schonewille@hidden> wrote:

 >>>>
Re: opening email app in Windows

Hi Peter,

If you don't specify an e-mail address with revGoURL or revMail, it
still works. So, I'd assume that not leaving %L empty doesn't do any
harm. It is surely worth a try.

Best,

Mark
 >>>>

Yes, but the problem is that in both cases (revmail ""   or    
revGoURL "mailto:"  -- using empty parameters) a new email message is  
opened. That's what I don't want. I just want the email app window  
activated.

-- Peter

Peter M. Brigham
[hidden email]
http://home.comcast.net/~pmbrig/

~~~~
Football combines two of the worst things in American life. It
is violence punctuated by committee meetings.
                 -- George Will
~~~~
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: opening email app in Windows

Ken Ray
In reply to this post by Peter Brigham
On 5/20/06 1:02 AM, "Peter Brigham" <[hidden email]> wrote:

> All I want is  
> to be able to activate the email app's frontmost window (which will
> be the mostly-completed message).

Well, this isn't quite as easy as it might sound because each window in
Windows has its own "handle" which is (oddly enough) accessible based on the
title in the titlebar of the window. You can also activate the window if you
know what the process ID of the window is. In either case, you can use this
code (which uses VBScript to do the dirty work):

on VBS_AppActivate pTitleOrID
  put format("set WshShell = WScript.CreateObject(\"WScript.Shell\")") into
tVBS
  if isNumber(pTitleOrID) then
    put tVBS & cr & "WshShell.AppActivate" && pTitleOrID into tVBS
  else
    put tVBS & cr & "WshShell.AppActivate" && quote & pTitleOrID & \
      quote into tVBS
  end if
  put "C:\vbs_temp.vbs" into tVBSPath
  put tVBS into url ("file:" & tVBSPath)
  set the hideConsoleWindows to true
  get shell("cscript.exe //nologo" && tVBSPath)
  put it into tResult
  if there is a file tVBSPath then
    send "delete file" && quote & tVBSPath & quote to me in 1 second
  end if
  if tResult <> "" then return "Error: " & tResult
end VBS_AppActivate

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [hidden email]

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: opening email app in Windows

Peter Brigham
In reply to this post by xtalkprogrammer
On Sat, 20 May 2006 21:45:24 -0500 Ken Ray <kray@hidden> wrote:

****
********
Re: opening email app in Windows

On 5/20/06 1:02 AM, "Peter Brigham" <pmbrig@hiddenwrote:

All I want is
to be able to activate the email app's frontmost window (which will
be the mostly-completed message).
********

Well, this isn't quite as easy as it might sound because each window in
Windows has its own "handle" which is (oddly enough) accessible based  
on the
title in the titlebar of the window. You can also activate the window  
if you
know what the process ID of the window is. In either case, you can  
use this
code (which uses VBScript to do the dirty work):

on VBS_AppActivate pTitleOrID
   put format("set WshShell = WScript.CreateObject(\"WScript.Shell
\")") into
tVBS
   if isNumber(pTitleOrID) then
     put tVBS & cr & "WshShell.AppActivate" && pTitleOrID into tVBS
   else
     put tVBS & cr & "WshShell.AppActivate" && quote & pTitleOrID & \
       quote into tVBS
   end if
   put "C:\vbs_temp.vbs" into tVBSPath
   put tVBS into url ("file:" & tVBSPath)
   set the hideConsoleWindows to true
   get shell("cscript.exe //nologo" && tVBSPath)
   put it into tResult
   if there is a file tVBSPath then
     send "delete file" && quote & tVBSPath & quote to me in 1 second
   end if
   if tResult <> "" then return "Error: " & tResult
end VBS_AppActivate

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray@hidden
****

Wow, this taps into stuff I know nothing about. Is there an easy way  
to find out the window title or ID of the frontmost window for the  
email app? I'm getting the sense I'd best leave well enough alone  
here and forgo trying to get this minor feature implemented for  
Windows....

-- Peter

Peter M. Brigham
[hidden email]
http://home.comcast.net/~pmbrig/

~~~~
Two wrongs don't make a right, but three lefts do.
~~~~
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: opening email app in Windows

Ken Ray
On 5/21/06 5:34 PM, "Peter Brigham" <[hidden email]> wrote:


> Wow, this taps into stuff I know nothing about. Is there an easy way
> to find out the window title or ID of the frontmost window for the
> email app?

Not without a DLL, I'm afraid.

> I'm getting the sense I'd best leave well enough alone
> here and forgo trying to get this minor feature implemented for
> Windows....

Sounds good to me... :-)

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [hidden email]

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution