Jump to content
Sign in to follow this  
Toppy

Using 99% CPU cycles

Recommended Posts

Hi, is it normal for the script below to soup up all CPU cycles ?

Global $Paused
HotKeySet("{ESC}", "Terminate")

;;;; Body of program would go here;;;;
While 1
If WinExists("http://www.livescore.com - LiveScore.com - Mozilla Firefox") AND WinActive( "http://www.livescore.com - LiveScore.com - Mozilla Firefox") Then
   $size = WinGetClientSize("http://www.livescore.com - LiveScore.com - Mozilla Firefox")
$newwidth = $size[0] + 50
   $newheight  = $size[1] + 50
WinMove ( "http://www.livescore.com - LiveScore.com - Mozilla Firefox", "", 0, 0 , $newwidth , $newheight )
WinSetTitle ( "http://www.livescore.com - LiveScore.com - Mozilla Firefox", "", "Resized" )

EndIf


If WinExists("http://tracker.livescore.net - LiveScore.com - Mozilla Firefox") AND WinActive( "http://tracker.livescore.net - LiveScore.com - Mozilla Firefox") Then 
    $size2 = WinGetClientSize("http://tracker.livescore.net - LiveScore.com - Mozilla Firefox")
$newwidth2 = $size2[0] + 50
   $newheight2  = $size2[1] + 50
WinMove ( "http://tracker.livescore.net - LiveScore.com - Mozilla Firefox", "", 0, 0 , $newwidth2 , $newheight2 )
WinSetTitle ( "http://tracker.livescore.net - LiveScore.com - Mozilla Firefox", "", "Resized" )
EndIf

If WinActive ( "Resized" ) = 0 Then
WinClose ( "Resized" )
EndIf

WEnd
;;;;;;;;


Func Terminate()
    Exit 0
EndFunc

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...