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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
windows focus and setting active device
2 messages · Gatehouse, Simon (E&M, North Ryde), Brian Ripley
On R for Windows, you can give focus (as you define it) to a window with bringToTop(). If you want anything else, you will need to code it yourself. Beware that this is tricky as the SDI and MDI interfaces behave differently, as do some versions of Windows. BTW `highlighted' and `brought to top' are different concepts and can happen independently.
On Mon, 26 Aug 2002, Gatehouse, Simon (E&M, North Ryde) wrote:
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!
But not to have it on top.
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._