How do I Add a Macro to a Button?

From Catalyst
Revision as of 09:23, 29 September 2010 by Charles Allison (talk | contribs)
Jump to: navigation, search

Summary

This article explains how to add a button to use a macro.

More Information

You can record keystrokes for a task and save them as keystroke macros. See Keyboard Macros for details of how to record them. Once you have a macro recorded and saved, you can add it to a button for simplicity. These buttons are stored in a file called 'Custom.xml'. You can edit this file yourself to add buttons to your chosen areas of the software. To find the file, proceed as follows:

  • In Windows, go to "My Computer" and locate the drive/folder where Platinum is stored.
  • Go into the 'SX' folder.
  • Go into the 'SXHelp' folder.
  • <Right-Click> 'Custom.xml' and select [Copy].
  • Now, select an area of the folder with no files in it, <Right-Click> again and select [Paste]. This creates a backup of 'Custom.xml' in case of editing errors.
  • <Right-Click> 'Custom.xml' and choose [Open With] or just [Open]. Ideally you should open it in a text editor such as Notepad.
  • At the top of the document is a general information section on how to edit the file.
  • Move to the bottom of the document.
  • The easiest way to create a new entry is to copy and paste a section such as the one shown below:
<buttons id="SXPWS07:301">
<button press="A-2" tooltip="Service History" icon="188">Service History</button>
</buttons>
  • Go into Platinum and locate from where your function key is run.
  • Press <F11> and make a note of the program details at the top left hand side of the window. You will need the "SXPZZ99" part of the code and the number after the ":".
  • Go back to the editing window and where you see:
<buttons id="SXPWS07:301">
  • Replace the 'SXPWS07:301' with the programme code and the number from the step above. An example of the new programme code would be 'SXPST08:108'.
  • Next you need to add the macro code and description to the file.

Replace:

<button press="A-2" tooltip="Service History" icon="188">Service History</button>

with the appropriate macro code and description, for example:

<button press="A-3" tooltip="Part History" icon="23">Part History</button>
The number above after 'icon' in quotes can be anything from 1 to 220. This is the image that will appear on the button. Experiment until you find one suitable.
  • Now save 'Custom.xml'
  • Log back into Platinum and locate from where you want to run your macro. Your newly created icon should appear!