DataLoad commands are used to give user friendly names to complex or frequently used activities. Commands may be built-in to DataLoad to provide additional functionality while others are aliases for commonly used or complex keystrokes. Command names are not case sensitive and may be entered in upper or lower case in the DataLoad spreadsheets. Each type of command is documented below.
Commands that are keystroke aliases are used to hide complex keystrokes behind a more user
friendly command name. For instance, to "Save & Proceed" in
Oracle E-Business Suite 11i/R12 the following keystroke combination is required:
DataLoad includes a standard Save & Proceed command called *SP that is an alias for those keystrokes, i.e. when *SP is used in a spreadsheet DataLoad will actually send the Save & Proceed keystrokes. Using the command alias makes the spreadsheet easier to read and understand. Also, if the keystroke sequence needs to change then only the command definition needs to be changed and no changes are required in the spreadsheet.
Multiple definitions can exist for each command because the keystrokes required for the command can vary between applications, for example the keystroke shortcut to create a new record may be different in Oracle E-Business Suite, SAP and Sage. A Command Group contains all the definitions for a particular application. Before running a Macro load the Command Group must be set via the drop list on the DataLoad toolbar.
Commands and Command Groups may be created, edited and deleted in DataLoad. To do this, open the Macro Commands window using the toolbar icon or with the Edit->Commands menu entry. When a new Macro load is created the default commands are added to the load. If the Commands or Command Groups are later changed then this only affects that load. To save those changes such that they become the default and are used for all future loads the "Make Default" button should be pressed. Similarly, to overwrite a load's commands with the defaults the "Load Defaults" button should be pressed.
While new commands can be added, DataLoad comes with a large number of pre-configured commands. These are listed below.
DataLoad Command |
Application Action(s) |
|
|
TAB |
Press the Tab key |
ENT |
Press the Enter key |
*UP |
Press the up arrow key |
*DN |
Press the down arrow key |
*LT |
Press the left arrow key |
*RT |
Press the right arrow key |
*SAVE |
Save the current record |
*SP |
Save & proceed |
*FE |
Open the field editor |
*PB |
Navigate to the previous block |
*NB |
Navigate to the next block |
*PF |
Navigate to the previous field |
*NF |
Navigate to the next field |
*PR |
Navigate to the previous record |
*NR |
Navigate to the next field |
*IR |
Insert a new record |
*CL |
Clears the form field but does not delete any data |
*ER |
Clears a record from the form fields but does not delete it |
*DR |
Delete the current record |
*FR |
Navigate to the first record |
*LR |
Navigate to the last record |
*SB |
Press the Spacebar. This is useful for toggling the setting
of radio buttons and check boxes instead of using the mouse. |
*ST |
Select the entire field |
*FI |
Open the find window |
*FA |
Find all records |
*QE |
Put the form in to the query enter mode |
*QR |
Run a query when the form is in query enter mode |
*BM |
Open the block menu. This is used in Oracle E-Business
to select the block or tab to which to navigate. |
*AX |
Sends the Alt + X keystroke where X is a single letter (A-Z).
See Note 1 |
The following commands are built-in to DataLoad to provide additional functionality beyond sending data and keystrokes to applications. These commands cannot be edited or replaced
in the commands window. The built-in commands are listed in the following table. Click the command name for more information about using each command.
Command |
Application Action(s) |
|
|
*SLN or *SL(N) |
Pause the load for N seconds |
*SL DataLoad can send data and keystrokes to applications faster than they can be processed. Delays are used to control the load speed to ensure the load is reliable and no fields are skipped. The *SLN command can be added to a spreadsheet cell to cause DataLoad to 'sleep' for a given number of seconds at that point in the load. For example, '*SL5' will cause a pause in the load for 5 seconds. Decimal numbers can be used for more precise delays, e.g. *SL0.5 will result in a half second delay. The number specifying the length of the delay may optionally be enclosed in brackets, e.g. *SL(0.5).
*SL is used to include a delay at a specific point in the load and is most useful for situations not covered by the pre-configured DataLoad delays. As such they will probably be used in particular one-off situations. Using them repeatedly in the spreadsheets should be avoided because it becomes very time consuming to change the delay when debugging or fine tuning the load.
A large number of other delays are available in DataLoad and these, along with *SL, are described in the Using delays page. |
*CW(window) |
Change to window window |
*CW is used to change loading to a different window. This command is useful where a load must work with more than application or the application has multiple windows. The name of the target window must supplied as a parameter to the *CW command. For example, the following would activate Excel:
*CW(Microsoft Excel)
The target application must be running before *CW is used and the window name should be as displayed in the application's icon in the Windows taskbar. The whole window name does not have to be used (except in Browser Control Named IE mode, where the full name must be used) but enough of the beginning of the name must be provided to uniquely identify the window. The example above will activate the correct Excel window if only one Excel workbook is open, otherwise the full window name must be provided including the workbook name.
One or more of the following actions may optionally be included after the window name (these are ignored when Browser Control is used to load to Named IE windows):
ACTIVATE: Bring the window to the foreground. This is the default action for *CW() and used if no actions are specified.
MAX: Maximize the window
MIN: Minimise the window
CLOSE: Close the window.
To activate and maximize the Excel window:
*CW(Microsoft Excel, ACTIVATE, MAX)
A final, optional, timeout parameter may be used in Load Control and Bowser Control loads to specify how long to wait to find the window before stopping the load with an error if the window can't be found. This is useful if the target window may still be opening when DataLoad tries to activate it. For example, to switch to Excel and allow 10 seconds to find the window:
*CW(Microsoft Excel, 10)
And to activate and maximize Excel while allowing a 15 seconds timeout:
*CW(Microsoft Excel, ACTIVATE, MAX, 15)
Note, if a timeout is specified it overrides the timeout specified in the Delays window.
|
*ML(coordinates) |
Position the mouse at coordinates and press the left button |
*MR(coordinates) |
Position the mouse at coordinates and press the right button |
*DL(coordinates) |
Position the mouse at coordinates and double click the left button |
*ML(), *MR() & *DL() These commands produce a left (*ML) or right (*MR) mouse click or a double left click (*DL) to occur at the screen location specified in the coordinates parameter. Using keystrokes in Macro loads is normally the most reliable approach, however mouse clicks have two important uses. First, some applications' forms have functionality that cannot be accessed using keystrokes and a mouse must be used. Second, if form navigation requires a large number or complex sequence of keystrokes then using the mouse may be more appropriate.
The coordinates parameter specifies the X and Y screen location where the click should occur. For example,
*ml(50, 294)
There is no way for a user to know what these coordinates should be so DataLoad will automatically insert the coordinates into the command. Once the coordinates are known the full command can be copied to all other spreadsheet cells where it is required.
Entering *ML(, *MR( or *DL( in a cell will cause DataLoad to help calculate the required coordinates. Having entered this an information message is displayed and this must be acknowledged to continue. DataLoad will then capture the location of the next mouse click. Thus, the target application should be activated using the keyboard, e.g. Alt + Tab, rather than with the mouse otherwise that mouse click will be captured. When the target application is visible, perform a single left mouse click where the click should occur during the load. DataLoad will capture the coordinates and complete the command in the spreadsheet cell.
The mouse commands are suitable where the item to be clicked will always be in the same location. Given that most applications' forms are always drawn in the same position this should not be a problem, however it is important that forms are left in their default positions and sizes while the load is being developed and later run. Maximising the application's main or parent window, i.e. the one containing all forms, helps to ensure the screen coordinates remain correct. Of course, if the screen resolution is changed or the load is used on a different PC with different screen resolution then the mouse coordinates will almost certainly have to be recalculated.
|
PROMPT(message) |
Prompt the user with message and wait for a response |
PROMPT(message) It is sometimes necessary to pause a load while the user reads a message or performs some action. That is achieved using the PROMPT(message) command. For example, the following may be used in a DataLoad cell:
PROMPT(Enter the password then click OK to continue)
That will cause DataLoad to pause the load and display the message "Enter the password then click OK to continue" to the user. The load will remain inactive until the user clicks the message's OK button. DataLoad will then re-activate the last window to which data was being sent and will continue with the load. |
PHP(function) |
Calls a PHP function when Scripting used with a Macro load |
PHP(function) With this command PHP functions can be called from within a Macro load. Because the PHP() command can be used in any cell this allows PHP functions to be called at any time, providing significant flexibility for how PHP can add further functionality to DataLoad loads. The name of the PHP function to be executed is included as a parameter, i.e. between the brackets.
|
Further commands are available that are specific to Browser Control loads and they are detailed here.