Fenstergröße ermitteln

  • hi,

    wollte mal wissen wie ich von einem Fenster die größe ermitteln kann. Z.B. 1280x1024 oder 1024x768.

    MfG EmEx

  • cool danke.

    und wie kann ich das in eine If func packen also es soll ermittelt werden was für eine größe das fenster hat und dann z.b.
    if fenster aktiv und fenstergröße=1280x1024 than
    mach das und das
    else fenstergröße=1024x768
    mach das und das
    elseif pause

    also wenn fenster aktiv und größe von 1280x1024 mach das
    wenn fenster aktiv und größe von 1024x768 mach dies
    und wenn nichts zutrifft dann pause
    wenn ihr versteht was ich meine

  • Schau dir doch mal das Tutorial von peethebee an ;)

    Was du bracuhst ist:

    • If...Then...ElseIf...Else...EndIf
    • WinGetPos
    • WinActive oder WinExists
  • also das grund script ist dies

    Spoiler anzeigen
    [autoit]

    ProcessSetPriority("Multi acc skills.exe", 3)
    Opt("TrayIconHide", 1)

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

    ;~ HotKeySet

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

    send("{numlock on}")
    HotKeySet("1", "_skill1")
    HotKeySet("2", "_skill2")
    hotkeyset("3", "_skill3")
    hotkeyset("4", "_skill4")
    hotkeyset("5", "_skill5")
    hotkeyset("6", "_skill6")
    hotkeyset("7", "_skill7")
    hotkeyset("8", "_skill8")
    hotkeyset("9", "_skill9")
    hotkeyset("0", "_follow")
    hotkeyset("{f1}", "_f1slot")
    hotkeyset("{f2}", "_f2slot")
    hotkeyset("{f3}", "_f3slot")
    hotkeyset("{numpad0}", "_umbenenen_dekaron")
    hotkeyset("{numpad1}", "_umbenenen_dekaron_1")
    hotkeyset("{numpad2}", "_umbenenen_dekaron_2")
    hotkeyset("{numpad3}", "_umbenenen_dekaron_3")
    hotkeyset("{numpad4}", "_umbenenen_dekaron_4")
    hotkeyset("{numpad5}", "_umbenenen_dekaron_5")
    hotkeyset("{numpad6}", "_umbenenen_dekaron_6")
    hotkeyset("{numpad7}", "_umbenenen_dekaron_7")
    hotkeyset("{numpad8}", "_umbenenen_dekaron_8")
    hotkeyset("{numpad9}", "_umbenenen_dekaron_9")
    hotkeyset("{numpadsub}", "_klick_auf_mob")

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

    Call ("pause")

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

    Func pause()
    While 1
    Sleep(100)
    WEnd
    EndFunc

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

    ;~Fenstergröße ermitteln

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

    $dekaron1_size = WinGetPos("Dekaron 1 edit by EmEx")
    $dekaron2_size = WinGetPos("Dekaron 2 edit by EmEx")
    $dekaron3_size = WinGetPos("Dekaron 3 edit by EmEx")
    $dekaron4_size = WinGetPos("Dekaron 4 edit by EmEx")
    $dekaron5_size = WinGetPos("Dekaron 5 edit by EmEx")
    $dekaron6_size = WinGetPos("Dekaron 6 edit by EmEx")
    $dekaron7_size = WinGetPos("Dekaron 7 edit by EmEx")
    $dekaron8_size = WinGetPos("Dekaron 8 edit by EmEx")
    $dekaron9_size = WinGetPos("Dekaron 9 edit by EmEx")
    ;Dekaron Umbenenen

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

    Func _umbenenen_Dekaron()

    ControlSetText("Dekaron 1 edit by EmEx", "", "", "Dekaron" )
    ControlSetText("Dekaron 2 edit by EmEx", "", "", "Dekaron" )
    ControlSetText("Dekaron 3 edit by EmEx", "", "", "Dekaron" )
    ControlSetText("Dekaron 4 edit by EmEx", "", "", "Dekaron" )
    ControlSetText("Dekaron 5 edit by EmEx", "", "", "Dekaron" )
    ControlSetText("Dekaron 6 edit by EmEx", "", "", "Dekaron" )
    ControlSetText("Dekaron 7 edit by EmEx", "", "", "Dekaron" )
    ControlSetText("Dekaron 8 edit by EmEx", "", "", "Dekaron" )
    ControlSetText("Dekaron 9 edit by EmEx", "", "", "Dekaron" )

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

    EndFunc

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

    Func _umbenenen_Dekaron_1()

    ControlSetText("Dekaron", "", "", "Dekaron 1 edit by EmEx" )

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

    EndFunc

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

    Func _umbenenen_Dekaron_2()

    ControlSetText("Dekaron", "", "", "Dekaron 2 edit by EmEx" )

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

    EndFunc

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

    Func _umbenenen_Dekaron_3()

    ControlSetText("Dekaron", "", "", "Dekaron 3 edit by EmEx" )

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

    EndFunc

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

    Func _umbenenen_Dekaron_4()

    ControlSetText("Dekaron", "", "", "Dekaron 4 edit by EmEx" )

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

    EndFunc

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

    Func _umbenenen_Dekaron_5()

    ControlSetText("Dekaron", "", "", "Dekaron 5 edit by EmEx" )

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

    EndFunc

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

    Func _umbenenen_Dekaron_6()

    ControlSetText("Dekaron", "", "", "Dekaron 6 edit by EmEx" )

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

    EndFunc

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

    Func _umbenenen_Dekaron_7()

    ControlSetText("Dekaron", "", "", "Dekaron 7 edit by EmEx" )

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

    EndFunc

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

    Func _umbenenen_Dekaron_8()

    ControlSetText("Dekaron", "", "", "Dekaron 8 edit by EmEx" )

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

    EndFunc

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

    Func _umbenenen_Dekaron_9()

    ControlSetText("Dekaron", "", "", "Dekaron 9 edit by EmEx" )

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

    EndFunc

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

    ;Skills 1-9

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

    Func _skill1()
    If WinActive("Dekaron 1 edit by EmEx") Then
    ControlSend ( "Dekaron 1 edit by EmEx", "", "", "1")
    ControlSend ( "Dekaron 2 edit by EmEx", "", "", "1")
    ControlSend ( "Dekaron 3 edit by EmEx", "", "", "1")
    ControlSend ( "Dekaron 4 edit by EmEx", "", "", "1")
    ControlSend ( "Dekaron 5 edit by EmEx", "", "", "1")
    ControlSend ( "Dekaron 6 edit by EmEx", "", "", "1")
    ControlSend ( "Dekaron 7 edit by EmEx", "", "", "1")
    ControlSend ( "Dekaron 8 edit by EmEx", "", "", "1")
    ControlSend ( "Dekaron 9 edit by EmEx", "", "", "1")
    Else
    Call("_puffer")
    EndIf
    EndFunc

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

    Func _skill2()
    If WinActive("Dekaron 1 edit by EmEx") Then
    ControlSend ( "Dekaron 1 edit by EmEx", "", "", "2")
    ControlSend ( "Dekaron 2 edit by EmEx", "", "", "2")
    ControlSend ( "Dekaron 3 edit by EmEx", "", "", "2")
    ControlSend ( "Dekaron 4 edit by EmEx", "", "", "2")
    ControlSend ( "Dekaron 5 edit by EmEx", "", "", "2")
    ControlSend ( "Dekaron 6 edit by EmEx", "", "", "2")
    ControlSend ( "Dekaron 7 edit by EmEx", "", "", "2")
    ControlSend ( "Dekaron 8 edit by EmEx", "", "", "2")
    ControlSend ( "Dekaron 9 edit by EmEx", "", "", "2")
    Else
    Call("_puffer")
    EndIf
    EndFunc

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

    Func _skill3()
    If WinActive("Dekaron 1 edit by EmEx") Then
    ControlSend ( "Dekaron 1 edit by EmEx", "", "", "3")
    ControlSend ( "Dekaron 2 edit by EmEx", "", "", "3")
    ControlSend ( "Dekaron 3 edit by EmEx", "", "", "3")
    ControlSend ( "Dekaron 4 edit by EmEx", "", "", "3")
    ControlSend ( "Dekaron 5 edit by EmEx", "", "", "3")
    ControlSend ( "Dekaron 6 edit by EmEx", "", "", "3")
    ControlSend ( "Dekaron 7 edit by EmEx", "", "", "3")
    ControlSend ( "Dekaron 8 edit by EmEx", "", "", "3")
    ControlSend ( "Dekaron 9 edit by EmEx", "", "", "3")
    Else
    Call("_puffer")
    EndIf
    EndFunc

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

    Func _skill4()
    If WinActive("Dekaron 1 edit by EmEx") Then
    ControlSend ( "Dekaron 1 edit by EmEx", "", "", "4")
    ControlSend ( "Dekaron 2 edit by EmEx", "", "", "4")
    ControlSend ( "Dekaron 3 edit by EmEx", "", "", "4")
    ControlSend ( "Dekaron 4 edit by EmEx", "", "", "4")
    ControlSend ( "Dekaron 5 edit by EmEx", "", "", "4")
    ControlSend ( "Dekaron 6 edit by EmEx", "", "", "4")
    ControlSend ( "Dekaron 7 edit by EmEx", "", "", "4")
    ControlSend ( "Dekaron 8 edit by EmEx", "", "", "4")
    ControlSend ( "Dekaron 9 edit by EmEx", "", "", "4")
    Else
    Call("_puffer")
    EndIf
    EndFunc

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

    Func _skill5()
    If WinActive("Dekaron 1 edit by EmEx") Then
    ControlSend ( "Dekaron 1 edit by EmEx", "", "", "5")
    ControlSend ( "Dekaron 2 edit by EmEx", "", "", "5")
    ControlSend ( "Dekaron 3 edit by EmEx", "", "", "5")
    ControlSend ( "Dekaron 4 edit by EmEx", "", "", "5")
    ControlSend ( "Dekaron 5 edit by EmEx", "", "", "5")
    ControlSend ( "Dekaron 6 edit by EmEx", "", "", "5")
    ControlSend ( "Dekaron 7 edit by EmEx", "", "", "5")
    ControlSend ( "Dekaron 8 edit by EmEx", "", "", "5")
    ControlSend ( "Dekaron 9 edit by EmEx", "", "", "5")
    Else
    Call("_puffer")
    EndIf
    EndFunc

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

    Func _skill6()
    If WinActive("Dekaron 1 edit by EmEx") Then
    ControlSend ( "Dekaron 1 edit by EmEx", "", "", "6")
    ControlSend ( "Dekaron 2 edit by EmEx", "", "", "6")
    ControlSend ( "Dekaron 3 edit by EmEx", "", "", "6")
    ControlSend ( "Dekaron 4 edit by EmEx", "", "", "6")
    ControlSend ( "Dekaron 5 edit by EmEx", "", "", "6")
    ControlSend ( "Dekaron 6 edit by EmEx", "", "", "6")
    ControlSend ( "Dekaron 7 edit by EmEx", "", "", "6")
    ControlSend ( "Dekaron 8 edit by EmEx", "", "", "6")
    ControlSend ( "Dekaron 9 edit by EmEx", "", "", "6")
    Else
    Call("_puffer")
    EndIf
    EndFunc

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

    Func _skill7()
    If WinActive("Dekaron 1 edit by EmEx") Then
    ControlSend ( "Dekaron 1 edit by EmEx", "", "", "7")
    ControlSend ( "Dekaron 2 edit by EmEx", "", "", "7")
    ControlSend ( "Dekaron 3 edit by EmEx", "", "", "7")
    ControlSend ( "Dekaron 4 edit by EmEx", "", "", "7")
    ControlSend ( "Dekaron 5 edit by EmEx", "", "", "7")
    ControlSend ( "Dekaron 6 edit by EmEx", "", "", "7")
    ControlSend ( "Dekaron 7 edit by EmEx", "", "", "7")
    ControlSend ( "Dekaron 8 edit by EmEx", "", "", "7")
    ControlSend ( "Dekaron 9 edit by EmEx", "", "", "7")
    Else
    Call("_puffer")
    EndIf
    EndFunc

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

    Func _skill8()
    If WinActive("Dekaron 1 edit by EmEx") Then
    ControlSend ( "Dekaron 1 edit by EmEx", "", "", "8")
    ControlSend ( "Dekaron 2 edit by EmEx", "", "", "8")
    ControlSend ( "Dekaron 3 edit by EmEx", "", "", "8")
    ControlSend ( "Dekaron 4 edit by EmEx", "", "", "8")
    ControlSend ( "Dekaron 5 edit by EmEx", "", "", "8")
    ControlSend ( "Dekaron 6 edit by EmEx", "", "", "8")
    ControlSend ( "Dekaron 7 edit by EmEx", "", "", "8")
    ControlSend ( "Dekaron 8 edit by EmEx", "", "", "8")
    ControlSend ( "Dekaron 9 edit by EmEx", "", "", "8")
    Else
    Call("_puffer")
    EndIf
    EndFunc

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

    Func _skill9()
    If WinActive("Dekaron 1 edit by EmEx") Then
    ControlSend ( "Dekaron 1 edit by EmEx", "", "", "9")
    ControlSend ( "Dekaron 2 edit by EmEx", "", "", "9")
    ControlSend ( "Dekaron 3 edit by EmEx", "", "", "9")
    ControlSend ( "Dekaron 4 edit by EmEx", "", "", "9")
    ControlSend ( "Dekaron 5 edit by EmEx", "", "", "9")
    ControlSend ( "Dekaron 6 edit by EmEx", "", "", "9")
    ControlSend ( "Dekaron 7 edit by EmEx", "", "", "9")
    ControlSend ( "Dekaron 8 edit by EmEx", "", "", "9")
    ControlSend ( "Dekaron 9 edit by EmEx", "", "", "9")
    Else
    Call("_puffer")
    EndIf
    EndFunc

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

    ;F1-F3 Slots for Mana and HP

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

    Func _F1slot()
    If WinActive("Dekaron 1 edit by EmEx") Then
    ControlSend ( "Dekaron 1 edit by EmEx", "", "", "{F1}")
    ControlSend ( "Dekaron 2 edit by EmEx", "", "", "{F1}")
    ControlSend ( "Dekaron 3 edit by EmEx", "", "", "{F1}")
    ControlSend ( "Dekaron 4 edit by EmEx", "", "", "{F1}")
    ControlSend ( "Dekaron 5 edit by EmEx", "", "", "{F1}")
    ControlSend ( "Dekaron 6 edit by EmEx", "", "", "{F1}")
    ControlSend ( "Dekaron 7 edit by EmEx", "", "", "{F1}")
    ControlSend ( "Dekaron 8 edit by EmEx", "", "", "{F1}")
    ControlSend ( "Dekaron 9 edit by EmEx", "", "", "{F1}")
    Else
    Call("_puffer")
    EndIf
    EndFunc

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

    Func _F2slot()
    If WinActive("Dekaron 1 edit by EmEx") Then
    ControlSend ( "Dekaron 1 edit by EmEx", "", "", "{F2}")
    ControlSend ( "Dekaron 2 edit by EmEx", "", "", "{F2}")
    ControlSend ( "Dekaron 3 edit by EmEx", "", "", "{F2}")
    ControlSend ( "Dekaron 4 edit by EmEx", "", "", "{F2}")
    ControlSend ( "Dekaron 5 edit by EmEx", "", "", "{F2}")
    ControlSend ( "Dekaron 6 edit by EmEx", "", "", "{F2}")
    ControlSend ( "Dekaron 7 edit by EmEx", "", "", "{F2}")
    ControlSend ( "Dekaron 8 edit by EmEx", "", "", "{F2}")
    ControlSend ( "Dekaron 9 edit by EmEx", "", "", "{F2}")
    Else
    Call("_puffer")
    EndIf
    EndFunc

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

    Func _F3slot()
    If WinActive("Dekaron 1 edit by EmEx") Then
    ControlSend ( "Dekaron 1 edit by EmEx", "", "", "{F3}")
    ControlSend ( "Dekaron 2 edit by EmEx", "", "", "{F3}")
    ControlSend ( "Dekaron 3 edit by EmEx", "", "", "{F3}")
    ControlSend ( "Dekaron 4 edit by EmEx", "", "", "{F3}")
    ControlSend ( "Dekaron 5 edit by EmEx", "", "", "{F3}")
    ControlSend ( "Dekaron 6 edit by EmEx", "", "", "{F3}")
    ControlSend ( "Dekaron 7 edit by EmEx", "", "", "{F3}")
    ControlSend ( "Dekaron 8 edit by EmEx", "", "", "{F3}")
    ControlSend ( "Dekaron 9 edit by EmEx", "", "", "{F3}")
    Else
    Call("_puffer")
    EndIf
    EndFunc

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

    ;Follow auf den ersten in PT.

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

    Func _follow()
    If WinActive("Dekaron 1 edit by EmEx") Then
    ControlClick ( "Dekaron 2 edit by EmEx", "", "", "left","1",1268, 248)
    ControlClick ( "Dekaron 3 edit by EmEx", "", "", "left","1",1268, 248)
    ControlClick ( "Dekaron 4 edit by EmEx", "", "", "left","1",1268, 248)
    ControlClick ( "Dekaron 5 edit by EmEx", "", "", "left","1",1268, 248)
    ControlClick ( "Dekaron 6 edit by EmEx", "", "", "left","1",1268, 248)
    ControlClick ( "Dekaron 7 edit by EmEx", "", "", "left","1",1268, 248)
    ControlClick ( "Dekaron 8 edit by EmEx", "", "", "left","1",1268, 248)
    ControlClick ( "Dekaron 9 edit by EmEx", "", "", "left","1",1268, 248)
    Else
    Call("_puffer")
    EndIf
    EndFunc

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

    ;Klick auf Mob

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

    Func _Klick_auf_Mob()
    If WinActive("Dekaron 1 edit by EmEx") Then
    ;ertser Klick
    ControlClick ( "Dekaron 2 edit by EmEx", "", "", "left","1",760, 729)
    ControlClick ( "Dekaron 3 edit by EmEx", "", "", "left","1",760, 729)
    ControlClick ( "Dekaron 4 edit by EmEx", "", "", "left","1",760, 729)
    ControlClick ( "Dekaron 5 edit by EmEx", "", "", "left","1",760, 729)
    ControlClick ( "Dekaron 6 edit by EmEx", "", "", "left","1",760, 729)
    ControlClick ( "Dekaron 7 edit by EmEx", "", "", "left","1",760, 729)
    ControlClick ( "Dekaron 8 edit by EmEx", "", "", "left","1",760, 729)
    ControlClick ( "Dekaron 9 edit by EmEx", "", "", "left","1",760, 729)
    ;zweiter Klick
    ControlClick ( "Dekaron 2 edit by EmEx", "", "", "left","1",471, 513)
    ControlClick ( "Dekaron 3 edit by EmEx", "", "", "left","1",471, 513)
    ControlClick ( "Dekaron 4 edit by EmEx", "", "", "left","1",471, 513)
    ControlClick ( "Dekaron 5 edit by EmEx", "", "", "left","1",471, 513)
    ControlClick ( "Dekaron 6 edit by EmEx", "", "", "left","1",471, 513)
    ControlClick ( "Dekaron 7 edit by EmEx", "", "", "left","1",471, 513)
    ControlClick ( "Dekaron 8 edit by EmEx", "", "", "left","1",471, 513)
    ControlClick ( "Dekaron 9 edit by EmEx", "", "", "left","1",471, 513)
    ;dritter Klick
    ControlClick ( "Dekaron 2 edit by EmEx", "", "", "left","1",639, 614)
    ControlClick ( "Dekaron 3 edit by EmEx", "", "", "left","1",639, 614)
    ControlClick ( "Dekaron 4 edit by EmEx", "", "", "left","1",639, 614)
    ControlClick ( "Dekaron 5 edit by EmEx", "", "", "left","1",639, 614)
    ControlClick ( "Dekaron 6 edit by EmEx", "", "", "left","1",639, 614)
    ControlClick ( "Dekaron 7 edit by EmEx", "", "", "left","1",639, 614)
    ControlClick ( "Dekaron 8 edit by EmEx", "", "", "left","1",639, 614)
    ControlClick ( "Dekaron 9 edit by EmEx", "", "", "left","1",639, 614)
    Else
    Call("_puffer")
    EndIf

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

    EndFunc

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

    Func _puffer()
    While 1
    Sleep(100)
    WEnd
    EndFunc

    [/autoit]

    und das soll nun ganz unten wo er die clicks macht auf zwei verschiedene größen funzen einmal 1280x1024 und 1024x 768.

    P.S. ist kein BOT