Browse Source

Readme: Added sending functions

tags/0.3
Ludwig Frühschütz 3 years ago
parent
commit
6c4a3211dc
1 changed files with 42 additions and 0 deletions
  1. +42
    -0
      README.md

+ 42
- 0
README.md View File

@ -133,5 +133,47 @@ msghandlerString(oscType, data, msgID, hwnd)
}
```
### OSC send functions
The DLL also can be used to transmit OSC messages from AutoHotkey by using the following functions:
#### Send integer message
```cpp
void sendOscMessageInt(char* ip, unsigned int port, char* address, int payload);
```
Example call from AHK:
```
ip := "192.168.1.2"
port := 8002
addr := "/testmsg"
data := 42
DllCall("OSC2AHK.dll\sendOscMessageInt", AStr, ip, UInt, port, AStr, addr, Int, data)
```
#### Send float message
```cpp
void sendOscMessageFloat(char* ip, unsigned int port, char* address, float payload);
```
Example call from AHK:
```
ip := "192.168.1.2"
port := 8002
addr := "/my/msg"
data := 42.3
DllCall("OSC2AHK.dll\sendOscMessageFloat", AStr, ip, UInt, port, AStr, addr, Float, data)
```
#### Send string message
```cpp
void sendOscMessageString(char* ip, unsigned int port, char* address, char* payload);
```
Example call from AHK:
```
ip := "192.168.1.2"
port := 8002
addr := "/some/message"
data := "This is the string"
DllCall("OSC2AHK.dll\sendOscMessageString", AStr, ip, UInt, port, AStr, addr, AStr, data)
```
## Credits
This DLL uses the [oscpack](http://www.rossbencina.com/code/oscpack) OSC implementation by Ross Bencina.

Loading…
Cancel
Save