App Manipulation Actions

These are actions that let you operate on an application through it's controls, fields, menus, shortcuts, etc.

Control Action Category

All the control actions take a resource ID. This is the ID of the object in the target's form. See here for information on obtaining a resource ID.

Tap

Simulates a pen tap on the specified control.

Enable Control (On)

Puts the control into an enabled state.

Disable Control (Off)

Puts the control into a disabled state.

Select Menu (Menu)

Simulates selection of a menu item in the form. You can find the menu item resource IDs using the built in ListMenu action, also available on the Apt menu.

Scroll Up (ScUp)

For scroll controls only: simulates a scroll up action.

Scroll Down (ScDn)

For scroll controls only: simulates a scroll down action.

Special note about popup lists: you can make selections from popup lists with Ctrl:Tap and Nav:Up/Down actions. However, if you don't leave the list via Nav:Centre, your device will probably crash.

Field Action Category

Fields are the controls which are editable, you can put a cursor on them and write letters or digits.

The field category actions take a resource ID, just like the Control actions. You can find out field resource IDs via ListFields in the AptMenu. If you don't specify an ID, the field with focus or, failing that, the first one found, will be used.

Enter

Puts a cursor in the specified field to begin editing.

Copy

Copies the currently selected text in the specified field into the Clipboard so you can paste it elsewhere later.

Cut

Cuts the currently selected text in the specified field into the Clipboard so you can paste it elsewhere later. The text is removed from the original field.

Paste (Pste)

Pastes previously copied text on the Clipboard into the specified field.

Start of Field (Strt)

Moves the cursor to the start of the specified field.

End of Field (End)

Moves the cursor to the end of the specified field.

Select Whole Field (Sel)

Selects all the text in the specified field.

Toggle Editable (Edit~)

Toggle whether the field is editable or not. Warning: the purpose of this is to enable highlighting for a non-editable field. If you actually edit the field when it was not originally editable there's a good chance you'll get a crash.

Toggle Underline (Line~)

Toggle whether the field is displayed underlined or not.

Remove Focus (Exit)

It's a good idea to remove focus after making a field editable, to avoid changing it by accident.

5-Way Navigation Action Category (Nav)

Left, Right, Up, Down, Centre

These actions simulate one or more presses of the relevant 5-way navigator buttons.

Warning: these simulated presses also potentially act as triggers for Apt's actions (could be useful for some things), so you can get in an infinite loop if not careful. If x is not specified, it's assumed to be 1.

Hard Keys Action Category (Hard)

Hard Buttons 1, 2, 3 and 4

Simulate a single press of the relevant hard buttons (see warning above).

Treo-Specific Actions Category (Treo)

Treo Side Keys, and Option+Hard button 1, 2, 3 or 4

Simulate pressing of Treo hard buttons. This should also work on non-Treo devices, perhaps to use software written specifically for Treos

Phone

Toggle phone on/off

Pen Action Category

Tap

Simulate a pen tap on the screen. This does not always have the full effect that an actual pen tap would have. In particular, to activate controls or go to a field, you should use the actions in the Ctrl: or Fld: categories. If that does not succeed, then it's possible that a simulated pen tap will help.
The argument is a coordinate in the form x,y (a single space is also a valid separator). You can use AptMenu:GetPoint in the target app to acquire the coordinate, and then paste it in with Menu->Edit->PastePoint in Apt itself.

Text Entry (Txt)

Simulate entry of specified keyboard/graffiti character string, with a maximum of 4 characters. If you really need to simulate more than 4 at once, you could use a macro sequence. The following 2-character special combinations are possible: \U, \D, \L, \R: move cursor up, down, left, right; \t (tab), \b (backspace), \e (escape), \d (delete) \r (return)

Execute Shortcut Command (CBar)

Brings up the command bar menu (as if a shortcut.gif stroke was done). If an argument is specified, then it is sent to the command bar as a menu shortcut (in other words, as if command-stroke-then-x had been entered).

This is probably the best way to make apps do their work, it works more reliably than acting on controls or sending taps.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License