Thank you to Brian Baker,Graham Waterworth and Liquidseek.com for your your help and codes.
I think I got it now.
I would have been done a few hours ago but I found that my Mach 3 install is a little bit off. I'm getting a "Run loop Macro the.." with a "OK" or "Cancel" prompt that was effecting the way Mach 3 is handling the code.
Since this was giving me problems the "getLED(0) and some other codes where not working properly.
Tried the code on my machine computer and works flawlessly. Let me know if you have any problems.
Any suggestion on the Mach 3 problem I'm having, I've reinstalled but the same screen keeps popping up before Mach starts?
One more quick question can we have a wave file play when Mach starts and ends?
Thanks for your Patience and talents
Here is the final code:
Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
If GetLED (0) Then
If GetLed (19) Then
or download the .M1s: