Doorgaan naar de website
OCLC Support

AssignMacroToKey

Find the syntax, use, parameters, return values, and an example for the AssignMacroToKey macro command in Connexion client.
Syntax BOOL = CS.AssignMacroToKey (sKeyName, sMacroName, bOverwrite)
Use to Assign a keystroke shortcut to a specified macro.
Parameters
  • For sKeyName, enter a key name enclosed in quotation marks.
  • For sMacroName, enter the name of the macro to which you want to assign the key. Enclose the name in quotation marks. Enter in the following format (do not type the brackets): [macro book name]![macro name]
  • (Optional) For bOverwrite, enter true to override any existing assignment to the key. Otherwise, the new assignment is ignored and the existing assignment is retained.
Return values TRUE if the action is successful, or FALSE if not.
Example Sub Main()

     Dim CS As Object
     Set CS = GetObject(,“Connex.Client”)

     CS.AssignMacroToKey “F10”, “ClientMacros.mbk!Test”, True“
End Sub

What this example does Assigns the F10 key to run a macro named Test in a macro book named ClientMacros (always has the file extension *.mbk). The key assignment overrides any existing assignment for <F10>.