Parallel port relay control in RR using Autoit?
So I was thinking yesterday about how nice it would be if I could raise and lower my radio antenna when I switched to the radio skin, (I currently have the antenna connected to my instrument light switch). So I did a bit of :search:ing and found that parallel port relay support is on the todo list for RR, so I'm going to have to wait or come up with something else. In my :search:ing I also found the following
1. AutoIt has a function that can make use of dll files("DllCall").
2. There are at least 2 DLLs available that allow for direct control of parallel ports :io.dll and inpout32.dll
So it seems one should be able to use an autoit script called from RR to control/read the input/output pins on the parallel port. My problem is that I have little skill with programming and have not been able to get the DLLCall function in autoit to work.
Here is the documentation for the DllCall function and in autoit, and I've been trying to call functions from the io.dll dll. I've tried using various forms of the following without success.
DllCall("io.dll", "none", "SetPortBit",1,0)
The 1 above refers to LPT1 and the zero refers to connection D0 on the parallel port... or at least it does in my world. I know the DLL works, because there's a little program out there called Crashes relay control that uses this dll and I'm able to control the the port with this program. Anyone have any ideas on what I'm doing wrong.