jk0 Posted September 1, 2007 Share Posted September 1, 2007 My CPU utilisation shoots to 40-50% when I launch the GUI I created in Autoit. Has anyone seen this, or does anyone have an idea on what could be causing this? I stripped down the GUI to just the GUICreate funciton and CPU usage still shoots up. If I run one of the examples however, this does not happen! Could anyone have an explanation for this please? What am I missing? Link to comment Share on other sites More sharing options...
flip209 Posted September 1, 2007 Share Posted September 1, 2007 I might not but your gui, it could be a background process. If you could post some code we could look at it to see? " I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln Link to comment Share on other sites More sharing options...
jk0 Posted September 1, 2007 Author Share Posted September 1, 2007 This is all I got in there - it still shoots up: ;Create the main interface for the program $mainGUI=GUICreate("TestGUi", 400, 500, 750, 0) GUISetState(@sw_Show) While 1 WEnd Exit Link to comment Share on other sites More sharing options...
flip209 Posted September 1, 2007 Share Posted September 1, 2007 try: CODE;Create the main interface for the program $mainGUI=GUICreate("TestGUi", 400, 500, 750, 0) GUISetState(@sw_Show) While 1 sleep (100) WEnd Exit " I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln Link to comment Share on other sites More sharing options...
flip209 Posted September 1, 2007 Share Posted September 1, 2007 Better yet: CODE$mainGUI=GUICreate("TestGUi", 400, 500, 750, 0) GUISetState(@sw_Show) While 1 select case $msg = $GUI_EVENT_CLOSE exit EndSelect WEnd Exit " I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln Link to comment Share on other sites More sharing options...
jk0 Posted September 1, 2007 Author Share Posted September 1, 2007 Yup, that was it! Awesome - thanks for your help! Link to comment Share on other sites More sharing options...
jk0 Posted September 1, 2007 Author Share Posted September 1, 2007 Thanks - in my main script - I was executing the while only when the start flag was set - and hence the util was shooting up even when I launched the gui, since the flag wasnt set at launch! Link to comment Share on other sites More sharing options...
flip209 Posted September 1, 2007 Share Posted September 1, 2007 LOL " I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln Link to comment Share on other sites More sharing options...
Developers Jos Posted September 1, 2007 Developers Share Posted September 1, 2007 Better yet:CODE$mainGUI=GUICreate("TestGUi", 400, 500, 750, 0)GUISetState(@sw_Show)While 1select case $msg = $GUI_EVENT_CLOSEexitEndSelectWEnd Exit Pretty sure you are missing something here in the While-Wend loop...$msg = GUIGetMsg() SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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