Getting ID's of Menus and Controls
Often you will want to manipulate a menu or control and need to find the resource ID with which PalmOS identifies it.
- To find out the resource IDs of buttons you are interested in, you can use the ListCtrl action (from the AptMenu) while in the target or try running the DA (included in the thirdparty/ directory) GetCoords.prc (also possible via AptMenu) and then tap on the control. Thanks to Alexander Pruss for writing GetCoords.prc.
- Alternatively, if you leave the resource ID as zero then Apt will use the object with focus, if it's a ctrl, otherwise the first control of the right type it finds in the form.
- If you have trouble finding the resource ID of a control (some applications do not use the normal palm system) you could also try a simulated pen tap (Pen:Tap) action at the coordinates of the button. Use Apt:GetPoint to get the coordinates and Menu->Edit->PastePoint to paste it into the coordinates field.
- As a final option to activate a control, you could look in the applications menu to see if there is a menu item that has the same effect as the control, and activate that instead (use Apt:ListMenu from the AptMenu).
page revision: 1, last edited: 03 May 2008 15:38