kleine Hilfe für function anbindung...

  • so, Hi ich brauch mal wieder Hilfe

    ich will diessen script bzw diese function erweitern.

    [autoit]

    While 1
    SetConsole("(Re)Starting SilkraodCaptcha.")
    ProcessExists("SilkroadCaptcha.exe")
    ProcessClose("SilkroadCaptcha.exe")
    SetConsole("(Re)Starting SilkRoad online.")
    If $Restart = 1 Then
    Run ($CRoadPath & "\" & $CRoadExe)
    run($Path & "\silkroad.exe")
    $Restart = 0
    EndIf

    [/autoit][autoit][/autoit][autoit]

    Do
    Sleep(1000)
    UntilWinActive ("Silkroad Online Launcher")
    SetConsole("SilkRoad Launcher found.")
    Sleep ($LDelay)
    ControlClick("Silkroad Online Launcher","","Button1")

    [/autoit][autoit][/autoit][autoit]

    Do
    Sleep (5000)
    Until WinActive ("SRO_Client")
    SetConsole("SilkRoad Client found.")
    Sleep ($CDelay)
    MouseClick ("Left", 400, 300, 1, 0)
    Sleep (500)
    MouseClick ("Left", 756, 482, 1, 0)
    SetConsole("Sending account information.")
    Sleep (500)
    Send ($Account)
    Sleep ($ADelay)
    Send ("{TAB}")
    Send ($Password)
    Sleep ($PDelay)
    MouseClick ("Left", 660, 611, 1, 0)
    SetConsole("Starting login sequence")

    [/autoit][autoit][/autoit][autoit]

    If PixelGetCOlor (626, 334) = 0 Then
    Do
    MouseClick ("Left", 400, 300, 1, 0)
    Sleep ($KDelay)
    Send ("{Enter}")
    Until PixelGetCOlor (626, 334) <> 0
    Sleep (2000)
    Send ("{Enter}")
    Sleep ($RDelay)

    If WinExists ("SRO_Client") = 1 Then
    SetConsole("GL HF , you got in;]")
    ExitLoop
    Else
    $Restart = 1
    SetConsole("Disconnected ,restarting.")
    ContinueLoop
    EndIf
    EndIf
    Wend
    EndSelect
    WEnd

    [/autoit]

    hier mit

    das ganze ist so gesehen auflösungs kontrolle, wenn so und so eine positon von pixel stimt dan soll er das script weiter ausführen mit einer bestimter ausgabe die schon vorgegeben ist.

    das ganze muss Oben in Script rein nach der Zeile 17.

    [autoit]

    Func START()
    While 1
    If PixelGetColor("27", "585") = 16744576 Then
    Sleep(2000)
    LOGIN()
    RELOG800X600()
    ExitLoop
    ElseIf PixelGetColor("27", "753") = 16744576 Then
    Sleep(2000)
    LOGIN()
    RELOG1024X768()
    ExitLoop
    ElseIf PixelGetColor("24", "1007") = 16744576 Then
    Sleep(2000)
    LOGIN()
    RELOG1280X1024()
    ExitLoop
    ElseIf PixelGetColor("24", "884") = 16744576 Then
    Sleep(2000)
    LOGIN()
    RELOG1440X900()
    ExitLoop
    EndIf
    WEnd
    EndFunc

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    Func RELOG800X600()
    While ProcessExists("sro_client")
    $MSG = GUIGetMsg()
    Select
    Case $MSG = $GUI_EVENT_CLOSE Or $MSG = $BUTTON1
    Exit
    While 1
    $NMSG = GUIGetMsg()
    Switch $NMSG
    Case $GUI_EVENT_CLOSE
    GUIDelete()
    ExitLoop
    Case $BUTTON13
    GUIDelete()
    ExitLoop
    EndSwitch
    WEnd
    EndSelect
    If PixelGetColor("36", "547") = 16705867 Then
    MouseMove(343, 477, 0)
    MouseClick("left")
    Sleep(4000)
    EndIf
    If PixelGetColor("678", "547") = 8283706 Then
    ExitLoop
    EndIf
    WEnd
    EndFunc

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    Func RELOG1024X768()
    While ProcessExists("sro_client")
    $MSG = GUIGetMsg()
    Select
    Case $MSG = $GUI_EVENT_CLOSE Or $MSG = $BUTTON1
    Exit
    While 1
    $NMSG = GUIGetMsg()
    Switch $NMSG
    Case $GUI_EVENT_CLOSE
    GUIDelete()
    ExitLoop
    Case $BUTTON13
    GUIDelete()
    ExitLoop
    EndSwitch
    WEnd
    EndSelect
    If PixelGetColor("45", "693") = 16705867 Then
    MouseMove(459, 560, 0) ;Connect drücken
    MouseClick("left")
    Sleep(4000)
    EndIf
    If PixelGetColor("902", "692") = 8612417 Then
    ExitLoop
    EndIf
    WEnd
    EndFunc

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    Func RELOG1280X1024()
    While ProcessExists("sro_client")
    $MSG = GUIGetMsg()
    Select
    Case $MSG = $GUI_EVENT_CLOSE Or $MSG = $BUTTON1
    Exit
    While 1
    $NMSG = GUIGetMsg()
    Switch $NMSG
    Case $GUI_EVENT_CLOSE
    GUIDelete()
    ExitLoop
    Case $BUTTON13
    GUIDelete()
    ExitLoop
    EndSwitch
    WEnd
    EndSelect
    If PixelGetColor("45", "911") = 16705867 Then
    MouseMove(586, 690, 0) ;Connect drücken
    MouseClick("left")
    Sleep(4000)
    EndIf
    If PixelGetColor("1159", "913") = 14799282 Then
    ExitLoop
    EndIf
    WEnd
    EndFunc

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    Func RELOG1440X900()
    While ProcessExists("sro_client")
    $MSG = GUIGetMsg()
    Select
    Case $MSG = $GUI_EVENT_CLOSE Or $MSG = $BUTTON1
    Exit
    While 1
    $NMSG = GUIGetMsg()
    Switch $NMSG
    Case $GUI_EVENT_CLOSE
    GUIDelete()
    ExitLoop
    Case $BUTTON13
    GUIDelete()
    ExitLoop
    EndSwitch
    WEnd
    EndSelect
    If PixelGetColor("45", "911") = 16705867 Then
    MouseMove(667, 628, 0) ;Connect drücken
    MouseClick("left")
    Sleep(4000)
    EndIf
    If PixelGetColor("1159", "913") = 14799282 Then
    ExitLoop
    EndIf
    WEnd
    EndFunc

    [/autoit]

    Danke schon mal