[R] windows focus and setting active device

Gatehouse, Simon (E&M, North Ryde) Simon.Gatehouse at csiro.au
Mon Aug 26 03:01:10 CEST 2002

Dear all, 
It seems I was unclear in my question as I recieved a reply of dev.cur() and
on further thought the clearer question may contain its own answer. No!

I define focus is defined as that window which, in the windows operating
system, is highlighted and brough to the top by a mouse click. In most cases
it will not be the active or current window as defined in R.
Any graphic window can be made active with dev.cur() if you know its device
number.  How do you get the device number of the window currently in focus
as known by the operating system?

It seems I actually need the window that has most recently lost focus as to
run a script to determine focus requires giving the command window the focus
to invoke the script! 
Is there a way of accessing such a parameter from the operating system?  

Simon Gatehouse


Simon Gatehouse                                  
CSIRO Exploration and Mining,
Newbigin Close off Julius Ave
North Ryde, NSW
Mail:      PO Box 136, North Ryde
           NSW 1670, Australia
Phone:     61 (2) 9490 8677
Fax:       61 (2) 9490 8921
Mobile:    61  0407 130 635 
E-mail:    simon.gatehouse at csiro.au
Web Page:  http://www.csiro.au/

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list