Hi,
This may or may not be slightly off topic, but I'll stick my neck out...

I want to launch an external application from R while retaining R as the active application window (with R console as the active R window).

I'm using shell.exec() to sequentially open and evaluate the contents in all jpeg images in a specific folder, using the viewer specified by the file association (in my case IrfanView).
When I do this, the image viewer obviously becomes the active window, but I would really like to retain R as the active application to avoid having to toggle with Alt+Tab or the mouse to make R active after loading each image. The alternative approach is of course to open the images directly in R (using readJpeg or some such), but in my (perhaps limited) experience this tends to be rather slow compared to using an external viewer.

I know of the functions to keep a particular window within R active, but I have not come across a way to do this when it involves different applications. Is this something that can be done from within R (possibly using system()...)? There are various fixes in Windows to do this, but they are rather cumbersome and usually involve editing registry keys etc. Since I don't have administrator rights on my machine, this is not really an option.

I'm working in Windows 7 (64-bit) on an x86 machine (build 7601, Service Pack 1), running R 2.14.1 in MDI mode.

I'd be very grateful for any suggestions!

Regards,
Martin

________________________________________________________________
Martin Biuw (PhD)
Postdoctoral Research Fellow

Norwegian Institute for Nature Research - NINA
Postal address: Framsenteret, 9296 Tromsų, NORWAY
Delivery/Visiting address: Framsenteret, Hjalmar Johansens gate 14, 9007 Tromsų, NORWAY
Phone: +47 77 75 04 17 * Cell: +47 40 72 96 15 * Fax: +47 77 75 04 01 * www.nina.no<http://www.nina.no/>
________________________________________________________________


	[[alternative HTML version deleted]]

