<script LANGUAGE="VBScript">
Sub window_onLoad()
'MSR1.Open "NCRMSR.2"
MSR1.Open "NCR5945.MSR"
MSR1.Claim 0
MSR1.DeviceEnabled = True
MSR1.DataEventEnabled = True
MSR1.DecodeData = True
ClickSnd.FileName = "media/wav/BttnValid.wav"
end sub
Sub window_onUnload()
MSR1.Close
end sub
dim MSRFunction
MSRFunction = "SwipeCard()"
Sub MSR1_DataEvent(Status)
alert("entro MSR1_DataEvent")
MSR1.DataEventEnabled = TRUE
window.setTimeout MSRFunction, 100, "VBSCRIPT"
if ClickSnd.ReadyState = 4 then
ClickSnd.Run
end if
end sub
sub SetMSRFunction( fun )
alert("entro fun")
MSRFunction = fun
end sub
sub RestoreMSRFunction
alert("entro Restore")
MSRFunction = "SwipeCard()"
end sub
Sub SwipeCard()
alert("entro swipe")
SwipeData = MSR1.Track2Data
'SwipeData = Right( SwipeData, 6 )
alert( SwipeData )
End Sub
</SCRIPT>