Jump to content

Recommended Posts

Posted

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?

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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!

Posted

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

  • Developers
Posted

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

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.
  :)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...