[R] Opening Another Application in R Then Hangs
Sparks, John
j@p@rk4 @end|ng |rom u|c@edu
Mon Jul 6 00:16:12 CEST 2020
Hi Jeff,
Greatly appreciate your reply, but I don't quite understand it.
Perhaps I should give a little more detail.
For this example, I want to open notepad, then go to notepad and type something in. So the program
library(KeyboardSimulator)
setwd("C:/Users/JSparks/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Accessories")
system2("Notepad",invisible=FALSE)
mouse.move(2423,236)
mouse.click()
keybd.type_string("Hello world!")
would do this, but it does not advance passed the system2 command.
Best wishes,
--JJS
________________________________
From: Jeff Newmiller <jdnewmil using dcn.davis.ca.us>
Sent: Sunday, July 5, 2020 5:08 PM
To: r-help using r-project.org <r-help using r-project.org>; Sparks, John <jspark4 using uic.edu>; R-help <r-help using r-project.org>
Subject: Re: [R] Opening Another Application in R Then Hangs
Exit the application you started?
On July 5, 2020 3:06:52 PM PDT, "Sparks, John" <jspark4 using uic.edu> wrote:
>Hi R Helpers,
>
>I am trying to open another application from within R and then work
>with it.
>
>I can get the application to open, but R then hangs at that point
>(spinning blue circle in the middle of the screen) and my subsequent
>programming does not execute.
>
>Does anybody know how to get R to unlock?
>
>I am using Windows 10 and R4.0.
>
>The example below freezes R on my machine.
>
>Any guidance appreciated. Thanks.
>--John Sparks
>
>setwd("C:/Users/JSparks/AppData/Roaming/Microsoft/Windows/Start
>Menu/Programs/Accessories")
>system2("Notepad",invisible=FALSE)
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.
--
Sent from my phone. Please excuse my brevity.
[[alternative HTML version deleted]]
More information about the R-help
mailing list