MrChiliCheese Posted July 19, 2008 Share Posted July 19, 2008 Hi guys, at the moment i'm writing a tool for myself, a little SystemControl, with small process Manager and Soudn Control... The problem is, that the memory my program uses ist getting higher and higer until my computer freezes... and that is bad. I searched through the Script and i reduced it to the part wich is responsible for the mem problem... Here it is: expandcollapse popup#NoTrayIcon #include <GUIConstantsEx.au3> #include <GUIListView.au3> #include <GUISlider.au3> #include <ListviewConstants.au3> #include <SliderConstants.au3> #include <WindowsConstants.au3> #include "Audio.au3" GUICreate("SysControl", 238, 458, (@DesktopWidth-238)/2, (@DesktopHeight-458)/2, -1, $WS_EX_TOOLWINDOW);BitOR(,$WS_EX_TOPMOST)) ;~ Master Volume $group_master_vol = GUICtrlCreateGroup("Master Volume:", 4, 97, 230, 35) $master_vol = GUICtrlCreateSlider (5,110,228,20,BitOR($TBS_AUTOTICKS, $TBS_ENABLESELRANGE)) GUICtrlSetLimit ( $master_vol, 100 ,0 ) GUICtrlSetData ($master_vol, _SoundGetMasterVolume()) GUICtrlSetData ($group_master_vol,"Master Volume: " & _SoundGetMasterVolume() & "%") ;~ Wave Volume $group_wave_vol = GUICtrlCreateGroup("Wave Volume:", 4, 137, 230, 35) $wave_vol = GUICtrlCreateSlider (5,150,228,20,BitOR($TBS_AUTOTICKS, $TBS_ENABLESELRANGE)) GUICtrlSetLimit ( $wave_vol, 100 ,0 ) GUICtrlSetData ($wave_vol, _SoundGetWaveVolume()) GUICtrlSetData ($group_wave_vol,"Wave Volume: " & _SoundGetWaveVolume() & "%") GUISetState(@SW_SHOW) While 1 ;~ GUI Message verarbeiten $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE GUISetState(@SW_HIDE) ;~ Exit EndSelect SoundControl () WEnd Func SoundControl () If BitAnd(WinGetState ("SysControl"), 8) And ControlGetFocus ("SysControl", "") = "msctls_trackbar321" Then If _GUICtrlSlider_GetPos($master_vol) <> _SoundGetMasterVolume() Then _SoundSetMasterVolume(_GUICtrlSlider_GetPos($master_vol)) GUICtrlSetData ($group_master_vol,"Master Volume: " & _SoundGetMasterVolume() & "%") EndIf Else _GUICtrlSlider_SetPos ($master_vol, _SoundGetMasterVolume()) EndIf If BitAnd(WinGetState ("SysControl"), 8) And ControlGetFocus ("SysControl", "") = "msctls_trackbar322" Then If _GUICtrlSlider_GetPos($wave_vol) <> _SoundGetWaveVolume() Then SoundSetWaveVolume(_GUICtrlSlider_GetPos($wave_vol)) GUICtrlSetData ($group_wave_vol,"Wave Volume: " & _SoundGetWaveVolume() & "%") EndIf Else _GUICtrlSlider_SetPos ($wave_vol, _SoundGetWaveVolume()) EndIf EndFunc Maybe you could help me. Thanks! Link to comment Share on other sites More sharing options...
MrChiliCheese Posted July 19, 2008 Author Share Posted July 19, 2008 (edited) Ok, i searched through my script, added a Sleep in my loops and nothing happend... So, i did a normal compile instead of the beta compile an that did it...!With the beta compiled script the Mem-Usage gets higher and higher...Maybe a mod could move this thread to the beta forum, so that it can be discussed there why this happens?Thats what it looks like: Edited July 19, 2008 by yetrael Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now