Jump to content

100% Cpu Time


 Share

Recommended Posts

is it just me, or do any compiled program i do using autoit push the cpu to 100%....?, any solutions?

Can you show a problem script, and then someone would offer a solution?

Edit:

I see you have some scripts posted in Scripts'n'Scraps. Of those scripts, I do see a problem. You are using MessageLoop mode and OnEvent mode within the same script. This is not recommended. It needs to be 1 or the other mode.

Edited by MHz
Link to comment
Share on other sites

is it just me, or do any compiled program i do using autoit push the cpu to 100%....?, any solutions?

Your using events, then in your loop trying to access the guigetmsg

change

While 1 
   $msg = GuiGetMsg() 
   Select 
   Case $msg = $GUI_EVENT_CLOSE 
      ExitLoop 
   Case Else 
  ;;; 
   EndSelect 
WEnd

to

While 1 
     Sleep ( 200 )
WEnd
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Your using events, then in your loop trying to access the guigetmsg

change

While 1 
   $msg = GuiGetMsg() 
   Select 
   Case $msg = $GUI_EVENT_CLOSE 
      ExitLoop 
   Case Else 
;;; 
   EndSelect 
WEnd

to

While 1 
     Sleep ( 200 )
WEnd
thx guys, i've change the offending code, so it now doesn't 100% cpu :) Edited by l15ard

RichE

[font="'Arial Narrow';"]Current projects[/font]

[font="'Arial Narrow';"]are on my site [/font]Sellostring

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