I have a very simple question: if I have a program I've written and I want it to run in the background (using an infinite loop combined with a call to sleep -- perhaps not the best solution but I'm open to suggestions), where should the original call to the program live?
A bit more detail: I'm using a Raw TCP/IP Active protocol to listen to a telnet connection set up that cycles through reporting a few temperatures. The program calls PortInput with appropriate parameters waiting for a match and updates the temperature when it gets a reply. This only needs to run every few seconds. My first solution was calling the program from the On Update field of the protocol I had set up (without a loop) but this lead to some problems.
If I'm way off the mark can someone point me in the right direction for running programs in the background? Thanks.
A bit more detail: I'm using a Raw TCP/IP Active protocol to listen to a telnet connection set up that cycles through reporting a few temperatures. The program calls PortInput with appropriate parameters waiting for a match and updates the temperature when it gets a reply. This only needs to run every few seconds. My first solution was calling the program from the On Update field of the protocol I had set up (without a loop) but this lead to some problems.
If I'm way off the mark can someone point me in the right direction for running programs in the background? Thanks.