Hello Guest it is December 15, 2019, 09:06:58 AM

Author Topic: Mach3: How to Activate/deactivate a button in a macro  (Read 1211 times)

0 Members and 1 Guest are viewing this topic.

Mach3: How to Activate/deactivate a button in a macro
« 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
Re: Mach3: How to grey out a button in a macro
« Reply #1 on: September 22, 2017, 04:01:55 PM »
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

Offline ger21

*
  • *
  •  6,291 6,291
    • View Profile
    • The CNC Woodworker
Re: Mach3: How to Activate/deactivate a button in a macro
« Reply #2 on: September 22, 2017, 09:11:07 PM »
No, I don't believe so.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Mach3: How to Activate/deactivate a button in a macro
« Reply #3 on: September 22, 2017, 09:23:00 PM »
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
My wife left with my best friend...
     and I miss him!
Re: Mach3: How to Activate/deactivate a button in a macro
« Reply #4 on: September 22, 2017, 11:04:03 PM »
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
Re: Mach3: How to Activate/deactivate a button in a macro
« Reply #5 on: September 23, 2017, 06:26:42 AM »
Hi

I've added a sample (ToggleButtonColor) on my website, which changes the color of a button, depending on the toggle state.

Klaus
The brain isn't a soap, it doesn't shrink when used.
Re: Mach3: How to Activate/deactivate a button in a macro
« Reply #6 on: September 23, 2017, 03:24:09 PM »
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
Re: Mach3: How to Activate/deactivate a button in a macro
« Reply #7 on: September 23, 2017, 05:39:05 PM »
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


« Last Edit: September 23, 2017, 05:51:44 PM by Klaus1311 »
The brain isn't a soap, it doesn't shrink when used.
Re: Mach3: How to Activate/deactivate a button in a macro
« Reply #8 on: September 24, 2017, 01:49:14 AM »
Bingo, that does it.
I had forgotten that a macro could be executed when mach3 starts.
Thanks,
Gaston