https://github.com/finnishcancerregistry/vbscript
Write and run vbscript code from the comfort of your R session.
https://github.com/finnishcancerregistry/vbscript
automation keystroke-automation r r-interface r-package shell-execution vbscript windows-automation windows-scripting
Last synced: 12 months ago
JSON representation
Write and run vbscript code from the comfort of your R session.
- Host: GitHub
- URL: https://github.com/finnishcancerregistry/vbscript
- Owner: FinnishCancerRegistry
- License: other
- Created: 2019-11-01T10:20:28.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-02T09:22:03.000Z (almost 3 years ago)
- Last Synced: 2025-01-31T14:38:05.682Z (about 1 year ago)
- Topics: automation, keystroke-automation, r, r-interface, r-package, shell-execution, vbscript, windows-automation, windows-scripting
- Language: R
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vbscript
[](https://github.com/FinnishCancerRegistry/vbscript/actions/workflows/R-CMD-check.yaml)
Enables easy calling of vbscript files from R.
This package can be used to automatically interact with GUIs in Windows
when there is no other choice.
## Installation
``` r
devtools::install_github("WetRobot/vbscript")
```
## Examples
Print something in vbscript
``` r
library(vbscript)
call_vbscript_lines(vbscript_lines_echo("hello world!"))
```
Execute some keystrokes in notepad
``` r
library(vbscript)
shell.exec("notepad")
write_to_notepad <- c(
vbscript_lines_set_focus_to_window("Notepad"),
vbscript_lines_execute_keystrokes(c("h", "e", "l", "l", "o")),
vbscript_lines_set_focus_to_window("Notepad"),
vbscript_lines_execute_keystrokes(c("{ENTER}", "w","o","r","l", "d", "!"))
)
call_vbscript_lines(write_to_notepad)
```