I need a javascript function to trigger a function in an application developed in Lazarus for both OSx and windows. I'm learning Lazarus and I'd describe myself as a medium level beginner. I know very little about javascript.
As I understand it javascript runs sandboxed so can not access an application directly. Therefore I was thinking about using some kind of tcp call from javascript into the application, passing a parameter that, when received, will trigger the event. This needs to work on both Windows and Mac. Ideally using the same components / code but if that's not possible then whatever I need to do.
My questions are:
1) Does this sound like the correct approach? 2) If it does - what is the best way and components to use to achieve this?
I've been looking at synapse - but to be perfectly honest am a little lost in what components I need to use and read up on to set this up.
So essentially - javascript needs to send a parameter to my application, which then takes an action when it's received.
Thanks in advance if you can help.