Previous Topic

Next Topic

Book Contents

Book Index

The Action element

Notes Menu Launcher can perform a series of actions when a menu is selected. Each Action element describe an action to perform, and if the action is successful, the next step execute. By having this chain-of-actions style, you can perform any number of actions for a menu.

Often an Action contain a command and several parameters. The command (or Action types as they are called later) and their parameters are specified later in this chapter.

Below you see a sample Action

<Action ID="Start">
<
Type>LaunchApplication</Type>
<
Parameter1>NOTEPAD.EXE</Parameter1>
<
Parameter2>C:\TEST.TXT</Parameter2>
<
Parameter3>Extra params</Parameter3>
<
ActionSucces>Finish</ActionSucces>
<
ActionFailure>NotFound</ActionFailure>
<
Timeout>5000</Timeout>
</
Action>

First, each Action within an Actions-wrapper element, must have an unique ID. It's again up to you to ensure that really is the case. Since each action contain a pointer to the next action, the sequence of actions within the Actions-element is not important.

This sample has set the type to LaunchApplication. This is one of the actions types (or commands) Notes Menu Launcher understands and performs. You also see that this type requires at least one parameter, specified as Parameter1. In this sample we try to launch Notepad.exe with the parameter C:\Test.txt. If that succeeds, Notes Menu Launcher advances to the next Action-element; Finish, and if it fails, the Action element NotFound is executed.

Next you see all the different action types:

In This Section

LaunchApplication

SendKeys

NotesAgent

NotesFormula

WaitForWindowTitle

WaitForClass

WaitForModule

WaitForWindowDialog

See Also

The XML File

How Notes Menu Launcher communicates to the outside

NotesMenus - the to element

NotesMenu element - one for each menu

The Actions element

The built-in NotesPeek Buddy