var resultCode

//Этот функционал предназначен только для подразделений банка и не поддерживается в версиях для ТСТ

oleObject = new ActiveXObject("SBRFSRV.Server")
ws = WScript.CreateObject('WScript.Shell')

oleObject.clear()
resultCode = oleObject.NFun(5002)
var card = oleObject.GParamString("ClientCard")

ws.Popup("Only card " + card + " will be accepted.")

oleObject.clear()
oleObject.SParam("Amount", 1000)
oleObject.SParam("ExpectedCard", card)
resultCode = oleObject.NFun(4004)

if(resultCode == 0) {
  showTextInNotepad(oleObject.GParamString("Cheque")) 
}
else
  ws.Popup("Result:" + resultCode)

oleObject.clear()

function showTextInNotepad(text)
{
  filename = (new Date()).valueOf() + "upos_check.txt"
  fso = WScript.CreateObject('Scripting.FileSystemObject')
  file = fso.CreateTextFile(filename)
  file.Write(text)
  file.Close()
  WScript.CreateObject('WScript.Shell').Run("notepad " + filename)
  WScript.Sleep(2000)
  fso.DeleteFile(filename)
}