-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hello,
I have a long running script that will perform some mouse/keyboard actions once every hour or so, basically clicking some buttons in a Windows application to upload some data. I noticed that it will work when I am at my computer observing, but it does not seem to work when the script is left running overnight and I am away. All other aspects of the R script work, but it is almost as if the mouse/keyboard section of the script was never executed because I will check after many hours have gone by and it seems fine, with the exception of the mouse/keyboard actions allegedly not executing.
I have put in a number of Sys.sleep() functions before/after mouse and keyboard actions to ensure the script is not executing moves too fast for the OS, but I continue to observe the same behaviour of working when I am there but seemingly skipped when I am away for long periods of time. I am wondering if there is a known affect on KeyboardSimulator if Windows goes into some kind of sleep/hibernate mode? Will the first action potentially be lost, and do I need to "wake up" the OS somehow first to reliably get mouse/keyboard actions to register with the OS?
Any other tips or thoughts about this issue would be greatly appreciated.
Thanks