AppBringUp

Starts the specified application, or reactivates it if it is already running.

Syntax

AppBringUp "appName" [, "cmndLine" [,style[, "dir"]]]

Argument Description
appName A name you assign to the application to be started. This value can be used again in subsequent AppBringUp instructions to reactivate a running application. The value has meaning only to Dragon; it has no effect on the application.

If no other arguments are included, and the appName value has not been used in a previous AppBringUp or AppSwapWith command, AppBringUp looks for an executable file named appName in the Dragon Program folder and in the directories that Windows searches when starting a program.

cmndLine Specifies the application path and any command line switches, such as the name of a file to open. Long file names are not supported. For program names it is not necessary to include the extension .EXE.

If the value contains a file name, Dragon starts the application specified (or, if no application is specified, the program associated with the file type) and opens the file.

If this argument does not include a full file path, the file must be in the Dragon Program folder or in a directory that is searched when Windows starts a program.
style A value indicating the window state in which to open the application. If the application is already running, this value has no effect.
  1 (default) Default window size; active
  2 Minimized window; active
  3 Maximized window; active
  4 Default window size; not active
  6 Minimized window; not active
dir Specifies the default working directory for the application. The default value is the directory containing the program's executable file.

Example 1

This example starts or reactivates WordPad, opens the MyApp Readme file in a maximized window.

AppBringUp "Readme", "Notepad C:\Program Files\Myapp\Readme.txt", 3

 

This second instruction reactivates the specified application (it must be running) and file by using the same appName value.

AppBringUp "Readme"

Example 2

This example copies text from the active application to the specified application when you say "Copy All to Word" or "Copy All to WordPad". In this example, the command name is "Copy All to <EditorName>" and the <EditorName> list consists of the words "Word" and "WordPad".

SendKeys "^a^c"
if _arg1 = "Word" then AppBringUp "WinWord"
if _arg1 = "WordPad" then AppBringUp "WordPad"
SendKeys "^v"
SendSystemKeys "{Alt+Tab}"

Note

Scripting commands from Dragon version 5 that use the Dragon List Variables will only function when the .dvc file is imported. You cannot create new commands using these old Dragon List Variables.