vbscript_code_generation_utils: 'vbscript' Code Generation

vbscript_code_generation_utilsR Documentation

vbscript Code Generation

Description

Utilities to generate vbscript code in R.

Usage

vbscript_lines_echo(x)

vbscript_lines_set_focus_to_window(window_name)

vbscript_lines_execute_keystrokes(keystrokes, init_shell = TRUE)

Arguments

x

[character] (mandatory, no default)

a string to echo in vbscript

window_name

[character] (mandatory, no default)

set Windows focus to window by this name; if such a window does not exist, this function just fails to set focus to anything (without indicating failure in R or otherwise)

keystrokes

[character] (mandatory, no default)

one or more keystrokes to execute; specials include {ENTER} for Enter, {TAB} for Tab, etc.

init_shell

[logical] (mandatory, default TRUE)

keystrokes can only be executed if WScript.Shell has been initiated earlier in the script; if this argument is TRUE, this initiation is preprended to output of this function

Details

  • vbscript_lines_echo: simply generates a Wscript.Echo call using x

  • vbscript_lines_set_focus_to_window: generates a FocusShell.AppActivate call using window_name; if such a window does not exist, this function just fails to set focus to anything (without indicating failure in R or otherwise)

  • vbscript_lines_execute_keystrokes: generates WshShell.SendKey calls using keystrokes

Value

a vbscript_lines object (see as.vbscript_lines)


WetRobot/vbscript documentation built on April 24, 2023, 1:22 p.m.