' CriticalObject ' is understood as a way to prevent problems caused by interference during multi-threading.
Is that right?
In the following ' script ', ' ie_BeforeNavigate2 ' in ' Thread ', only the areas where simple messages are received are isolated from the mainscript.
The area of the ' ie_BeforeNavigate2 ' in ' Thread ' would be a series of simple repetitive tasks.
Code: Select all
ie := ComObjCreate("InternetExplorer.Application") ; create a IE instance
ComObjConnect(ie, "ie_")
ie.Visible := true
loop 2
{
ie.Navigate("https://autohotkey.com/")
sleep 2000
ie.Navigate("https://www.google.com/")
}
ThreadList:='
(
#Persistent
#SingleInstance Force
ie_BeforeNavigate2(prms, this)
{
loop 10000
FileAppend("in Thread ....Got to Web_BeforeNavigate2\" . A_Hour . ":" . A_Min . ":" . A_Sec,A_ScriptDir . "\" . a_index . ".txt")
}
)'
Thread:=ExeThread(ThreadList)
Because,
I want the pure function of ' ComObjConnect ', which is to connect the starting point of the memory named 'ie' to 'ie_' in 'Thread'.
Commands such as ' COM_FindConnectionPoint ' and ' RtlMoveMemory ' are not familiar commands and therefore need help.
Attachment :
ExeThread ' knows to have about 3,500 " thread " available. ->
https://autohotkey.com/boards/viewtopic ... es#p170584
If there is a 'comobj' directly in each thread, about 330 to 500 are likely possible, right?