Dec 21st, 2024, 4:45pm
Welcome, Guest. Please Login or Register.
Pages: 1  Reply Reply  Notify of replies Notify of replies  Print Print
   Author  Topic: VBScript Examples  (Read 6196 times)
VBScript Examples
on: Feb 4th, 2010, 11:28am
Quote Quote  Modify Modify

1. Is it possible to get some vbscript examples?
Last Edit: Feb 5th, 2010, 5:39am by infotech IP Logged
Re: WriteArray troubles in VBScript
Reply #1 on: Feb 5th, 2010, 5:40am
Quote Quote  Modify Modify

Here is your code with a couple of remarks ( they are marked with !!!):
-----------------------------------------------------------------------
 
 
Dim objFTPort
 
'Dim arrCmd
'arrCmd = array(CByte(0), CByte(16), CByte(2), CByte(0), CByte(1))
 
Dim Arr(4)
Arr(0) = 0
Arr(1) = 16
Arr(2) = 2
Arr(3) = 0
Arr(4) = 1
 
Set objFTPort = CreateObject("FTSPC.FTSPCControl")
objFTPort.PortName = "COM1"
objFTPort.BaudRate  = 2400
objFTPort.DataBits  = 8
objFTPort.StopBits  = 0 '!!! <--- =0 - one stop bit, =1 - 1.5stop bits, 2 - two stop bits
objFTPort.Parity    = 0
objFTPort.FlowControl    = 0
call objFTPort.Open()
If objFTPort.IsOpened Then
   call objFTPort.WriteArray(arr, 5) '!!! Use "call" if you want to use "( )"
End If
 
'call objFTPort.Close()
IP Logged
Pages: 1  Reply Reply  Notify of replies Notify of replies  Print Print

Previous topic | Next topic
Online Talk to our
support team or
sales department.