Hey everyone,
I searched some hours for a way to use the function WaitForSingleObject not as a function the script has to wait for, but a function which calls a callback function when the event is signaled. I found a way with RegisterWaitForSingleObject but no AutoIt implemention, so I made one on my own, and now I want to share it with you guys!
The only limitation by this implemention is that you are not able to use more than one callback at once. to avoid this, you could write a static array in the function which fills with the selfmade callback structs. If you find another way, let me know!
Example:
Hope you like it and find use for it!
Greetz,
Spider
RegisterWaitForSingleObject.zip