Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Script eating memory by the hour...?!

$
0
0
Hi, I've got a autoit script on my server that checks a lot of services (windows 7). But it eats memory, a lot. After about an hour I need to restart the script. I'm sure it's pretty easy, but I can't really see the problem here ^^

$servicename = "Example"
$stdout = Run('sc.exe query ' & $servicename, '', @SW_HIDE, 2)
	Local $data
	While 1
		$data = StdOutRead($stdout)
		If @error Then Return 'unknown'
		If $data Then
			If StringInStr($data, 'Running') Then $data = 'Running'
			If StringInStr($data, 'Stopped') Then $data = 'Stopped'
		   ExitLoop
		EndIf
	 WEnd


Anyone got a hint?

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>