cWndByWndSpec is processor intensive
Keywords: cWndByWndSpec FindWindow
Question:
SAMPLE1 causes constantly 95 % utilisation on all my Win2000 / NT4 Workstations (not only in Taskmanager, they are really slow) and SAMPLE2 is fine and ran for 24 hours now.Does anyone know why?
SAMPLE 1 :Loop window1=cWndByWndSpec("#32770","FriFon32",0) if window1 > 0 ;...blabla endif TimeDelay(2) Goto Loop SAMPLE 2 :Loop If FindWindow("#32770") == "FRITZ!fon" ;...blabla endif TimeDelay(2) Goto LoopAnswer:
To put it simple cWndByWndSpec has a lot more work to do. Among other things the function may have to access the registry for each top-level window currently on the desktop. It is definitely not something that one should use in a background loop.
Article ID: W14764