Vous êtes sur la page 1sur 11

Sending Keystrokes

By default, DataLoad Macros use copy and paste to enter data into the target
application, and on most occasions this is the best approach. Occasionally, however, it
is desirable to be able to send keystrokes to the application. DataLoad allows you to
send the entire keyboard's printing and most non-printing (E.g. the function keys)
characters to the active window as if they were typed at the keyboard. To specify that
a cell should result in key presses the text should be preceded with a backslash. For
example, the following would result in each of the specified keys, except for '\', to be
.sent as simulated key presses
Send this as keystrokes\
To send a cell which must start with a backslash using copy and paste, precede the
Send \" cell text with a second backslash. For example, the following will cause
:to be pasted into the target application "this as keystrokes
Send this as keystrokes\\
One or more characters represent each key. To specify a single keyboard character,
use the character itself. For example, to send the letter A, use \A. To send multiple
characters, append each additional character to the one preceding it. To send the
letters A, B, and C, use \ABC. When DataLoad presses a specified key it
automatically takes account of any other key which may need to be pressed to send
the exact character which was specified. For instance, if a form field is populated by
using the command \A an 'A' will appear in the field, that is the character's case is
preserved. In the example of uppercase characters the shift key is automatically
.depressed with the character key to send an uppercase letter
To use any combination of the Shift, Control, Alt and right Alt keys one of the
:following codes should be used







the key in question. Each of these keys is initially in the toggles Each of these codes
"up" position and when one of those codes are used the desired key is depressed.
When the code is used again the key is lifted, and so on. If any keys are left depressed
when the DataLoad cell has been processed the key is lifted. The following are

Effect in Active Window



F% \

Same as above

keys these characters must be enclosed in braces & If you want to send the +, ^, % or
{}. For example, to send '2 +2=4' the following should be entered in the DataLoad
:To send a key or a number of keys multiple times, use the following syntax
}key(s) number{\
You must put a space between the key(s) and number. For example, {d 10} means
press d 10 times, while {Data 5} sends the keys 'Data' 5 times. The non-printing
.characters described below can also be sent multiple times in this way
To specify characters that aren't displayed when you press a key, such as ENTER or
TAB, and keys that represent actions rather than characters, use the codes shown
.below. Note that these codes are also enclosed in braces






























Toggle Numlock


Prnt Scrn


































Added in DataLoad V4.3.6.0 - 1

Added in DataLoad V4.3.7.0 - 2

DataLoad Commands
A DataLoad command is essentially an alias representing special processing. There
are two types of command, although this is not necessarily apparent to the DataLoad
user. The majority of commands act as a user friendly alias for the normal data or
keystrokes that can be entered into a cell and these are discussed immediately below.
However a number of specialised built-in commands are also available and these are
.at the bottom of this page discussed
A command is typically used to hide complex keystrokes behind a more user friendly
Proceed" in Oracle Applications 11i the & command name. For instance, to "Save
:following keystroke combination is required
Proceed is required will & Attempting to enter those keystrokes every time a Save
make the DataLoad spreadsheet more unreadable and therefore harder to understand
and maintain, and the likelihood of mistakes also increases. A much better approach is
& to register those keystrokes under a user friendly command name. The Save
Proceed keystrokes are normally defined as *SP. This means that the command can be
used multiple times in one load but it is only defined in one place. If the keystrokes
Proceed must be changed the definition of *SP can be changed & required to Save
.once rather than every time the command is used in a sheet
Prior to V4.1 all DataLoad commands were hard coded into the software and no
changes could be made to command definitions. As of V4.1 commands can be edited,
added or deleted. The default commands are maintained in the file "commands.dat",
which must be located in the same directory as dataload.exe. Command definitions are
also stored in the DataLoad spreadsheet files. This makes the spreadsheets portable
and any special commands you have created for a your load will still work as you
.designed them when used on another PC
For every DataLoad command .command groups V4.1 also introduced the concept of
there can be a number of different definitions, each belonging to a different group.
Different definitions are required where a load may be used with multiple applications
& that have different access paths to the same functionality. For instance, to Save
:Proceed in Oracle Applications 11.0 the following keystrokes are required

Because this is different to the 11i definition we will want to define *SP differently in
each command group, thus allowing the same command to be used to load data into
different applications but with different keystrokes resulting. A command group must
be selected from the drop down list on the main DataLoad form before a load can
The following table lists the standard DataLoad commands available and the effects of
.using those commands

Application Action(s)






>Up Arrow<


>Down Arrow<


>Left Arrow<


>Right Arrow<


Proceed & Save


Field Editor


Previous Block


Next Block


Previous Field


Next Field


Previous Record


Next Record


Erase Record


Delete Record


First Record


Last Record


Save Record


Send a single space character


.Select entire field text

)N(or *SL SLN*

Note 1 .Pause for N seconds


Block Menu


Note 2 .Alt + X where X is a single letter (A-Z)


+ Find


+ Find All


)f11 ( + Query Enter


) Ctrl + f11 ( + Query Run


+ Clear Field


+ Insert record


+ .window Change to window


++ .and press the left button coordinates Position the mouse at


++ .and press the right button coordinates Position the mouse at

.DataLoad V4.0.2 and above only +

.DataLoad V4.1 and above only ++

DataLoad can send keystrokes to applications faster than they can be Note 1
processed. If this problem is encountered delays can be added to the load which will
pause DataLoad at key times. The *SLNcommand can be added to the spreadsheet to
indicate DataLoad should 'sleep' for a given number of seconds. E.g. '*SL5' will cause
a delay in processing for 5 seconds. Decimal numbers can be used for more precise
delays, E.g. *SL0.5 will result in a half second delay. A large number of predefined
delays are available in DataLoad and these, along with *SL, are described in greater
To reduce setup work, predefined delays should be used .Using delays detail in
.instead of *SL wherever possible
In Oracle Applications it is sometimes necessary to press a button to navigate Note 2
where X is the letter that ,>Alt-X< to another block. This can be achieved by pressing
+ >Alt< is underlined on the button. Any menu item can also be invoked by pressing
.the letter underlined on the menu
Built-in Commands

The following commands are built-in to DataLoad and cannot be edited or replaced in
.the commands form
)Case Sensitive(

Application Action(s)


.the new target window for DataLoad window Make

)N(or *SL SLN*

.seconds N Sleep for


.and press the left button coordinates Position the mouse at


.and press the right button coordinates Position the mouse at

)coordinates(DL* .and double click the left button coordinates Position the mouse at

.and wait for a response message Prompt the user with

.PROMPT() are not available in DataLoad Classic & )(DL*

allows you to switch between different windows and load data into all of them. CW*
This command is useful when it is not possible to change windows by any other
means, but also has good uses even when this is not the case. It is often possible to

change the active window through the application, for instance navigating to the next
block in Oracle Applications sometimes causes the focus to move to another window.
Despite this it is often faster to change to the new window by calling *CW rather than
allowing the application to make the change, and this not only results in faster loads
.but reduces errors as well
causes DataLoad to 'sleep' for the specified number of seconds and is an SL*
important command for controlling the rate at which DataLoad progresses. This
.Cell Delays command is described in more detail in
These commands will cause a left (*ML) or right (*MR) mouse .DL* & ML, *MR*
click or a double click (*DL) to occur at the point on the screen specified in the
coordinates parameter. These commands can be very important and have a number of
uses. First, they are essential for accessing any application functionality for which no
keyboard shortcut exists. Where a button, for example, cannot be accessed using a
keyboard shortcut a mouse click must be used. The mouse is also very useful for
improving the speed and accuracy of navigation within the application during a load.
It is often much quicker to move the cursor using the mouse than by issuing the
necessary keystrokes. This may apply whether the cursor is just moving between
.blocks in a form or between different windows
The coordinates parameter is the X and Y screen positions where the click should
occur. Since there is no way a user can know what these coordinates are DataLoad has
a method for automatically inserting the coordinates into the command. When the user
enters *ML, *MR or *DL in a cell a dialog box is shown prompting the user to
notbe position the mouse where the click should occur. This dialog box should
dismissed yet because doing so indicates to DataLoad that the mouse is in the correct
position for the click. When the mouse is in the location where the click should occur
the user should then press Enter. This will dismiss the dialog box and insert the screen
coordinates into the *ML or *MR command. Those coordinates can be manually
entered into further cells where this same click should occur, or the dialog box can be
.displayed again by entering *ML, *MR or *DL
The mouse clicks work very well to make functionality available for which no
keyboard shortcuts exist, or to improve cursor navigation during a load. This
command is only suitable, however, where the item to be clicked will always be in the
same location. Since Oracle Applications' forms are always drawn in the same
position this should not be a problem, however it is important that the forms are left in
their default positions while the load is being developed and the mouse click
.commands programmed

It is sometimes necessary to pause a load while the user )message(PROMPT

command. )message(performs some action. That can be achieved using the PROMPT
:For example, the following could be entered 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 that data was being sent to and continue with the load

Data Load Sheets