Jump to content
Sign in to follow this  
RichE

100% Cpu Time

Recommended Posts

RichE

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


RichE

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

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

Share this post


Link to post
Share on other sites
MHz

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

Share this post


Link to post
Share on other sites
GaryFrost

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.

 

Share this post


Link to post
Share on other sites
RichE

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

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.