1. w32HTimer captures only one event

Hello Boys

I am using the code euphoria 3.11 below.

---------------------------------------------------------------------------- 
procedure captura(integer self, integer event, sequence parms) 
 VOID=playSound ("untie.wav") 
 system("notePad agenda.txt",1) 
end procedure 
------------------------------------------------------------------------- 
setTimer (WIN1, 1, 22000) 
setHandler(WIN1, w32HTimer,routine_id("captura"))  

Without problems the setHandler captures the first event and when this happens I'm play a sound abd opening a notePad and I want the timer to make the setHandler work every 22 seconds. But it happens only once. After the first event, my code opens the notePad and the timer no longer triggers setHandler. What should I do to setHandler to continue capturing setTimer events?

new topic     » topic index » view message » categorize

2. Re: w32HTimer captures only one event

The problem is that system() waits for the process it started to complete. You'll want to use shellExecute() or shellExecuteEx() from Win32Lib to start a process asynchronously.

-Greg

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu