I have an AB8SS (HACS speaker selector) and want to control the changing of speakers through scripting. I know I could pay 30.00 for the plugin but I would rather program it into my scripts. The problem is I have no idea how to read and write data to the com ports. I have no problem opening and closing the problem is sending the data.
THis is primary script
sub main()
status=hs.OpenComPort(6,"9600,n,8,2",1,"com6_event.txt","main")
if status <> "" then
hs.writelog "Error","Comm port 6 could not be opened"
end if
'HOW DO I SEND THIS INFORMATION?
hs.SendToComPort 6,"!8400007C*"
end sub
With Calling Script "Com_6_event.txt"
sub main(dataFromCom3)
hs.writelog "Received",dataFromCom3
end sub
THis is primary script
sub main()
status=hs.OpenComPort(6,"9600,n,8,2",1,"com6_event.txt","main")
if status <> "" then
hs.writelog "Error","Comm port 6 could not be opened"
end if
'HOW DO I SEND THIS INFORMATION?
hs.SendToComPort 6,"!8400007C*"
end sub
With Calling Script "Com_6_event.txt"
sub main(dataFromCom3)
hs.writelog "Received",dataFromCom3
end sub