Difference between revisions of "How do I Add a Macro to a Button?"

From Catalyst
Jump to: navigation, search
m
Line 1: Line 1:
{{Update}}  
+
{{Review}}
 
== Summary ==
 
== Summary ==
 
This article explains how to add a button to use a macro.
 
This article explains how to add a button to use a macro.
  
 
== More Information ==
 
== 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.
+
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 {{FilePath|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 {{FilePath|SX}} folder.
 
*Go into the {{FilePath|SXHelp}} folder.
 
*{{KeyPress|Right-Click}} {{FilePath|Custom.xml}} and select {{Button|Copy}}.
 
*Now, select an area of the folder with no files in it, {{KeyPress|Right-Click}} again and select {{Button|Paste}}. This creates a backup of {{FilePath|Custom.xml}} in case of editing errors.
 
*{{KeyPress|Right-Click}} {{FilePath|Custom.xml}} and choose {{Button|Open With}} or just {{Button|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:
 
  
<pre>
+
=== Creating a New Button ===
<buttons id="SXPWS07:301">
+
At the end of recording your macro you will be asked if you wish to create a button. Choose {{Button|Yes}} at this prompt.
<button press="A-2" tooltip="Service History" icon="188">Service History</button>
 
</buttons>
 
</pre>
 
  
*Go into Platinum and locate from where your function key is run.
+
{{Information|text=If you select {{Button|No}} by mistake follow [[#Creating a Button Retrospectively|these]] instructions.}}
*Press {{KeyPress|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:
 
  
<pre>
+
* The system will default to linking this button to your user code only. To give all users the ability to use this button blank out the {{DataPrompt|User}} box.
<buttons id="SXPWS07:301">
 
</pre>
 
  
*Replace the {{DataValue|SXPWS07:301}} with the programme code and the number from the step above. An example of the new programme code would be {{DataValue|SXPST08:108}}.
+
{{Note|text=You will also need to make sure you have given all users access to the macro too or the button will not work for them!}}
*Next you need to add the macro code and description to the file.
 
  
Replace:
+
* If necessary enter a {{DataPrompt|Site}} to link this button to. Press {{KeyPress|C+F1}} to search for a Site code. You may leave this field blank.
<pre>
+
* A default icon will be displayed. To select a different icon click {{Button|Search}}.
<button press="A-2" tooltip="Service History" icon="188">Service History</button>
+
* Choose an icon from those displayed by clicking on it.
</pre>
+
* If you want to enter a text prompt you have up to 20 characters. If you leave this blank the system will display the Macro Name when you hover your cursor over the button.
 +
* If you want a divider to appear before the button choose {{DataValue|Yes}} at the {{DataPrompt|Divider}} prompt. A dividing line will appear before this button to separate it from the buttons and options already on the bar at the top of your screen.
 +
* Click {{Button|Done}} and Accept your new button.
  
with the appropriate macro code and description, for example:
+
=== Creating a Button Retrospectively ===
  
<pre>
+
* Go into Platinum and onto the field you want to link the button to i.e. the field your macro starts from.
<button press="A-3" tooltip="Part History" icon="23">Part History</button>
+
* Press {{KeyPress|F12}} to view the Functions available from that field.
</pre>
+
* Click {{Button|Custom}}.
 +
{{Note|text=If you have already created buttons for this program and/or User you will need to click {{Button|Add}} to create a new button.}}
 +
* The system will default to linking this button to your user code only. To give all users the ability to use this button blank out the {{DataPrompt|User}} box.
 +
* If necessary enter a {{DataPrompt|Site}} to link this button to. Buttons linked to all Users will be restricted to those at the specified site. Press {{KeyPress|C+F1}} to search for a Site code. You may leave this field blank.
 +
* Click {{Button|Select Function}}.
 +
* Highlight the relevant function and click {{Button|Choose}}.
  
{{Note|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.}}
+
{{Note|text=Macros will be those starting ''A-''.}}
 +
 
 +
* A default icon will be displayed. To select a different icon click {{Button|Search}}.
 +
* Choose an icon from those displayed by clicking on it.
 +
* If you want to enter a text prompt you have up to 20 characters. If you leave this blank the system will display the macro name when you hover your cursor over the button.
 +
* If you want a divider to appear before the button choose {{DataValue|Yes}} at the {{DataPrompt|Divider}} prompt. A dividing line will appear before this button to separate it from the buttons and options already on the bar at the top of your screen.
 +
* Click {{Button|Done}} and Accept your new button.
 +
 
 +
=== Editing an Existing Button ===
 +
To edit existing buttons go to {{Menu|Systems|{{RP}}|Maintenance Options|Add or Edit Custom Buttons}}.
 +
** To narrow the search you can specify any of the ranges or simply click {{Button|Search}}.
 +
** {{DataPrompt|Program}} : If you know the program your button is linked to you may enter it here or press {{KeyPress|C+F1}} to select from a list of programs.
 +
** {{DataPrompt|User}} : If you know the specific user a button is linked to you may enter their User Code or press {{KeyPress|C+F1}} to select from a list of users. If a button has been linked to all users you should leave this field blank.
 +
** {{DataPrompt|Site}} : If you know the specific site a button is linked to you may enter the Site Code or press {{KeyPress|C+F1}} to select from a list of sites. If a button has not been linked to a specific site you should leave this field blank.
 +
** {{DataPrompt|Filter on}} : You may enter the name or part of the name of a button to find it. You may leave this field blank.
 +
* Highlight the button to edit and click {{Button|Edit}}.
 +
* Make your changes e.g. to alter the Icon used or change the Text displayed then click {{Button|Done}} and {{Button|Accept}} to save your changes.
 +
 
 +
{{Information|text=Alternatively you may press {{KeyPress|F12}} from any field where the Functions menu is available.
 +
* Click {{Button|Custom}}.
 +
* If the option to add a new button pops up click {{Button|Exit}}.
 +
* Follow the instructions above to search for and edit your chosen button.}}
 +
 
 +
=== Removing an Existing Button ===
 +
To edit remove a button go to {{Menu|Systems|{{RP}}|Maintenance Options|Add or Edit Custom Buttons}}.
 +
** To narrow the search you can specify any of the ranges or simply click {{Button|Search}}.
 +
** {{DataPrompt|Program}} : If you know the program your button is linked to you may enter it here or press {{KeyPress|C+F1}} to select from a list of programs.
 +
** {{DataPrompt|User}} : If you know the specific user a button is linked to you may enter their User Code or press {{KeyPress|C+F1}} to select from a list of users. If a button has been linked to all users you should leave this field blank.
 +
** {{DataPrompt|Site}} : If you know the specific site a button is linked to you may enter the Site Code or press {{KeyPress|C+F1}} to select from a list of sites. If a button has not been linked to a specific site you should leave this field blank.
 +
** {{DataPrompt|Filter on}} : You may enter the name or part of the name of a button to find it. You may leave this field blank.
 +
* Highlight the button to delete and click {{Button|Remove}}.
 +
* Click {{Button|Yes}} to remove the button.
 +
 
 +
{{Information|text=Alternatively you may press {{KeyPress|F12}} from any field where the Functions menu is available.
 +
* Click {{Button|Custom}}.
 +
* If the option to add a new button pops up click {{Button|Exit}}.
 +
* Follow the instructions above to search for and remove your chosen button.}}
  
{{Warning|You must be very accurate in how you enter the new details - you MUST follow the pattern exactly. If you do not, then you will cause all your buttons from the system to disappear until you fix the problem.}}
 
  
*Now save {{FilePath|Custom.xml}}
 
*Log back into Platinum and locate from where you want to run your macro.  Your newly created icon should appear!
 
  
 
== See also ==
 
== See also ==
Line 57: Line 78:
 
* [[Keyboard Macros]]
 
* [[Keyboard Macros]]
  
{{KB_Tags|macro button, macro, shortcut}}{{ZN_Admin}}{{Guide}}
+
{{KB_Tags|macro button, macro, shortcut, custom button}}{{ZN_Admin}}{{Guide}}
 
{{KB_Ref|RP43}}
 
{{KB_Ref|RP43}}

Revision as of 10:46, 18 July 2016

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.

Creating a New Button

At the end of recording your macro you will be asked if you wish to create a button. Choose [Yes] at this prompt.

If you select [No] by mistake follow these instructions.
  • The system will default to linking this button to your user code only. To give all users the ability to use this button blank out the "User" box.
You will also need to make sure you have given all users access to the macro too or the button will not work for them!
  • If necessary enter a "Site" to link this button to. Press <C+F1> to search for a Site code. You may leave this field blank.
  • A default icon will be displayed. To select a different icon click [Search].
  • Choose an icon from those displayed by clicking on it.
  • If you want to enter a text prompt you have up to 20 characters. If you leave this blank the system will display the Macro Name when you hover your cursor over the button.
  • If you want a divider to appear before the button choose 'Yes' at the "Divider" prompt. A dividing line will appear before this button to separate it from the buttons and options already on the bar at the top of your screen.
  • Click [Done] and Accept your new button.

Creating a Button Retrospectively

  • Go into Platinum and onto the field you want to link the button to i.e. the field your macro starts from.
  • Press <F12> to view the Functions available from that field.
  • Click [Custom].
If you have already created buttons for this program and/or User you will need to click [Add] to create a new button.
  • The system will default to linking this button to your user code only. To give all users the ability to use this button blank out the "User" box.
  • If necessary enter a "Site" to link this button to. Buttons linked to all Users will be restricted to those at the specified site. Press <C+F1> to search for a Site code. You may leave this field blank.
  • Click [Select Function].
  • Highlight the relevant function and click [Choose].
Macros will be those starting A-.
  • A default icon will be displayed. To select a different icon click [Search].
  • Choose an icon from those displayed by clicking on it.
  • If you want to enter a text prompt you have up to 20 characters. If you leave this blank the system will display the macro name when you hover your cursor over the button.
  • If you want a divider to appear before the button choose 'Yes' at the "Divider" prompt. A dividing line will appear before this button to separate it from the buttons and options already on the bar at the top of your screen.
  • Click [Done] and Accept your new button.

Editing an Existing Button

To edit existing buttons go to " Systems Reports & Settings Maintenance Options Add or Edit Custom Buttons".

    • To narrow the search you can specify any of the ranges or simply click [Search].
    • "Program" : If you know the program your button is linked to you may enter it here or press <C+F1> to select from a list of programs.
    • "User" : If you know the specific user a button is linked to you may enter their User Code or press <C+F1> to select from a list of users. If a button has been linked to all users you should leave this field blank.
    • "Site" : If you know the specific site a button is linked to you may enter the Site Code or press <C+F1> to select from a list of sites. If a button has not been linked to a specific site you should leave this field blank.
    • "Filter on" : You may enter the name or part of the name of a button to find it. You may leave this field blank.
  • Highlight the button to edit and click [Edit].
  • Make your changes e.g. to alter the Icon used or change the Text displayed then click [Done] and [Accept] to save your changes.
Alternatively you may press <F12> from any field where the Functions menu is available.
  • Click [Custom].
  • If the option to add a new button pops up click [Exit].
  • Follow the instructions above to search for and edit your chosen button.

Removing an Existing Button

To edit remove a button go to " Systems Reports & Settings Maintenance Options Add or Edit Custom Buttons".

    • To narrow the search you can specify any of the ranges or simply click [Search].
    • "Program" : If you know the program your button is linked to you may enter it here or press <C+F1> to select from a list of programs.
    • "User" : If you know the specific user a button is linked to you may enter their User Code or press <C+F1> to select from a list of users. If a button has been linked to all users you should leave this field blank.
    • "Site" : If you know the specific site a button is linked to you may enter the Site Code or press <C+F1> to select from a list of sites. If a button has not been linked to a specific site you should leave this field blank.
    • "Filter on" : You may enter the name or part of the name of a button to find it. You may leave this field blank.
  • Highlight the button to delete and click [Remove].
  • Click [Yes] to remove the button.
Alternatively you may press <F12> from any field where the Functions menu is available.
  • Click [Custom].
  • If the option to add a new button pops up click [Exit].
  • Follow the instructions above to search for and remove your chosen button.


See also


Feedback
Thank you for using our Knowledge Base, we value your feedback. Did you find this article useful? 'Yes' or 'No'
Keywords AND Misspellings
macro button, macro, shortcut, custom button
Tags

RP43