Changes

CONTROLS/Macros

582 bytes added, 18:55, 4 September 2018
no edit summary
{{Migrated|printer-controls/macros}}
__NOTOC__{{DISPLAYTITLE:Macros}}Macros are snippets of saved code which can be called with the click of a button instead of having to be typed repeatedly.
Optional parameter variables (content must be in quotes):
{| class="wikitable"*|-! Parameter || Description || Example|-| title: [main || Main text to show] || <pre>title:"Trim Filament"</pre>*image|-| markdown || The contents of the message in Markdown formatted text. May contain images from the internet. Use <br> for line breaks || <pre>markdown: [a url "Trim the end of the image you wish filament to showensure a good load.<br>![](https://www.matterhackers.com/r/c3zLyf)<br>Make sure you trim it at a slight angle."</pre>*|-| wait_ok: [script || Script execution will wait for the user to click 'okContinue']|| <pre>wait_ok:"true"</pre>*|-| repeat_gcode: [gcode || G-Code to repeat until expire time reached (separate lines . Lines can be separated with a <nowiki>|)]</nowiki>. || <pre>repeat_gcode:"G1 E.1 F150|G4 P10"</pre>*|-| expire: [the || The max amount of time to run repeate_gcode or show this message](seconds) || <pre>expire:"300"</pre>*|-| count_down: [show || Show a timer counting down from this time]|| <pre>count_down:"28"</pre>|}
<code>choose_material</code>
Optional parameter variables (content must be in quotes):
*title: [main text to show]
=== Example Script ===
The following box shows is an example of a script used for loading filament:
<pre>; host.choose_material(title:"Choose the material that you are loading.")