71
Mach4 General Discussion / Re: FRO not functioning at very beginning of routine?
« on: March 26, 2022, 07:57:56 AM »
FRO won’t change G0 moves, you will need to use rapid rate override for that
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
scr.GetActiveWindowText()
local windowText = scr.GetActiveWindowText() --Get the window title text
local find = string.find(windowText, "Mach 4") --Search for "Mach 4" in the window title.
local hKeyboardOutput = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT1)
local keyboardOutputState = mc.mcSignalGetState(hKeyboardOutput)
if find ~= nil then
--"Mach 4" was found i.e. Window is active
if (keyboardOutputState == mc.MC_OFF) then --Only turn on the output if it is off
mc.mcSignalSetState(hKeyboardOutput, mc.MC_ON)
end
else
--"Mach 4" was not found i.e. window minimised or lost focus
if (keyboardOutputState == mc.MC_ON) then--Only turn off the output if it is on
mc.mcSignalSetState(hKeyboardOutput, mc.MC_OFF)
end
end