shellexec.wcc | R Documentation |
This function is an extension to the shell.exec
() which is a native
function of R
shellexec.wcc(file, SW.cmd = 7L)
file |
a file name as in |
SW.cmd |
a SW_* command of showing windows |
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.
A new windows with certain applications depending on the association
of the input file
.
Wei-Chen Chen wccsnow@gmail.com.
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
shell.exec()
.
## Not run:
library(pbdZMQ, quietly = TRUE)
shellexec.wcc("a.txt", 5L)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.