Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: Bodini on March 13, 2008, 12:05:19 AM

Title: Advice for writing a macro with SystemWaitFor (Start)
Post by: Bodini on March 13, 2008, 12:05:19 AM
A word to newer macro writers (like myself)...

if you're going to use
Code: [Select]
SystemWaitFor (Start)
consider starting the macro with
Code: [Select]
dooembutton (169) 'close current file
and ending the macro with
Code: [Select]
dooembutton (170) 'open last file
This will close the current gcode file when the macro starts, and reload it when the macro ends.  This will keep you from starting the gcode program in the middle of the macro, when you press Start... NOT pretty.   :o

-Nick

ps- of course, you wouldnt want to use this in a macro that you call inside of a gcode routine as the macro is 'in focus'.