Jump to content



Photo

Too high CPU usage on simple script


  • This topic is locked This topic is locked
1 reply to this topic

#1 Fizz

Fizz

    Seeker

  • New Members
  • 2 posts

Posted 11 July 2012 - 07:20 PM

Hello again :)
So i have a simple script (created .exe using SciTE). I have dual core @ 1.33Ghz and this script use constantly 50% of CPU, when it should use like 0.00001.
Please tell me what is the problem, i tried to add various sleep and changing some components, but nothing helped.


Plain Text         
#RequireAdmin HotKeySet("{F4}", "Stack") MsgBox(0, "FizzScript", "On air") WinActivate("MyProcess") WinWaitActive("MyProcess") WinMove("MyProcess", "", 0, 0) Sleep(2000) Func Stack()    BlockInput(1)    Sleep(1)    Send("i") Sleep(2) MouseMove(1520, 760, 3)       Sleep(Random(1, 2))       MouseClick("RIGHT")       Sleep(Random(1, 2))       MouseMove(1520, 700, 3)       Sleep(Random(1, 2))       MouseClick("RIGHT")       Sleep(Random(1, 2))   MouseMove(1520, 630, 3)       Sleep(Random(1, 2))       MouseClick("RIGHT")       Sleep(Random(1, 2))    MouseMove(1588, 630, 3)       Sleep(Random(1, 2))       MouseClick("RIGHT")       Sleep(Random(1, 2))    MouseMove(1588, 688, 3)       Sleep(Random(1, 2))       MouseClick("RIGHT")       Sleep(Random(1, 2))    MouseMove(1588, 756, 3)       Sleep(Random(1, 2))       MouseClick("RIGHT")       Sleep(Random(1, 2))    MouseMove(1588, 827, 3)       Sleep(Random(1, 2))       MouseClick("RIGHT")       Sleep(Random(1, 2))    MouseMove(1640, 800, 3)       Sleep(Random(1, 2))       MouseClick("RIGHT")       Sleep(Random(1, 2))    MouseMove(1640, 710, 3)       Sleep(Random(1, 2))       MouseClick("RIGHT")       Sleep(Random(1, 2))    MouseMove(1640, 622, 3)       Sleep(Random(1, 2))       MouseClick("RIGHT")       Sleep(Random(1, 2))    Send("i") Sleep(2)    BlockInput(0) Sleep(2) EndFunc   ;==>Stack While 1    WEnd






#2 Melba23

Melba23

    Yes, me!

  • Moderators
  • 15,299 posts

Posted 11 July 2012 - 07:26 PM

Fizz,

We told you to look at the Forum Rules - you obviously did not or you would have seen the one which says:

"Do not create a new topic on a subject if a previous topic on that subject was locked. ;)

So I suggest you spend the next 2 days making sure that you read and understand as you will not be able to post here. :naughty:

M23
StringSize - Automatically size controls to fit text - ExtMsgBox - A user customisable replacement for MsgBox

Toast - Small GUIs which pop out of the Systray - Marquee - Scrolling tickertape GUIs

Scrollbars - Automatically sized scrollbars with a single command - GUIFrame - Subdivide GUIs into many adjustable frames

GUIExtender - Extend and retract multiple sections within a GUI - NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes

ChooseFileFolder - Single and multiple selections from specified path tree structure - - Notify - Small notifications on the edge of the display

RecFileListToArray - An alternative to _FileListToArray with user-defined include/exclude masks, maximum recursion level, sorting and displayed path options

GUIListViewEx - Insert, delete, move, drag and sort ListView items





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users