One strategy is to create a text file before launching your program, and erase it when it finishes. That way you can have your timer fire and check for it's existence. When it no longer exists, the process is finished.
JH -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Garry Bettle Sent: Monday, May 14, 2007 6:35 AM To: [email protected] Subject: How to pause\stop "in-running" processes Howdy, Hope everyone had a nice weekend. I'm trying to build a form that has a toggle-like button. Press it once, and a method fires that begins to call a webservice API (written in Python). This process should continue until the webservice returns with, "Suspended" or "Closed". Or, and this is a big OR, the user clicks the toggle button again and the method should stop running. So, should I put a timer on the form and call it every 10 seconds or so (NB: one "call" to the webservice can take 5-8secs)? Does the timer interval have to be greater that the time it takes to make one call, or does the timer fire anyway once it receives focus again? What function do you use to poll for a mouseclick\keypress?: i.e. inkey()? Can anyone suggest a better way? Many thanks, Garry [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]@shelbynet.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

