VCRunFunkeyCmd


Version:

5.0

Description:

Run the script assigned to a specified key.

Declaration:

 

C/C++

extern "C" vbool WINAPI VCRunFunkeyCmd(short* iError, short iShift, short iKey)

Delphi

function VCRunFunkeyCmd (var iError: Smallint; iShift: Smallint; iKey: Smallint): Wordbool; stdcall;

ActiveX/COM

Function RunFunkeyCmd(ByVal iShift As Integer, ByVal iKey As Integer) As Integer

Parameters:

iShift - the state of the shift and control keys associated with the key:
0 - no shift or control
1 - shift only
2 - control only
iKey
- code to specify the key:
2-16 - button numbers 2-16, respectively
48-57 - ASCII code for numeric keys '0'-'9', respectively
65-90 - ASCII code for alphabetic keys 'A'-'Z', respectively
112-123 - virtual key code for function keys F1-F12, respectively

Return Value:

0 - no script was assigned to the specified key
1 - the assigned script was run

iError Code:

0 - Success
1 - Invalid world

Notes:

The tool ScriptAssign(AS) allows the user to assign scripts to various keys as a shortcut to running those scripts.  VCRunFunkeyCmd runs those assigned scripts.  For a reference to which keys are available to use in VCRunFunkeyCmd, refer to the "Assign to key" dropdown list of the Assign Script dialog.  Also, the scripts may be run by direct reference to their names, rather than their key codes, by using VCRunFunkeyCmdByName.  This function is a replacement for VCButton and it is recommended that all future code use VCRunFunkeyCmd or VCRunFunkeyCmdByName instead.

See Also:

VCRunFunkeyCmdByName, VCIsScriptAssigned, VCGetFunkeyCmdString, VCSetFunkeyCmdString, VCButton