1
Mach4 General Discussion / Mach4 license verification check from LUA
« on: March 19, 2023, 03:47:11 AM »
Hi, I'm trying to figure out what the parameters are for the mcCntlCheckLicenseFeature LUA function.
e.g. "requirement" and "feature".
What I'm trying to achieve is a check at startup (in my custom LUA code) to warn me (big nasty popup window) if I'm running under a demo license (or not if its a full (Hobby in my case) license).
The API reference does not give me too many clues on this, but of the 3 API functions that have "License" in their name, that one seems the most likely candidate.
Why?
After a Windows (10) update that I think ran on my PC a few weeks ago, when I was using my CNC yesterday (running the 1st job on it for the weekend), it stopped half way through. I figured out that Mach was in Demo mode. So I got the PCID, downloaded the license file from the web site and pressed on.
When I was shutting down the PC at the end of the day, Windows wanted to do an update (apply one), so I selected install/apply and shut down and went inside from the shed and didn't think about it again.
The next day (today), I got half way through my 1st CNC job and it paused again! AHHH! It was in Demo mode. It looks like the PCID had changed again after the update. So easily fixed with a new download from the mach website, but certainly irritating. I'd like to avoid that with a simple LUA script that warns at startup if Mach4 is in Demo mode. The title bar is just too easy to miss!
Cheers,
Michael.
e.g. "requirement" and "feature".
What I'm trying to achieve is a check at startup (in my custom LUA code) to warn me (big nasty popup window) if I'm running under a demo license (or not if its a full (Hobby in my case) license).
The API reference does not give me too many clues on this, but of the 3 API functions that have "License" in their name, that one seems the most likely candidate.
Why?
After a Windows (10) update that I think ran on my PC a few weeks ago, when I was using my CNC yesterday (running the 1st job on it for the weekend), it stopped half way through. I figured out that Mach was in Demo mode. So I got the PCID, downloaded the license file from the web site and pressed on.
When I was shutting down the PC at the end of the day, Windows wanted to do an update (apply one), so I selected install/apply and shut down and went inside from the shed and didn't think about it again.
The next day (today), I got half way through my 1st CNC job and it paused again! AHHH! It was in Demo mode. It looks like the PCID had changed again after the update. So easily fixed with a new download from the mach website, but certainly irritating. I'd like to avoid that with a simple LUA script that warns at startup if Mach4 is in Demo mode. The title bar is just too easy to miss!
Cheers,
Michael.