Jump to content

high cpu usage


Recommended Posts

ok

here is my tool

GLOBAL $ARG00[50]
Global $VAR0A6D
Global $VAR0A6E
Global Const $WS_GROUP = 131072
Global Const $SS_NOTIFY = 256
Global Const $WS_CLIPSIBLINGS = 67108864
;------------------------------------------------------------------
#Region ### START Koda GUI section ### Form=
$FORM1 = GUICreate("JB Hider 1.1", 260, 290, 192, 124)

;------------------------------------------------------------------
$CLIENTLIST = GUICtrlCreateList("", 20, 60, 100, 100)
$SCAN = GUICtrlCreateButton("Refresh", 20, 2, 200, 20, $WS_GROUP)
$EX = GUICtrlCreateButton("Exit", 20, 22, 200, 20, $WS_GROUP)
;------------------------------------------------------------------
$KILLPROXY = GUICtrlCreateButton("  Kill Proxy.", 120, 220, 100, 30, $WS_GROUP)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$KILLBOT = GUICtrlCreateButton("Kill Bot.", 120, 190, 100, 30, $WS_GROUP)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$KILLSRO = GUICtrlCreateButton("     Kill Silkroad.", 120, 250, 100, 30, $WS_GROUP)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
;------------------------------------------------------------------
$BUTTON3 = GUICtrlCreateButton("Show Proxy.", 20, 190, 100, 30, $WS_GROUP)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$BUTTON4 = GUICtrlCreateButton("Show Bot.", 20, 220, 100, 30, $WS_GROUP)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$HIDESRO = GUICtrlCreateButton("Show Silkroad.", 20, 250, 100, 30, $WS_GROUP)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
;------------------------------------------------------------------
GUICtrlCreateLabel("1.1", 220, 260, 100)
GUICtrlSetFont(-10, 10, 860, 1, "MS Sans Serif")
;------------------------------------------------------------------
$SV = GUICtrlCreateButton("Server Status.", 120, 160, 100, 30, $WS_GROUP)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$DBLOADER = GUICtrlCreateButton("DB Loader.", 20, 160, 100, 30, $WS_GROUP)
GUICtrlSetFont(-1, 8, 800, 8000, "MS Sans Serif")
$ENTER = GUICtrlCreateButton("EnterPresser.", 120, 87, 70, 30, $WS_GROUP)
$VERSION = GUICtrlCreateButton("Update!.", 120, 55, 70, 30, $WS_GROUP)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$patcher = GUICtrlCreateButton("Patcher.", 190, 55, 70, 30, $WS_GROUP)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$renamer = GUICtrlCreateButton("Renamer.", 190, 87, 70, 30, $WS_GROUP)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
;------------------------------------------------------------------
;Func DBLOADER()
    ;$VAR0A84 = WinGetTitle($VAR0A6E)
    ;FileChangeDir(@ScriptDir)
    ;FileInstall("dbloader.exe", "Data\" & $VAR0A84 & "SL.JBE")
    ;Run("Data\" & $VAR0A84 & "SL.JBE " & $VAR0A84)
;EndFunc
;Func VERSION()
    ;$VAR0A84 = WinGetTitle($VAR0A6E)
    ;FileChangeDir(@ScriptDir)
    ;FileInstall("Version.exe", "Data\" & $VAR0A84 & "ve.JBE")
    ;Run("Data\" & $VAR0A84 & "ve.JBE " & $VAR0A84)
;EndFunc
;Func EN()
    ;$VAR0A84 = WinGetTitle($VAR0A6E)
    ;FileChangeDir(@ScriptDir)
    ;FileInstall("enter.exe", "Data\" & $VAR0A84 & "EN.JBE")
    ;Run("Data\" & $VAR0A84 & "EN.JBE " & $VAR0A84)
;EndFunc
;------------------------------------------------------------------
GUISetState(@SW_SHOW)
Opt("GUIOnEventMode", 2)
GUICtrlSetOnEvent($ENTER, "en")
GUICtrlSetOnEvent($patcher, "patch")
GUICtrlSetOnEvent($renamer, "rename")
GUICtrlSetOnEvent($DBLOADER, "dbloader")
GUICtrlSetOnEvent($VERSION, "version")
GUICtrlSetOnEvent($EX, "_Close")
GUICtrlSetOnEvent($KILLPROXY, "killproxy")
GUICtrlSetOnEvent($SCAN, "SCAN")
GUICtrlSetOnEvent($BUTTON3, "proxy")
GUICtrlSetOnEvent($BUTTON4, "bot")
GUICtrlSetOnEvent($HIDESRO, "hidesro")
GUICtrlSetOnEvent($KILLBOT, "KILLbot")
GUICtrlSetOnEvent($KILLSRO, "killSro")
GUICtrlSetOnEvent($SV, "sv")
;------------------------------------------------------------------
Func KILLSRO()
    ProcessClose("sro_Client.exe")
    If ProcessExists("sro_Client.exe") Then
        MsgBox(0, "Sucess!", "Killed")
    EndIf
EndFunc
Func KILLPROXY()
    ProcessClose("proxy.exe")
    If ProcessExists("proxy.exe") Then
        MsgBox(0, "Sucess!", "Killed")
    EndIf
EndFunc
Func KILLBOT()
    ProcessClose("dbbot.exe")
    If ProcessExists("dbbot.exe") Then
        MsgBox(0, "Sucess!", "Killed")
    EndIf
EndFunc
;------------------------------------------------------------------
Func BOT()
    If WinGetState("SRO-DB.de BoT") = 21 Or WinGetState("SRO-DB.de BoT") = 23 Then
        WinSetState("SRO-DB.de BoT", "", @SW_SHOW)
        WinSetState("SRO-DB.de BoT", "", @SW_RESTORE)
        GUICtrlSetData($BUTTON4, "Hide Bot")
        GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    ElseIf WinGetState("SRO-DB.de BoT") = 7 Or WinGetState("SRO-DB.de BoT") = 15 Then
        WinSetState("SRO-DB.de BoT", "", @SW_MINIMIZE)
        WinSetState("SRO-DB.de BoT", "", @SW_HIDE)
        GUICtrlSetData($BUTTON4, "Show Bot")
        GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    EndIf
EndFunc
Func PROXY()
    If WinGetState("SrProxy + Bot - Connected") = 21 Or WinGetState("SrProxy + Bot - Connected") = 23 Then
        WinSetState("SrProxy + Bot - Connected", "", @SW_SHOW)
        WinSetState("SrProxy + Bot - Connected", "", @SW_RESTORE)
        GUICtrlSetData($BUTTON3, "Hide Proxy")
        GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    ElseIf WinGetState("SrProxy + Bot - Connected") = 7 Or WinGetState("SrProxy + Bot - Connected") = 15 Then
        WinSetState("SrProxy + Bot - Connected", "", @SW_MINIMIZE)
        WinSetState("SrProxy + Bot - Connected", "", @SW_HIDE)
        GUICtrlSetData($BUTTON3, "Show Proxy")
        GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    EndIf
EndFunc
Func HIDESRO()
    If WinGetState("SRO_Client") = 21 Or WinGetState("SRO_Client") = 23 Then
        WinSetState("SRO_Client", "", @SW_SHOW)
        WinSetState("SRO_Client", "", @SW_RESTORE)
        GUICtrlSetData($HIDESRO, "Hide Silkroad")
    ElseIf WinGetState("SRO_Client") = 7 Or WinGetState("SRO_Client") = 15 Then
        WinSetState("SRO_Client", "", @SW_MINIMIZE)
        WinSetState("SRO_Client", "", @SW_HIDE)
        GUICtrlSetData($HIDESRO, "Show Silkroad")
    EndIf
EndFunc
;------------------------------------------------------------------
Func _EXITS()
    Exit
EndFunc
Func SV()
    Run("Data/Data5.JBE")
EndFunc
Func rename()
    Run("Data/Data6.JBE")
EndFunc
Func _CLOSE()
    $REALLYQUIT = MsgBox(4, "Quit?", "Are you sure you want to quit?")
    If $REALLYQUIT = 6 Then Exit
    Return
EndFunc
Func SCAN()
    UPDATE()
EndFunc
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Opt("TrayIconHide", 1)
Opt("TrayAutoPause", 0)
UPDATE()
While 1
    Switch GUIGetMsg()
        Case -3
            Exit
        Case $SCAN
            UPDATE()
    EndSwitch
WEnd
Func UPDATE()
    GUICtrlSetData($CLIENTLIST, "")
    Local $LIST = WinList("[CLASS:CLIENT]")
    For $I = 1 To $LIST[0][0]
        GUICtrlSetData($CLIENTLIST, $I - 1 & " - " & $LIST[$I][0], $I - 1 & " - " & $LIST[$I][0])
    Next
EndFunc
Func GETCLIENT()
    Local $X = StringSplit(GUICtrlRead($CLIENTLIST), " - ")
    Local $LIST = WinList("[CLASS:CLIENT]")
    Return $LIST[$X[1] + 1][1]
EndFunc
Func QUERSUMME($ZAHL)
    Local $SPLIT = StringSplit($ZAHL, "")
    $ZAHL = 0
    For $I = 1 To UBound($SPLIT) - 1
        $ZAHL = $ZAHL + $SPLIT[$I]
    Next
    Return $ZAHL
EndFunc

after compiling it my cpu usage is always high

Posted Image

what can i do to decrease the 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
 Share

  • Recently Browsing   0 members

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