This is the macro that I am trying to use. It works as an Mcode but not as a macro pump. any ideas?
Private Type SYSTEMTIME
Year As Integer
Month As Integer
Day As Integer
Hour As Integer
Minute As Integer
Second As Integer
Milliseconds As Integer
End Type
Private Declare Sub GetSystemTime Lib "kernel32" (lpSystemTime As SYSTEMTIME)
Public Function GetMySecond() As String
Dim tSystem As SYSTEMTIME
Dim sRet
GetSystemTime tSystem
sRet = Format(tSystem.second, "0000")
GetMySecond = sRet
Open "c:\TESTFILE.txt" For Output As #1 ' Open to write file.
oldX = GetOEMDRO (800)
oldY = GetOEMDRO (801)
oldZ = GetOEMDRO (802)
oldL = GetOEMDRO (816)
Write #1, oldX , oldY, oldZ, oldl
While GetoemLED (999)
newx = GetOEMDRO (800)
newy = GetOEMDRO (801)
newz = GetOEMDRO (802)
newl = GetOEMDRO (816)
If oldX <> newX Or oldY <> newY Or oldZ <> newZ Or oldl <> newl Then
oldX = newX
oldY = newY
oldZ = newZ
oldl = newl
Write #1,"X",oldX , "Y",oldY, "Z", oldZ, "Line",oldl
End If
Wend
Close #1
END Function