I have created a script that use input32.dll to monitor coin acceptor (internet cafe). Script is 2919 lines.
With the old version everything work like a charm
but when i install the new version and run the script the CPU go at 100% usage and everything lags.
This script is running at
Pentium 4 2.8
512MB ram
SetTimer, Monitor, 50, 1
return
Monitor:
lptin := DllCall("INPOUT32\Inp32",int,"0x379")
If lptin = %LastRead%
return
LastRead = %lptin%
If islabel(lptin)
gosub, %lptin%
return
Edit: After some test i can see that the problem is Thread priority (1)