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

objFR.portName = "COM4"

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

Wscript.Echo v

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.descr

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

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

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

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


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