cncdrive wrote:Your example simple macro works fine here, I see no problem, it works, it just not doing anything, but if I change it like:
- Code: Select all
if (AS3.Getbutton(20900))
{
MessageBox.Show("pressed");
}
Then is shows the messagebox when the button is pressed.
OK, I maybe didn't explain things very well. Of course I have code in the macroloop, I just put //do stuff above to save typing - my bad.
Anyway using your example: here, if I just press the button whilst gcode is running yes it displays the message box. So far so good.
However if you press YOUR button when gcode is NOT running, yes it still displays the message box but it also generates an error in the status message box which says: "File:/Profiles/<your profile>\M20900.txt Could not read!"
HOWEVER, if you now create an EMPTY M20900.txt and press your button when no gcode is running - you don't get the error message any more. Why? because the system now has something to read i.e. M20900.txt even though its empty and therefore does nothing.
Is it the same on your system?
If so - I'm just asking if there's a more elegant way of suppressing the error message than creating an otherwise useless empty button macro.