Sign in to follow this  
Followers 0
RichE

100% Cpu Time

4 posts in this topic

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



#2 ·  Posted (edited)

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

#3 ·  Posted (edited)

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

#4 ·  Posted (edited)

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  
Followers 0