Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
File Trigger
#4
Dear Gintaras,

Does it exist a similar example in the case of window-Name Changed events - triggers?

This is my contribution, it was tested and worked. Any comments are welcome.

Function WindowTriggerSkipDuplicateEvent
Code:
Copy      Help
;/
function hwnd [^timeoutS]

if(!timeoutS) timeoutS=1
_s.encrypt(2|8)
__Handle ev=CreateEvent(0 0 0 F"QM FTSDE {_s}") ;;create or open event for this file
if(GetLastError=ERROR_ALREADY_EXISTS) SetEvent ev ;;if other thread already created event and waiting, set event, let it end
wait timeoutS H ev
err ret ;;timeout. Were no events for this file for timeoutS seconds.
end ;;other thread have set event for this file. End this thread, because other thread will process it.

Kind regards


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)