'STARTER
Sub Process_Globals
Dim WFPrinter AsSocket 'Network library
Dim AStreams AsAsyncStreams 'RandomAccessFile library
End Sub
'MAIN
Sub Activity_Resume
Starter.WFPrinter.Initialize("WFPrinter")
Starter.WFPrinter.Connect("192.168.0.87", 9100, 0)
End Sub
Sub Activity_Pause (UserClosed As Boolean)
If UserClosed Then
Starter.AStreams.Close
Starter.WFPrinter.Close
End If
End Sub
Sub WFPrinter_Connected (Successful As Boolean)
Log(Successful)
If Successful Then
Starter.AStreams.Initialize(Starter.WFPrinter.InputStream, Starter.WFPrinter.OutputStream, "AStreams")
Else
End If
End Sub