VCRunFunkeyCmdByName


Version:

5.0

Description:

Run the script assigned to a specified key name.

Declaration:

 

C/C++

extern "C" vbool WINAPI VCRunFunkeyCmdByName(short* iError, char* szKeyName)

Delphi

function VCRunFunkeyCmdByName (var iError: Smallint; szKeyName: PAnsiChar): Wordbool; stdcall;

ActiveX/COM

Function RunFunkeyCmdByName(ByVal szKeyName As String) As Integer

Parameters:

szKeyName - the name of the key.

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.  VCRunFunkeyCmdByName runs those assigned scripts.  For a reference to which keys are available to use in VCRunFunkeyCmdByName, refer to the "Assign to key" dropdown list of the Assign Script dialog.  Also, the scripts may be run by reference to their key codes, rather than their key names, by using VCRunFunkeyCmd.  This function is a replacement for VCButton and it is recommended that all future code use VCRunFunkeyCmd or VCRunFunkeyCmdByName instead.

See Also:

VCRunFunkeyCmd, VCIsScriptAssignedByName, VCGetFunkeyCmdStringByName, VCSetFunkeyCmdStringByName, VCButton