How do I Add a Macro to a Button?

From Catalyst
Revision as of 11:44, 20 August 2010 by Tim Laundon (talk | contribs)
Jump to: navigation, search

Summary

In Platinum, there is the ability to record keystrokes and save them as a Macro. See Keyboard Macros for details how to record them. Once you have a macro recorded and saved, you can add it to a button, rather than having to use function keys. The following article explains how to do this.

More Information

First of all you need to locate a Platinum file called 'Custom.xml'

  • In Windows, go to "My Computer" and locate the drive/folder that Platinum is stored on.
  • Get into the 'SX' folder.
  • Get into the 'SXHelp' folder.
  • Locate 'Custom.xml', <Right-Click> it and select 'copy'.
  • Now, select an area the directory with no files in it and <Right-Click> again and select 'paste'. This has created a backup of 'Custom.xml' in case of errors editing.
  • You now need to open up 'Custom.xml' into a text editor.
  • At the top of the document is a general information section on how to edit the file.
  • Scroll your way down to the bottom of the document.
  • The quickest was is to copy and paste the section shown below.

eg:

<buttons id="SXPWS07:301">
<button press="A-2" tooltip="Service History" icon="188">Service History</button>
</buttons>
  • Now flick back in Platinum and locate where your macro is run from.
  • Press <F11> and make a note of the program number in the top left hand side of the window that opens up. You will need everything from the "SX" part to the number after the ":"
  • Flick back to the editing window and where you see:
<buttons id="SXPWS07:301">
  • replace that with the line noted in the step above.
  • 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 code and description.

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 where you want to run your macro from. Your newly created icon should appear!