The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread id
#1
If I have two windows, and use the same function to run simultaneously. I know this will have two different thread ids, and I can use the codes from QM help to Display all threads, but I don't know which one thread id is belong to which function, because they have use the same function name.

Because the function is loop, so it will run forever. If I want to use EndThread to stop one thread, and the other will run continually , how to do?

Macro Macro2
Code:
Copy      Help
;start1
int vk1=wait(0 K)
int+ w1 = GetMousePointWindow()
if (vk1 = 118)
,mac "Function"


if (vk1 = 119)
,;Display all threads
,int i n=EnumQmThreads(0 0 0 0)
,ARRAY(QMTHREAD) a.create(n)
,for i 0 EnumQmThreads(&a[0] n 0 0)
,,out _s.getmacro(a[i].qmitemid 1)
,,out a[i].threadid
,,out a[i].threadhandle
goto start1


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)