Task macro

From Axaptapedia

The Task macro lists some of the possibilites for the task Id as passed to the Task method on a FormRun object. The task method is called whenever certain actions take place on a form. These are generally related to keypresses, or record operations.

You can override the task() method on a form (element level) or for a global hook, add code to the existing override on the SysSetupFormRun class.

public int task(int _taskId)
{
    int ret;
 
    // Add your code here
 
    ret = super(_taskId);
 
    return ret;
}

The macro values listed are as follow:

// Task-ID values, to be used with formControl's
// return value from the method task()
//--------------------------------------------------------
 
#define.taskF1(257)
#define.taskEnter(288)
#define.taskShiftEnter(307)
#define.taskNew(260)
 
#define.taskShortCutMenuKey(519)
#define.taskAlt(520)
 
#define.taskArrowUp(1281)
#define.taskArrowDown(1282)
#define.taskArrowLeft(1283)
#define.taskArrowRight(1284)
 
// PgUp and PgDn are the numerical keyboard page up and page down commands.
#define.taskPgUp(1285)
#define.taskPgDn(1286)
 
#define.taskNextRecord(2817)
#define.taskPrevRecord(2818)
 
#define.taskDeleteRecord(2832)
 
#define.taskPageDown(2819)
#define.taskPageUp(2820)
 
#define.taskTab(2827)
 
#define.taskShortCutMenuFilter(2844)
#define.taskShortCutMenuFind(799)
#define.taskFilter(2837)