I don't have permision to make a new topic so I write here.
I don't know have to use _CommSendByteArray. Can you give any example?
I trying like this:
#include <GUIConstants.au3>
#include <CommMG.au3>
#include <Array.au3>
$set1 = _CommSetport(4,0,9600,8,0,1,0)
Dim $avArray
$avArray = _ArrayCreate(Dec("7B"),Dec("7B"),Dec("7B"),Dec("7B"),Dec("7B"),Dec("7B"))
_CommSendByteArray($avArray[1], 5,1000)
;===============================================================================
; Function Name: _CommSendByteArray($pAddr,$iNum,$iWait)
; Description: Sends the bytes from address $pAddress
; Parameters: $iNum the number of bytes to send.
; $iWaitComplete - integer: if 0 then functions returns without
; waiting for bytes to be sent
; if <> 0 then waits untill all bytes are sent.
; Returns: on success returns 1
; on failure returns -1 and sets @error to 1
;
;;NB could hang if byte cannot be sent and $iWaitComplete <> 0
; could lose data if you send more bytes than the size of the outbuffer.
; the output buffer size is 2048
;===============================================================================