rem > Hi guys, rem > rem > I'm trying to get a list of all apps running on my S5. I would like to rem > get the thread id and program name. I'm currently using a loop with the rem > getthread funtioncs, but I have to make a loop which increment the a rem > thread variables each time, of course this is a crapy way to do this... rem > is there a way I can get the thread ID of all the running program on my rem > S5 without doing such loop ! rem Try the code below. ThreadName$(i%) gets some other data as well - you'll rem see if you run it. The other data consists of 3 strings, each terminated rem by a zero byte. So count 3 zero bytes from the start of each rem ThreadName$(), and the next byte is the start of the filename. rem You need system.opx included at the top of your program. i%=0 ONERR last_one DO i%=i%+1 ThreadID&(i%)=GetThreadIDFromOpenDoc&:("*",previous&) ThreadName$(i%)=GetNextWindowGroupName$:(ThreadID&(i%),prev&) UNTIL 0 last_one:: ONERR OFF