I'm creating a web controller to send OSC commands to another piece of software on my computer. I've got a html file that works well with inline OSC commands able to be used so onclick="sendOSC('/action/launchNextColumn', [1])" sends a raw OSC command to a node.js listener which creates a local WebSocket-to-UDP Bridge to send the command in the correct way for OSC (I've attached just as an fyi).
Unfortunately I've hit a problem moving that onclick function to translate into Hype. I'm pretty sure I'm just using the wrong syntax but I'm getting a console error saying I'm missing variables.
Any pointers would be appreciated.
If you look at the web developer console, you will see this error with the Hype document when loading:
SyntaxError: Can't create duplicate variable that shadows a global property: 'osc'
Looking at the difference between your example .html and the .hype document is that you are using an "osc.min.js" in the Hype document that is different. If I remove the one in the Hype document and just add the script to the start of the head, then everything seems to work okay: