Applications
Application Launching
Purpose: |
Execute an external Windows application or DOS command. |
||||||||||||
Category: |
Applications |
||||||||||||
Syntax: |
Run "command" "parameters" "options" "subroutine" "variable" command The file name and location of the application to be launched. parameters Optional items to be passed to the application (a file name, command switches, etc.) options One of the following:
Additionally, you may combine one of the choices above with any of the following:
subroutine (optional) The name of a subroutine block to execute when the application closes. Leave this blank if you do not wish to use a subroutine. (See App Properties > Actions for more information about subroutines.) variable (optional) The name of the variable store the application's unique identification number. This ID can be used to identify the application to other Actions. |
||||||||||||
Example: |
Run "c:\windows\notepad.exe" "" "Normal+RunOnce" "" "[AppId]" When compiling a publication, VisualNEO Win will localize the command by removing the drive and path from the application’s file name. In the example above, “c:\windows\notepad.exe” would be changed to “notepad.exe”. This behavior is useful for publications that are designed to be used on a variety of computer systems where drives and directories may be organized differently. In some situations, however, you may prefer to leave the drive and path information intact. This can be accomplished by simply placing an exclamation point character ( ! ) at the beginning of the file name. For example: Run "!c:\windows\notepad.exe" "" "Normal+RunOnce" "" "[AppId]" More often than not you will probably want to distribute programs launched with Run along with your compiled VisualNEO Win publication. In that situation, you will want to use the [PubDir] variable instead of a literal path. This will insure that your publication will always be able to locate the application you're attempting to launch. For example: Run "![PubDir]My App.exe" "" "Normal" "" "[AppId]" At runtime, VisualNEO Win will replace the [PubDir] variable with the location of your compiled VisualNEO Win publication exe. In the above example, both “My App.exe” and the compiled pub exe are located in same folder. This will work regardless of whether the files are run from the hard drive, CD, etc. Before distributing any compiled exe files or utilities that were created by someone else, you should obtain permission from the person who owns the rights to that program. Plug-in developers and others may find the global [AppID.ProcessID], [AppID.ProcessHandle], [AppID.WinHandle] and [AppID.ExitCode] variables useful. |
Purpose: |
Execute an external Windows application inside a Rectangle object. The application's window will be sized and/or clipped to fit within the bounds of the specified Rectangle object. This may not work with some types of applications. |
||||
Category: |
Applications |
||||
Syntax: |
RunInRectangle "object name" "command" "parameters" "options" "subroutine" "variable" object name The name of an existing object. command The file name and location of the application to be launched. parameters Optional items to be passed to the application (a file name, command switches, etc.) options One or both of the following:
subroutine (optional) The name of a subroutine block to execute when the application closes. Leave this blank if you do not wish to use a subroutine. (See App Properties > Actions for more information about subroutines.) variable (optional) The name of the variable store the application's unique identification number. This ID can be used to identify the application to other Actions. |
||||
Example: |
RunInRectangle "Rectangle1" "notepad.exe" "" "" "" "[AppId]" Plug-in developers and others may find the global [AppID.ProcessID], [AppID.ProcessHandle], [AppID.WinHandle] and [AppID.ExitCode] variables useful. |
Purpose: |
Close a running application program. |
||||
Category: |
Applications |
||||
Syntax: |
CloseApp "application" "mode" application The file name of a running program or an application ID variable returned by Run or RunInRectangle. mode One of the following:
|
||||
Example: |
CloseApp "[AppID]" "RequestClose" |
Purpose: |
Determine if a specific application is running. |
Category: |
Applications |
Syntax: |
IsAppRunning "application" "variable" application The file name of an executable program or an application ID variable returned by Run or RunInRectangle. variable The name of the variable to store the results. If the application is running, the variable will be set to “True”, otherwise, it will be set to “False”. |
Example: |
IsAppRunning "notepad.exe" "[Result]" |
Purpose: |
Send keystrokes to another Windows application. This Action allows you to control another application by simulating keys being typed on the keyboard. If the application is not already loaded, then SendKeys will launch it prior to sending any keystrokes. |
||||||||||||||||||||||||||||||
Category: |
Applications |
||||||||||||||||||||||||||||||
Syntax: |
SendKeys "application" "keystrokes" application The file name of an executable program or an application ID variable returned by Run or RunInRectangle. keystrokes Keystrokes may include text and any of the special key codes listed below:
You can also specify the state (up/down) of the Shift, Control and Alt keys to access virtually the entire range of key combinations. Key codes for these keys are: {ShiftDn} {ShiftUp} {CtrlDn} {CtrlUp} {AltDn} {AltUp} These keys must always be used in pairs. For example, if you use {ShiftDn} you must remember to follow it with a {ShiftUp} code, otherwise your keyboard will behave as if the Shift key is stuck in the down position. |
||||||||||||||||||||||||||||||
Example: |
The following example opens the Windows Notepad utility types "Hello world" and executes the File/Print command: SendKeys "notepad.exe" "Hello world{Enter}{AltDn}FP{AltUp}" |
Purpose: |
Send a menu command to an application. |
Category: |
Applications |
Syntax: |
SendMenuCommand "application" "commands" application The file name of an executable program or an application ID variable returned by Run or RunInRectangle. commands The menu commands to execute separated by commas. Can be formatted as text “File,Open”, or a numeric index “1,2” indicating the position of the items in the menu tree. |
Example: |
SendMenuCommand "[AppID]" "File,Open" |
Purpose: |
Pass a file name to an application by simulating a drag and drop event. |
Category: |
Applications |
Syntax: |
DropFile "application" "file name" application The file name of an executable program or an application ID variable returned by Run or RunInRectangle. file name The name of an external file to be dropped on the application. |
Example: |
DropFile "notepad.exe" "[PubDir]notes.txt" |
Purpose: |
Set the size and position of an application's main window. |
Category: |
Applications |
Syntax: |
SetWindowPos "application" "left" "top" "width" "height" application The file name of an executable program or an application ID variable returned by Run or RunInRectangle. left, top The window’s new left, top position. Use “-1” instead to center the window on the screen. width, height The window’s new width and height. Use “-1” to keep the window’s current dimensions. |
Example: |
SetWindowPos "[AppID]" "100" "100" "350" "450" |
Purpose: |
Get the current size and position of an application's main window. |
Category: |
Applications |
Syntax: |
GetWindowPos "application" "x var" "y var" "width var" "height var" application The file name of an executable program or an application ID variable returned by Run or RunInRectangle. x var The name of the variable to store the window’s left position. y var The name of the variable to store the window’s top position. width var The name of the variable to store the window’s width. height var The name of the variable to store the window’s height. |
Example: |
GetWindowPos "[AppId]" "[X]" "[Y]" "[W]" "[H]" |
Purpose: |
Bring an external application's main window to the foreground. |
Category: |
Applications |
Syntax: |
BringAppToFront "application" application The file name of a running program or an application ID variable returned by Run or RunInRectangle. |
Example: |
BringAppToFront "[AppID]" |
Purpose: |
Send an application's main window to the background. |
Category: |
Applications |
Syntax: |
SendAppToBack "application" application The file name of an executable program or an application ID variable returned by Run or RunInRectangle. |
Example: |
SendAppToBack "[AppID]" |
Purpose: |
Disable mouse and keyboard input to an application's main window. |
Category: |
Applications |
Syntax: |
DisableApp "application" application The file name of a running program or an application ID variable returned by Run or RunInRectangle. |
Example: |
DisableApp "[AppID]" |
Purpose: |
Enable mouse and keyboard input to an application's main window. Use in conjunction with DisableApp. |
Category: |
Applications |
Syntax: |
EnableApp "application" application The file name of a running program or an application ID variable returned by Run or RunInRectangle. |
Example: |
EnableApp "[AppID]" |
Purpose: |
Run another compiled VisualNEO Win publication. The current publication will be closed and the new one opened in its place. RunVisualNEO Win can be used to link several smaller publications together to gain the same functionality as a single larger publication. When using this option to link multiple publications, the first publication must be compiled as a fully executable exe or runtime package (with NBRun5.exe). Other publications in the group can be compiled as runtime packages or web browser plug-ins to conserve space. |
||||
Category: |
Applications |
||||
Syntax: |
RunVisualNEO Win "file name" "options" file name The name of a compiled VisualNEO Win publication (*.exe, *.pkg). options Can be none, one or both of the following:
|
||||
Example: |
RunVisualNEO Win "[PubDir]MyOtherPub.exe" "ClearVars+CloseWindows" |
Note: Sharing custom windows between publications, can lead to a situation where you have more than one object with the same name. VisualNEO Win prevents this from happening within a single publication, but there's no way to do that across multiple publications. This only a problem if you need to affect such an object using an Action that requires an object name such as ShowObject. When two objects with the same name exist at the same time, the object in the custom window will have precedence over the publication-based object. When this situation exists, it's not possible to affect the publication-based object because the windowed object will intercept the command first. This shouldn't present a problem as long as you take care when designing your publications.
Add-On Utilties
Purpose: |
Activate a third party Add-On function designed for VisualNEO Win 3.x. |
Category: |
Applications |
Syntax: |
ExecuteAddon "add-on file name" "commands" add-on file name The name of the Add-On’s exe file. commands The required commands will vary depending on the Add-On used. Please consult the individual Add-On’s documentation for instructions. |
Example: |
ExecuteAddOn "c:\add-ons\NeoSock.exe" "nsOpen 21" |
Note: Add-ons created for previous versions of VisualNEO Win can still be used, but should be replaced with the newer Plug-In versions of those tools when available.
Obsolete
Purpose: |
Execute an external Windows application or DOS command. This Action is obsolete, please use Run instead. |
Category: |
Applications |
Syntax: |
DOSCommand "command" "params" "options" |
Example: |
DOSCommand "notepad.exe" "c:\test.bat" "Normal" |