Jump to content

CPU Utilisation


jk0
 Share

Recommended Posts

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

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

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

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

  • Developers

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

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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