|
|
@ -21,7 +21,9 @@ DllCall("LoadLibrary", "Str", "x64\Debug\OSC2AHK.dll", "Ptr") |
|
|
|
|
|
|
|
OnMessage(0x1002, "msghandlerFloat") |
|
|
|
|
|
|
|
DllCall("OSC2AHK.dll\open", UInt, hWnd, UInt, 7002) |
|
|
|
success := DllCall("OSC2AHK.dll\open", UInt, hWnd, UInt, 7003) |
|
|
|
if (success != 0) |
|
|
|
msgbox, Failed to open port! |
|
|
|
|
|
|
|
DllCall("OSC2AHK.dll\addListener", AStr, "/test1", UInt, 0x1001, UInt, oscTypeInt) |
|
|
|
OnMessage(0x1001, "msghandlerInt") |
|
|
@ -122,10 +124,42 @@ do_exit: |
|
|
|
Esc:: |
|
|
|
ExitApp |
|
|
|
|
|
|
|
^a:: |
|
|
|
VarSetCapacity(theStr, 10) |
|
|
|
theStr := DllCall("OSC2AHK.dll\getStringData", AStr, theStr, UInt, 10, UInt, 0, "Cdecl AStr") |
|
|
|
msgbox,%theStr% |
|
|
|
+a:: |
|
|
|
;ret := DllCall("OSC2AHK.dll\open", UInt, hWnd, UInt, 7002) |
|
|
|
;MsgBox, %ret% |
|
|
|
ip := "127.0.0.1" |
|
|
|
port := 8002 |
|
|
|
addr := "/testmsg" |
|
|
|
data := 42 |
|
|
|
data2 := 43 |
|
|
|
DllCall("OSC2AHK.dll\sendOscMessageInt", AStr, ip, UInt, port, AStr, addr, Int, data) |
|
|
|
return |
|
|
|
|
|
|
|
+s:: |
|
|
|
ip := "127.0.0.1" |
|
|
|
port := 8002 |
|
|
|
addr := "/float/msg" |
|
|
|
data := 42.3 |
|
|
|
data2 := 54.4 |
|
|
|
DllCall("OSC2AHK.dll\sendOscMessageFloat2", AStr, ip, UInt, port, AStr, addr, Float, data, Float, data2) |
|
|
|
return |
|
|
|
|
|
|
|
+d:: |
|
|
|
ip := "127.0.0.1" |
|
|
|
port := 8002 |
|
|
|
addr := "/msg/string" |
|
|
|
data := "This is the string" |
|
|
|
data2:= "Second string" |
|
|
|
DllCall("OSC2AHK.dll\sendOscMessageString2", AStr, ip, UInt, port, AStr, addr, AStr, data, AStr, data2) |
|
|
|
return |
|
|
|
|
|
|
|
+f:: |
|
|
|
ip := "127.0.0.1" |
|
|
|
port := 8002 |
|
|
|
addr := "/msg/string" |
|
|
|
data := "This is the string" |
|
|
|
DllCall("OSC2AHK.dll\sendOscMessageString", AStr, ip, UInt, port, AStr, addr, AStr, data) |
|
|
|
return |
|
|
|
; DllCall("OSC2AHK.dll\close", UInt, 0) |
|
|
|
;msgbox,esc |
|
|
|
; DllCall("OSC2AHK.dll\open", UInt, hWnd, UInt, 7001) |