Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telepathy Communications Library - <b>tp_getwatch()</b> - find an activated input watch http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_getwatch() - find an activated input watch

   nWatch := tp_getwatch()

   Returns     Watch handle.

   Checks to see if any input watches have matched.  If any have, it
   returns the handle of one of them, and decrements that one's match
   count.  The watch handle is the number returned by the tp_watch()
   function call that set the watch.

   If several watches have matched, the order in which they are returned
   by tp_getwatch() is not the order in which they were received.

       nXmodem := tp_getwatch(1, "Start your Xmodem download now")
           // Watch for Xmodem download (for some imaginary BBS).

       nZRQINIT := tp_getwatch(1, "*" + chr(24) + "B00")
           // Watch for Zmodem auto-download request.

       do while .T.
           ...process some data...
           nWatch := tp_getwatch()
           do case
           case nWatch == nXmodem
               tp_rxmodem(1, "C:\DOWN\XFILE")
           case nWatch == nZRQINIT
               tp_rzmodem(1, "C:\DOWN")
           endcase
       enddo

See Also: tp_iswatch() tp_watch() Input Watches

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson