Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: ggagnon on September 19, 2017, 09:41:46 PM
-
Mach3:
Is there a way or a function to enable/block a button programmatically in a macro so it is not clikable?
Thanks,
Gaston
-
I will try to make my question a little clearer.
Mach3:
Is there a way to grey out / un grey out a button within a macro depending whether certain conditions a met or not?
Thanks,
Gaston
-
No, I don't believe so.
-
Hi,
I think you can do that with LUA in Mach4...I'm not familiar enuf with VB in Mach3 to comment, ger21 thinks not and he really knows hi stuff.
Craig
-
I use MachScreen for screen editor and I did not find a greyed as initial state for new button so I kind of expected that it would not be possible.
Thanks Gerry and Craig for taking the time to answer.
Gaston
-
Hi
I've added a sample (ToggleButtonColor) on my website, which changes the color of a button, depending on the toggle state.
Klaus
-
Thanks Klaus,
That will solve my problem,
Two questions:
How to assure the led is off when Mach3 starts?
Is there a way to prevent Machscreen's editor from inserting tabs automatically?
Gaston
-
Hi Gaston
- you could create a macro e. g. m800.m1s containing:
setuserled(1200,0)
and put that macro to your init string in general config.
- I'm not sure, this helps, but tab value can be set in Options -> Settings -> Editor Settings -> Tabulator.
Klaus
-
Bingo, that does it.
I had forgotten that a macro could be executed when mach3 starts.
Thanks,
Gaston