Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MSComm Control
#8
This works great as a function not so great as a macro.
Code:
Copy      Help
;;ListenToSerial
VARIANT a=TRUE
MsComm32.MSComm c._create

c.Settings = "9600,N,8,1"
c.CommPort=1
c.PortOpen = a
c.RThreshold=1
;out c.PortOpen
c._setevents("c_DMSCommEvents")
opt waitmsg 1
wait -1

And this allows me to control Rhapsody music using my HP48 calculator or any other serial source. Great potential.
Code:
Copy      Help
;/
;c_DMSCommEvents/c_OnComm

function MsComm32.IMSComm'c
str Cmd=c.Input
sel Cmd
,case "P"
,act "Rhapsody"
,5 "Rhapsody"
,key Cp
,
,case "S"
,act "Rhapsody"
,5 "Rhapsody"
,key Cs
,
,case "F"
,act "Rhapsody"
,5 "Rhapsody"
,key Cf
,
,case "B"
,act "Rhapsody"
,5 "Rhapsody"
,key Cb
Thanks for the help Gintaras! Any way you could make a serial port trigger?
Matt
Matt B


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)