Search the Community
Showing results for tags 'mscomm'.
Local $sAxName Local $oMSComm $sAxName = "MSCOMMLib.MSComm.1" $oMSComm = ObjCreate($sAxName) MsgBox(0, Default, StringFormat("Name: %s, Obj %d, Err %d", $sAxName, IsObj($oMSComm), @error)) I'm talking to serial ports (for Arduino) using the MSComm object. It all runs fine from SciTE or .exe. If I compile to .a3x the object is not created. I could manage without .a3x but I like it because it compiles faster.
I've tried to send 4 byte message via MSComm control VB and in AutoIt. Message is "*A<msb><lsb>". This code works in VB with any value 0 or 1 in msb, and 0 to 255 in lsb. .Output = "*A" & Chr(0) & Chr(ix) In AutoIt this works, but not if either byte is zero, and not if lsb is 1. $sAxName = "MSCOMMLib.MSComm.1" $obj = ObjCreate($sAxName) With $obj .CommPort = 31 .Settings = "9600,N,8,1" .PortOpen = True .NullDiscard = False .NullDiscard = True .HandShaking = 0 .InputMode = 1 .DTREnable = True .EOFEnable = False .RTSEnable