@ -4,7 +4,6 @@ This is a DLL extension for [AutoHotkey](https://www.autohotkey.com/) that enabl
## Work in progress
Currently this project is unfinished, there may be missing functionality and errors may occur!
* After multiple calls of [`getStringData()`](https://files.eleton-audio.de/gitea/Ludwig/OSC2AHK#get-string-data) a heap memory fault occurs. This could also be a error in the calling AHK script (see [`msghandlerString()` in the test script](https://files.eleton-audio.de/gitea/Ludwig/OSC2AHK/src/branch/master/msgtest.ahk#L41)).
__Work in progress, this is not working properly for now__
As string data carried by OSC messages may be of varying length, they cannot directly be passed by system messages. Therefore, the string is buffered in the DLL and the `data` variable of the callback function receives a unique identifier to the stored string. This string then can be retreived later on by the AHK script by calling this function.
As string data carried by OSC messages may be of varying length and cannot directly be passed by system messages. Therefore, the string is buffered in the DLL and the `data` variable of the callback function receives a unique identifier to the stored string. This string then can be retrieved later on from the AHK script by calling this function.
```cpp
char* getStringData(char* targetString, unsigned int targetSize, unsigned int StringID);
```
This function writes the stored string to the `targetString` and also removes it from the buffer inside the DLL.
A example AHK snippet could look like this:
A callback functin in AHK could look like this (also look at the [string example](https://files.eleton-audio.de/gitea/Ludwig/OSC2AHK/src/branch/master/examples/string_example.ahk)):