Jump to content

Search the Community

Showing results for tags 'MScomm'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 2 results

  1. 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.
  2. 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 = True EndWith For $iCnt = 0 To 15 With $obj .NullDiscard = False $sMsg = "*A" & Chr(0) & Chr(Int($iCnt)) .Output = $sMsg If $iCnt < 3 then MsgBox(0, Default, $iCnt) EndIf EndWith Sleep(200) Next You might expect .NullDiscard to be relevant. The VB works with this true or false, and I've tried both in AutoIt. It's possible that I have some other property different, but I've looked through them all. I wonder if AutoIt is passing the whole string to the control, or stopping at the zero. I can't think how to prove that either way. Chr(Int($iCnt)) works correctly for values > 2, but for 1 it doesn't do the same as Chr(1) - what am I missing here?
×
×
  • Create New...