Jump to content

How to lover cpu usage ?


Recommended Posts

Yo i'd made a wery litle script, for one of my frinds who likes to see porno on the internet.

The script i did is desigend to auto close some autoInstall popups.

The script work sofar ok, but it uses a lot of cpu power course i da my checks in a while 1.

My problem is now that i have seen me blinde on how to lover the cpu usage :whistle:

Please some one give me a hint...

Opt("GUIOnEventMode", 1)       ;0=disabled, 1=OnEvent mode enabled
Opt("RunErrorsFatal", 0)       ;1=fatal, 0=silent set @error
Opt("TrayMenuMode", 1)

$exit = TrayCreateItem("Exit")
TraySetIcon("shell32.dll", 65)

While 1
    If WinExists("Advarsel",'Vil du installere og køre') Then; #32770
WinActivate("Advarsel",'Vil du installere og køre')
; Send("!N")
WinKill("Advarsel",'Vil du installere og køre')
If WinExists("Microsoft Internet Explorer",'You must click YES') Then
    WinActivate("Microsoft Internet Explorer",'You must click YES')
    WinKill("Microsoft Internet Explorer",'You must click YES')
    WinClose("Microsoft Internet Explorer",'You must click YES')

Func Off()
Link to comment
Share on other sites

If you still find the CPU usage to be high then try a larger number like Sleep(100). People have been discussing elsewhere that small Sleep() values don't lower CPU usage.

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

  • Recently Browsing   0 members

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