Sorry i missed the End sub... It is hard to go from C++ to VB
I know this is not as simple as you would like but this gives you the most power...
Sub Main()
if (GetLED(4)) Then'This is where the Macro is told not to run if there is a job running
MsgBox("Could Not load there is a Job running")
Exit Sub
End if
'TODO add Macro code here
End Sub
Main
Tried this method, works the same way the IF THEN ELSE method i tried earlier, if you press it two times fast, it runs 2 times, if you press it 3 times fast it runs two times and the third displays the message box.
BTW, i tried it with the ISMoving command because my script does not load a file and run it, and my screen does not have a led 4. might this be the problem...
Im starting to think about a workaround, have a led light up at the begining of my script, and turn off at the end, and check for that lead instead.
Regards
Fernando