This udf seems to work perfectly for what I'm trying to do, but I'm very new to working with serial ports and I'm having a problem. I'm sending commands to a hardware device to toggle generator lines through a serial port instead of wired switches. So far I'm just writing a quick test to make sure I can get it to work. Here is what I have:
#include "CommMG.au3"
$error = ""
_CommSetPort(1, $error, 38400, 8, 0, 1, 1)
_CommSendString("setinp 8e", 1)
_CommCloseport()
I've tested to make sure I'm connecting to the port properly, I've just removed all of the unimportant code. When I send the command in hyperterminal, I immediately see the input LEDs on the hardware light up. When I send the same command using AutoIt, the lights remain unlit until I connect to hyperterminal and press the enter key. I've tried adding {ENTER} at the end of my input string, but that's not the problem. What is hyperterminal doing that my script is not?