Dim objFR
Set objFR = CreateObject("lnrfrcomax.AxFrWrapper")

objFR.portName = "COM4"

v = ""
r = objFR.getVersion(v)

Wscript.Echo v
Wscript.Echo objFR.libVersion

Dim md
Set md = CreateObject("lnrfrcomax.ModelData")

r = objFR.getSerial(md)

Wscript.Echo md.serial + " " + md.modelName

Dim frSt
Set frSt = CreateObject("lnrfrcomax.FrStatus")


r = objFR.getFrStatus(frSt)


Wscript.Echo frSt.flags

Dim cycleSt
Set cycleSt = CreateObject("lnrfrcomax.CycleStatus")


r = objFR.getCycleStatus(CycleSt)


Wscript.Echo cycleSt.descr


Dim regData
Set regData = CreateObject("lnrfrcomax.RegData")

r = objFR.readCurrentRegData(regData)

Wscript.Echo regData.descr
Wscript.Echo regData.orgName


Dim regC
Set regC = CreateObject("lnrfrcomax.Counters")

r = objFR.getCycleCounters(regC)

Wscript.Echo regC.saleCounters.cash

objFR.cashierNumber=20
objFR.cashierPassword=20
docType = 0
recType = 0
receipt = 0
operations = 0
amount = 0
change = 0
objFR.getOpenedDocData docType, recType, receipt, operations, amount
Wscript.Echo objFR.lastCommandError
objFR.cancelDoc


cycle = 0
fd = 0 
fiscCode = 0
cash = 0
Dim dt
dt = #23/10/13 18:59:33#
rem objFR.completePayout 736862, cycle, fd, fiscCode, dt, cash

rem Wscript.Echo objFR.lastCommandError

rem objFR.startCycleClosing "Иванова Степанида Поликарповна"
rem objFR.completeCycleClosing cycle, fd, fiscCode, dt

objFR.startCycleOpening "Иванова Степанида Поликарповна"
objFR.completeCycleOpening cycle, fd, fiscCode, dt
Wscript.Echo objFR.lastCommandError
Wscript.Sleep 5000
rem 
objFR.startReceipt 0,  "Иванова Степанида Поликарповна"
Wscript.Echo objFR.lastCommandError
objFr.printLine 0, 0, 0, 0, "Тестовая строка"
rem 
Dim op
Set op = CreateObject("lnrfrcomax.ReceiptOperation")
op.name = "Попловок"
op.section = 1
op.taxNumber = 1
op.price = 10000
op.quantityStr = "1.000000"
objFR.addReceiptOperation op 
Wscript.Echo objFR.lastCommandError
rem 
objFR.completeReceipt 100000, 0, cycle, fd, fiscCode, receipt, dt, amount, change
Wscript.Echo objFR.lastCommandError
Wscript.Sleep 5000

objFR.startPayout "Иванова Степанида Поликарповна"
Wscript.Echo objFR.lastCommandError
objFR.completePayout 10000, cycle, fd, fiscCode, dt, cash
Wscript.Echo objFR.lastCommandError
Wscript.Sleep 5000

objFR.startCycleClosing " "
Wscript.Echo objFR.lastCommandError
objFR.completeCycleClosing cycle, fd, fiscCode, dt

Wscript.Sleep 5000
rem objFR.printLine 0, 0, 0, 16, "Иванова Степанида Поликарповна"
Wscript.Echo objFR.lastCommandError