While reading the PDF I had come across "GetVar" .I thought I might be able to declare a value and give it an on/off statement.Your codes sweet!!! and a little sexy I'm putting together some pretty cool sound sets for Mach. I'll post them when there ready.

Try to figure out how to call on two states of a button to call on two diffrent wave files.

I got creative and used some of the Display button code, it works but also effects the state of the display screen.Was wondering how a programer would do this Tried a few diffrent ways to go about it, but I'm still learning coding.I tried changing "Boundry" but the code skips over and only plays one of the sound waves for each button state.

I'm getting a pop up screen while Mach3 starts asking for a "OK" "Cancel" screen with Runloop Macro thre...I've installed and reinstalled Mach 3 many times and still get this message.

At first it didn't bother anything till I started to use Macro's and writing some VB script's. Some of my scripts will not respond on the computer with this error, my other computer does not have the error and work no problem.

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

This code will work with the "physical Estop" but is not working with the Mach3 E-stop.So when I engage my physical E-stop I get a sound responce, when I unengaged the sound stops like it should behave, but if the Mach 3 E-stop is still blinking or if I hit the softwear e-stop it will not give a sound responce.

What I think is I'm reaching the OEM code for the physical E-stop but not the virtual one.