| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/shellexec_wcc.r |
| 3 |
\name{shellexec.wcc} |
| 4 |
\alias{shellexec.wcc} |
| 5 |
\title{Shell Execution via cmd windows} |
| 6 |
\usage{ |
| 7 |
shellexec.wcc(file, SW.cmd = 7L) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{file}{a file name as in \code{shell.exec}()} |
| 11 |
|
| 12 |
\item{SW.cmd}{a SW_* command of showing windows} |
| 13 |
} |
| 14 |
\value{ |
| 15 |
A new windows with certain applications depending on the association |
| 16 |
of the input \code{file}. |
| 17 |
} |
| 18 |
\description{ |
| 19 |
This function is an extension to the \code{shell.exec}() which is a native |
| 20 |
function of R |
| 21 |
} |
| 22 |
\details{ |
| 23 |
\code{shell.exec("a.txt")} will open a windows (notepad) to edit the file |
| 24 |
\code{a.txt} in windows system. However, the notepad will block the (parent) |
| 25 |
active R windows, i.e. \code{SW.cmd = 5} as \code{SH_SHOW} by default. |
| 26 |
|
| 27 |
The \code{shellexec.wcc("a.txt", SW.cmd = 7L)} will open the notepad, but in |
| 28 |
a minimized window. Therefore, there is no blocking to the active R windows. |
| 29 |
See the website in the references section to see more options to control the |
| 30 |
behavior of new windows. Possible choices are |
| 31 |
|
| 32 |
\code{SW_SHOW (5)}: Activates the window and displays it in its current size |
| 33 |
and position. |
| 34 |
|
| 35 |
\code{SW_SHOWMINIMIZED (2)}: Activates the window and displays it as a |
| 36 |
minimized window. |
| 37 |
|
| 38 |
\code{SW_SHOWMINNOACTIVE (7)}: Displays the window as a minimized window. |
| 39 |
The active window remains active. |
| 40 |
|
| 41 |
\code{SW_SHOWNA (8)}: Displays the window in its current state. The active |
| 42 |
window remains active. |
| 43 |
} |
| 44 |
\examples{ |
| 45 |
\dontrun{ |
| 46 |
library(pbdZMQ, quietly = TRUE) |
| 47 |
|
| 48 |
shellexec.wcc("a.txt", 5L) |
| 49 |
} |
| 50 |
|
| 51 |
} |
| 52 |
\references{ |
| 53 |
Microsoft, Windows Dev Center: Windows desktop applications > |
| 54 |
Develop > Desktop technologies > Desktop Environment > The Windows Shell > |
| 55 |
Shell Reference > Shell Functions > ShellExecute |
| 56 |
|
| 57 |
\code{https://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx} |
| 58 |
} |
| 59 |
\seealso{ |
| 60 |
\code{shell.exec()}. |
| 61 |
} |
| 62 |
\author{ |
| 63 |
Wei-Chen Chen \email{[email protected]}. |
| 64 |
} |
| 65 |
\keyword{internal} |