Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: Fiero Addiction on December 10, 2010, 07:10:01 PM
-
I currently use this one line in a macro file to toggle the THC on/off.
DoOEMButton(123) ' toggle THC on/off
This works perfectly. The problem I have is that the program does not know the current state of the THC. So I am trying to make separate THC on and off macros.
' to turn THC on
Cur_THC_status = GetOemLed(24) 'get the state of the THC
If Cur_THC_status = 0 Then ' if the THC is off
DoOEMButton(123) 'push the THC button to toggle it on
End If 'end condition statement
' to turn THC off
Cur_THC_status = GetOemLed(24) 'get the state of the THC
If Cur_THC_status = 1 Then ' if the THC is on
DoOEMButton(123) ' push the THC button to toggle it off
End If 'end condition statement
These do not work and I don't know why. I know very little about scripting. Suggestions would be appreciated.
-
' to turn THC on
' get the state of the THC
If GetOemLed(24) = false Then ' if the THC is off
DoOEMButton(123) 'push the THC button to toggle it on
End If 'end condition statement
' to turn THC off
' get the state of the THC
If GetOemLed(24) = true Then ' if the THC is on
DoOEMButton(123) ' push the THC button to toggle it off
End If 'end condition statement
-
Works great, thank you.