Machsupport Forum
Mach Discussion => FAQs => Topic started by: Joe@Majestic on September 07, 2010, 01:06:56 PM
-
How do you toggle an output?
as it is right now the wiki shows output on/off 4-6 but no ability to toggle them
thank you
~Joe
-
Joe,
One way is to create a VB screen button and paste in the following code ;
If IsOutputActive(OUTPUT5) Then ‘Check to see if its on
DeActivateSignal(OUTPUT5) ‘Its on so turn it off
Else
ActivateSignal(OUTPUT5) ‘Its off so turn it on
End If
Obviously this is for Output #5 change for whichever output you wish to toggle.
Tweakie.
-
I am trying to make this script:
‘ Show the user the state of the Y HOME input
If IsActive(YHOME) Then
MsgBox “Y HOME is active”
Else
MsgBox “Y HOME is inactive”
End If
But when I debugg it and I put the mouse over YHOME to see its value shows YHOME = "5" no matter if is active or inactive always the same then acts as always false the statement.
what wolbe happening here? ???
-
I am trying to make this script:
‘ Show the user the state of the Y HOME input
If IsActive(YHOME) Then
MsgBox “Y HOME is active”
Else
MsgBox “Y HOME is inactive”
End If
But when I debugg it and I put the mouse over YHOME to see its value shows YHOME = "5" no matter if is active or inactive always the same then acts as always false the statement.
what wolbe happening here? ???