An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# vbscript

[![R-CMD-check](https://github.com/FinnishCancerRegistry/vbscript/actions/workflows/R-CMD-check.yaml/badge.svg)](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)
```