shellexec.wcc

0th

Percentile

Shell Execution via cmd windows

This function is an extension to the shell.exec() which is a native function of R

Keywords
internal
Usage
shellexec.wcc(file, SW.cmd = 7L)
Arguments
file

a file name as in shell.exec()

SW.cmd

a SW_* command of showing windows

Details

shell.exec("a.txt") will open a windows (notepad) to edit the file a.txt in windows system. However, the notepad will block the (parent) active R windows, i.e. SW.cmd = 5 as SH_SHOW by default.

The shellexec.wcc("a.txt", SW.cmd = 7L) will open the notepad, but in a minimized window. Therefore, there is no blocking to the active R windows. See the website in the references section to see more options to control the behavior of new windows. Possible choices are

SW_SHOW (5): Activates the window and displays it in its current size and position.

SW_SHOWMINIMIZED (2): Activates the window and displays it as a minimized window.

SW_SHOWMINNOACTIVE (7): Displays the window as a minimized window. The active window remains active.

SW_SHOWNA (8): Displays the window in its current state. The active window remains active.

Value

A new windows with certain applications depending on the association of the input file.

References

Microsoft, Windows Dev Center: Windows desktop applications > Develop > Desktop technologies > Desktop Environment > The Windows Shell > Shell Reference > Shell Functions > ShellExecute

https://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx

See Also

shell.exec().

Aliases
  • shellexec.wcc
Examples
# NOT RUN {
library(pbdZMQ, quietly = TRUE)

shellexec.wcc("a.txt", 5L)
# }
# NOT RUN {
# }
Documentation reproduced from package pbdZMQ, version 0.3-3, License: GPL-3

Community examples

Looks like there are no examples yet.