VCGetFunkeyCmdStringByName
VCSetFunkeyCmdStringByName


Version:

5.0

Description:

Set the script assigned to a specified key name.

Declaration:

 

C/C++

extern "C" short WINAPI VCGetFunkeyCmdStringByName(char* szCmd, char* szKeyName);
extern "C" vbool WINAPI VCSetFunkeyCmdStringByName(char* szCmd, char* szKeyName);

Delphi

function VCGetFunkeyCmdStringByName (szCmd: PAnsiChar; szKeyName: PAnsiChar): Smallint; stdcall;
function VCSetFunkeyCmdStringByName (szCmd: PAnsiChar; szKeyName: PAnsiChar); Smallint; stdcall;

ActiveX/COM

Function GetFunkeyCmdStringByName(ByVal szKeyName As String) As String
Function SetFunkeyCmdStringByName(ByVal szCmd As String, ByVal szKeyName As String) As Integer

Parameters:

szCmd - the script command.
szKeyName
- the name of the key.

Return Value:

VCGetFunkeyCmdStringByName returns the length of the script command or 0 if the szKeyName is invalid or no script is assigned.
VCSetFunkeyCmdStringByName returns 1 on success or 0 on failure (szKeyName is invalid).

iError Code:

None.

Notes:

The tool ScriptAssign(AS) allows the user to assign scripts to various keys as a shortcut to running those scripts.  VCGetFunkeyCmdStringByName and VCSetFunkeyCmdStringByName retrieve or set those assigned scripts.  For a reference to which keys are available to use in VCGetFunkeyCmdStringByName and VCSetFunkeyCmdStringByName, refer to the "Assign to key" dropdown list of the Assign Script dialog.  Also, the scripts may be retrieved or set by reference to their key codes, rather than their key names, by using VCGetFunkeyCmdString and VCSetFunkeyCmdString.

See Also:

VCGetFunkeyCmdString, VCSetFunkeyCmdString, VCRunFunkeyCmdByName, VCIsScriptAssigned, VCMacro