Introduction
This is a simple custom function object which enables you to call a function in a new autohotkey thread.
Documentation
Documentation and motivation are available in the github wiki.
Fun
I think it is nice to be able to do this, but the general interest for this is probably low. However, for those of you who thinks it is fun to tinker with autohotkey-language specifics, I recommend you try to write such a function object yourselves. I'd be interested in seeing other ideas.
Misc
Feel free to use this in whichever modified or non-modified state you wish, for any peaceful purpose. No credits or references needed.
Have fun and good luck
[class][v1/v2] threadFunc
Re: [class][v1/v2] threadFunc
Could this be used to run a query via ADO outside of the main process and then do something as a callback when the query returns? Hoping this would avoid the main script from becoming unresponsive with longer query executions.
Re: [class][v1/v2] threadFunc
Does it basically do something like SetTimer, label, -1? Or am I missing the point here
Re: [class][v1/v2] threadFunc
Hello, thanks for responding.
@ kczx3, I know nothing about that. My guess is no though, this has nothing to do with running something outside of the main process. It is about causing a function to be called in a new thread.
@ RUNIE, in the sense that SetTimer cause the target label or function to execute in a new thread, yes, that is the main point. There is one line causing the new thread, the rest of the code if for handling the passing of parameters, retrieving the returns and setting the new thread options.
I leave it as an exercise for the interested reader to work out the significant differences between using SetTimer and dllcall + registerCallback, to start a new thread.
Cheers
@ kczx3, I know nothing about that. My guess is no though, this has nothing to do with running something outside of the main process. It is about causing a function to be called in a new thread.
@ RUNIE, in the sense that SetTimer cause the target label or function to execute in a new thread, yes, that is the main point. There is one line causing the new thread, the rest of the code if for handling the passing of parameters, retrieving the returns and setting the new thread options.
I leave it as an exercise for the interested reader to work out the significant differences between using SetTimer and dllcall + registerCallback, to start a new thread.
Cheers
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: No registered users and 131 guests