Biatu 19 Posted September 6, 2015 I have come across an issue that affects the performance of a few of my scripts over a period of a few years now. I notice it on Windows 7, 8, and 10.It happens when I have script run a function that calls other functions, and an adlib is running gui updates. After a few seconds the gui stops responding, or slowsdown immediately when my cursor stops moving. If i move the cursor around the screen the script speeds up, weather or not its moving within the gui. Anyone else noticing this? What is what? What is what. Share this post Link to post Share on other sites
kylomas 415 Posted September 7, 2015 Can you post an example or reproducer? Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Share this post Link to post Share on other sites
Biatu 19 Posted September 12, 2015 (edited) expandcollapse popup;I found that this issue had to do with the adlib loop and GuiGetMsg. $iProgress=0 $iStop=0 $hGUI=GUiCreate("",512+64,32) $idProgress=GUICtrlCreateProgress(0,0,512,32) $idStart=GUICtrlCreateButton("Start",512,0,64,32) GuiSetState() While 1 $iMsg=GuiGetMsg() Switch $iMsg Case -3 Exit Case $idStart AdlibRegister("Update",10) GUICtrlSetData($idStart,"Stop") Start() AdlibUnRegister("Update") GUICtrlSetData($idStart,"Start") GUICtrlSetData($idProgress,100) $iStop=0 EndSwitch WEnd Func Update() GUICtrlSetData($idProgress,$iProgress) $iMsg=GuiGetMsg() Switch $iMsg Case -3 Exit Case $idStart $iStop=1 EndSwitch EndFunc Func Start() For $i=0 to 1000000 If $iStop Then ExitLoop $iProgress=($i/1000000)*100 Next EndFunc Edited September 12, 2015 by Biatu What is what? What is what. Share this post Link to post Share on other sites