1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. name22

Beiträge von name22

  • Script - 14 Mausklicks + Pause - Wie Hidden laufen lassen - Alter Thread, Neue Frage

    • name22
    • 13. April 2010 um 21:34

    Überprüfe die Rückgabewerte der ControlClicks. ;)

  • Grafiken

    • name22
    • 13. April 2010 um 20:56

    Freeware: GIMP
    Tutorials: Google :D

  • Öffnen einer neuen GUI

    • name22
    • 13. April 2010 um 19:56

    Entweder ein neues Fenster mit GUICreate erstellen oder vorher erstellen und auf Knopfdruck mit GUISetState sichtbar machen.

  • Mauskoordinaten berechnen wenn Auflösung anders?

    • name22
    • 13. April 2010 um 19:14

    Da fehlt ja auch ein Dim/Global/Local vor der deklaration des Array. :D

  • Main menu

    • name22
    • 13. April 2010 um 16:49

    So meinst du?

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 625, 445, 192, 124)
    $Menu1 = GUICtrlCreateMenu("Menu1")
    $MenuItem1 = GUICtrlCreateMenuItem("MenuItem1", $Menu1)
    $Menu2 = GUICtrlCreateMenu("Menu1")
    $MenuItem2 = GUICtrlCreateMenuItem("MenuItem1", $Menu2)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $MenuItem1
    MsgBox(0,"","Item1")
    Case $MenuItem2
    MsgBox(0,"","Item2")
    EndSwitch
    WEnd

    [/autoit]
  • Win Maximizer

    • name22
    • 13. April 2010 um 15:39
    Zitat

    schon mal danke aber ich würde gerne Ovale Buttons machen


    Wo liegt dann das Problem? :P
    Ovale Buttons sind auch möglich, nur funktioniert dann meine _PointIsInCircle Funktion nicht mehr, oder zumindest ist sie nicht mehr genau. ;)
    Also müsstest du mithilfe eines imaginären Rechtecks auf Buttonklicks regieren.

  • Script - 14 Mausklicks + Pause - Wie Hidden laufen lassen - Alter Thread, Neue Frage

    • name22
    • 13. April 2010 um 15:11

    Du hast schon wieder die "" vergessen. ^^

  • Script - 14 Mausklicks + Pause - Wie Hidden laufen lassen - Alter Thread, Neue Frage

    • name22
    • 13. April 2010 um 14:50

    Das Anzeigebereich für Webseiten im Mozilla Firefox ist auch ein Control, und ich habe mit dem Window Info Tool das hier gefunden: "[CLASS:MozillaWindowClass; INSTANCE:2]".
    Probier mal die ControlID durch das hier zu ersetzen. ;)
    Mir fällt da gerade was auf...

    [autoit]

    ControlClick ( "Tickets zur FIFA WM 2010™ inkl. Flug + Übernachtung zu gewinnen - auf CokeFridge! - Mozilla Firefox", "", 11280760 ,>>>> left<<<< , 1 , 823 , 564)

    [/autoit]


    :whistling:

    Edit: 3 Minuten verspätung... :D

  • Script - 14 Mausklicks + Pause - Wie Hidden laufen lassen - Alter Thread, Neue Frage

    • name22
    • 13. April 2010 um 13:22

    Schau dir den Befehl ControlClick an. ;)
    Ein gutes Beispiel dazu findest du auch in der Hilfe.

  • Erkennt ihr alle Avatare/ Signaturbilder wieder?

    • name22
    • 12. April 2010 um 22:00

    Und ich habe nur einen: name22. :D
    Wie ich darauf gekommen bin weiß ich bis heute nicht. ?(

  • Win Maximizer

    • name22
    • 12. April 2010 um 21:56
    Zitat

    Und ich würde davon gern ein Beispielskript sehen :D


    Wenns denn sein muss. :rolleyes:

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <GUIConstants.au3>

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

    Opt("GUIOnEventMode", 1)
    Opt("MouseCoordMode", 2)

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

    $iGUIWidth = 400
    $iGUIHeight = 400
    $GUIColorBG = 0xFFFFFFFF

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

    $iX_Button1 = 10
    $iY_Button1 = 10
    $iWidth_Button1 = 50
    $iHeight_Button1 = 50

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

    $iX_Button2 = 70
    $iY_Button2 = 10
    $iWidth_Button2 = 50
    $iHeight_Button2 = 50

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

    $sString_Button1 = "1"
    $sString_Button2 = "2"

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

    $hWnd = GUICreate("Test", $iGUIWidth, $iGUIHeight)
    GUISetState()

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

    _GDIPlus_Startup()

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

    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iGUIWidth, $iGUIHeight, $hGraphic)
    $hBuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _GDIPlus_GraphicsSetSmoothingMode($hBuffer, 2)
    _GDIPlus_GraphicsClear($hGraphic, $GUIColorBG)

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

    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate("Tahoma")
    $hFont = _GDIPlus_FontCreate($hFamily, 16)

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

    $aInfoString1 = _GDIPlus_GraphicsMeasureString($hBuffer, $sString_Button1, $hFont, _GDIPlus_RectFCreate(), $hFormat)
    $aInfoString2 = _GDIPlus_GraphicsMeasureString($hBuffer, $sString_Button2, $hFont, _GDIPlus_RectFCreate(), $hFormat)

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

    $iStringWidth_Button1 = Ceiling(DllStructGetData($aInfoString1[0], "Width"))
    $iStringHeight_Button1 = Ceiling(DllStructGetData($aInfoString1[0], "Height"))
    $iStringWidth_Button2 = Ceiling(DllStructGetData($aInfoString2[0], "Width"))
    $iStringHeight_Button2 = Ceiling(DllStructGetData($aInfoString2[0], "Height"))

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

    $tLayout_Button1 = _GDIPlus_RectFCreate($iX_Button1 + $iWidth_Button1 / 2 - $iStringWidth_Button1 / 2, $iY_Button1 + $iHeight_Button1 / 2 - $iStringHeight_Button1 / 2)
    $tLayout_Button2 = _GDIPlus_RectFCreate($iX_Button2 + $iWidth_Button2 / 2 - $iStringWidth_Button2 / 2, $iY_Button2 + $iHeight_Button2 / 2 - $iStringHeight_Button2 / 2)

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

    $hBrush_Button1 = _GDIPlus_LineBrushCreate($iX_Button1, $iY_Button1, $iX_Button1 + $iWidth_Button1, $iY_Button1 + $iHeight_Button1, 0xFF00FF00, 0xFF000000)
    $hBrush_Button2 = _GDIPlus_LineBrushCreate($iX_Button2, $iY_Button2, $iX_Button2 + $iWidth_Button2, $iY_Button2 + $iHeight_Button2, 0xFFFF0000, 0xFF000000)
    $hBrushText = _GDIPlus_BrushCreateSolid(0xFF0F0F0F)

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

    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
    GUISetOnEvent($GUI_EVENT_PRIMARYDOWN, "_PDown")

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

    While 1
    _GDIPlus_GraphicsClear($hBuffer, $GUIColorBG)
    _GDIPlus_GraphicsFillEllipse($hBuffer, $iX_Button1, $iY_Button1, $iWidth_Button1, $iHeight_Button1, $hBrush_Button1)
    _GDIPlus_GraphicsFillEllipse($hBuffer, $iX_Button2, $iY_Button2, $iWidth_Button2, $iHeight_Button2, $hBrush_Button2)
    _GDIPlus_GraphicsDrawStringEx($hBuffer, $sString_Button1, $hFont, $tLayout_Button1, $hFormat, $hBrushText)
    _GDIPlus_GraphicsDrawStringEx($hBuffer, $sString_Button2, $hFont, $tLayout_Button2, $hFormat, $hBrushText)
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $iGUIWidth, $iGUIHeight)
    WEnd

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

    Func _PDown()
    $aMousePos = MouseGetPos()
    If _PointIsInCircle($aMousePos[0], $aMousePos[1], $iX_Button1 + $iWidth_Button1 / 2, $iY_Button1 + $iHeight_Button1 / 2, $iWidth_Button1 / 2) <> -1 Then MsgBox(64, "Info", "Button 1 wurde geklickt")
    If _PointIsInCircle($aMousePos[0], $aMousePos[1], $iX_Button2 + $iWidth_Button2 / 2, $iY_Button2 + $iHeight_Button2 / 2, $iWidth_Button2 / 2) <> -1 Then MsgBox(64, "Info", "Button 2 wurde geklickt")
    EndFunc

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

    Func _PointIsInCircle($iX_Point, $iY_Point, $iX_Circle, $iY_Circle, $iRadius_Circle)
    $iDistPoints = _GetPointsDistance($iX_Point, $iY_Point, $iX_Circle, $iY_Circle)
    If ($iRadius_Circle > 0 And $iDistPoints < $iRadius_Circle) Or ($iRadius_Circle < 0 And $iDistPoints > $iRadius_Circle) Or $iDistPoints = 0 Then Return $iDistPoints
    Return -1
    EndFunc ;==>_PointIsInCircle

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

    Func _GetPointsDistance($iPointX1, $iPointY1, $iPointX2, $iPointY2)
    Return Sqrt(($iPointX1 - $iPointX2) ^ 2 + ($iPointY1 - $iPointY2) ^ 2)
    EndFunc ;==>_GetPointsDistance

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

    Func _Exit()
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_GraphicsDispose($hBuffer)
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_BrushDispose($hBrush_Button1)
    _GDIPlus_BrushDispose($hBrush_Button2)
    _GDIPlus_BrushDispose($hBrushText)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>_Exit

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _GDIPlus_LineBrushCreate
    ; Description ...: Creates a LinearGradientBrush object from a set of boundary points and boundary colors
    ; Syntax.........: _GDIPlus_LineBrushCreate($nX1, $nY1, $nX2, $nY2, $iARGBClr1, $iARGBClr2[, $iWrapMode = 0])
    ; Parameters ....: $nX1 - X coordinate of the starting point of the gradient. The starting boundary line passes through the
    ; +starting point
    ; $nY1 - Y coordinate of the starting point of the gradient. The starting boundary line passes through the
    ; +starting point
    ; $nX2 - X coordinate of the ending point of the gradient. The ending boundary line passes through the
    ; +ending point
    ; $nY2 - Y coordinate of the ending point of the gradient. The ending boundary line passes through the
    ; +ending point
    ; $iARGBClr1 - Alpha, Red, Green and Blue components of the starting color of the line
    ; $iARGBClr2 - Alpha, Red, Green and Blue components of the ending color of the line
    ; $iWrapMode - Wrap mode that specifies how areas filled with the brush are tiled:
    ; |0 - Tiling without flipping
    ; |1 - Tiles are flipped horizontally as you move from one tile to the next in a row
    ; |2 - Tiles are flipped vertically as you move from one tile to the next in a column
    ; |3 - Tiles are flipped horizontally as you move along a row and flipped vertically as you move along a column
    ; |4 - No tiling takes place
    ; Return values .: Success - Pointer to a new LinearGradientBrush object
    ; Failure - 0 and either:
    ; |@error and @extended are set if DllCall failed
    ; |$GDIP_STATUS contains a non zero value specifying the error code
    ; Remarks .......: After you are done with the object, call _GDIPlus_BrushDispose to release the object resources
    ; Related .......: _GDIPlus_BrushDispose
    ; Link ..........; @@MsdnLink@@ GdipCreateLineBrush
    ; Example .......; No
    ; ===============================================================================================================================
    Func _GDIPlus_LineBrushCreate($nX1, $nY1, $nX2, $nY2, $iARGBClr1, $iARGBClr2, $iWrapMode = 0)
    Local $tPointF1, $pPointF1
    Local $tPointF2, $pPointF2
    Local $aResult

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

    $tPointF1 = DllStructCreate("float;float")
    $pPointF1 = DllStructGetPtr($tPointF1)
    $tPointF2 = DllStructCreate("float;float")
    $pPointF2 = DllStructGetPtr($tPointF2)

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

    DllStructSetData($tPointF1, 1, $nX1)
    DllStructSetData($tPointF1, 2, $nY1)
    DllStructSetData($tPointF2, 1, $nX2)
    DllStructSetData($tPointF2, 2, $nY2)

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

    $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateLineBrush", "ptr", $pPointF1, "ptr", $pPointF2, "uint", $iARGBClr1, "uint", $iARGBClr2, "int", $iWrapMode, "int*", 0)

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

    If @error Then Return SetError(@error, @extended, 0)
    $GDIP_STATUS = $aResult[0]
    Return $aResult[6]
    EndFunc ;==>_GDIPlus_LineBrushCreate

    [/autoit]
  • Mein allererstes GDI+ Script

    • name22
    • 12. April 2010 um 21:08

    Für dein erstes Script ist das doch echt gut gelungen. ^^
    Schau dir doch mal das Beispiel für eine analoge Uhr im AutoIt Ordner unter Examples oder so an. Das ist auch mit GDI+ gemacht.
    Jetzt fehlen vielleicht noch Zahlen und Minutenstriche. :P

  • Bilder in Variablen speichern

    • name22
    • 12. April 2010 um 20:26

    Das macht man auch mit GDI+ hier mal meine Bildschirmlupe als Beispiel.

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <GUIConstants.au3>
    #include <WindowsConstants.au3>
    #include <ScreenCapture.au3>

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

    $iGUIWidth = 100
    $iGUIHeight = 100
    $iCaptureWidth = 50
    $iCaptureHeight = 50

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

    $hWnd = GUICreate("Test", $iGUIWidth, $iGUIHeight, -1, -1, $WS_POPUP, $WS_EX_TOPMOST)
    GUISetState()

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

    _GDIPlus_Startup()

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

    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iGUIWidth, $iGUIHeight, $hGraphic)
    $hBuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)

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

    $PosOld = MouseGetPos()
    _ReDraw($PosOld[0], $PosOld[1])

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

    HotKeySet("{ESC}", "_Exit")

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

    While 1
    $nMsg = GUIGetMsg(1)
    Switch $nMsg[0]
    Case $GUI_EVENT_CLOSE
    _Exit()
    EndSwitch
    If Not ($PosOld[0] = MouseGetPos(0) And $PosOld[1] = MouseGetPos(1)) Then
    _ReDraw($PosOld[0], $PosOld[1])
    $PosOld[0] = MouseGetPos(0)
    $PosOld[1] = MouseGetPos(1)
    EndIf
    WEnd

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

    Func _ReDraw($PosX, $PosY)
    WinMove($hWnd, "", $PosX + $iCaptureWidth / 2 + 2, $PosY + $iCaptureHeight / 2 + 2)
    $HBITMAP_Capture = _ScreenCapture_Capture("", $PosX - $iCaptureWidth / 2, $PosY - $iCaptureHeight / 2, $PosX + $iCaptureWidth / 2, $PosY + $iCaptureHeight / 2, False)
    $hBitmap_Capture = _GDIPlus_BitmapCreateFromHBITMAP($HBITMAP_Capture)
    _GDIPlus_GraphicsDrawImageRect($hBuffer, $hBitmap_Capture, 0, 0, $iGUIWidth, $iGUIHeight)
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $iGUIWidth, $iGUIHeight)
    _GDIPlus_BitmapDispose($hBitmap_Capture)
    _WinAPI_DeleteObject($HBITMAP_Capture)
    EndFunc ;==>_ReDraw

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

    Func _Exit()
    AdlibUnRegister()
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_GraphicsDispose($hBuffer)
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>_Exit

    [/autoit]
  • Win Maximizer

    • name22
    • 12. April 2010 um 19:27

    Ich würde ja ein paar schöne Buttons mit Farbverlauf mit GDI+ zeichnen. :D

  • Bilder in Variablen speichern

    • name22
    • 12. April 2010 um 19:18
    [autoit]

    $Var = _ScreenCapture_Capture()

    [/autoit]


    Aber danach mit

    [autoit]

    _WinAPI_DeleteObject($Var)

    [/autoit]


    wieder löschen.;)

  • Haloo

    • name22
    • 12. April 2010 um 19:08
    Zitat

    P.S. Nein, ich bin kein Botter...


    Na dann... Herzlich Willkommen im Forum. :thumbup:

  • FunnySmiley

    • name22
    • 12. April 2010 um 19:04

    Ich find' ihn auch cool. :thumbup:
    Ist doch ein prima Beispiel für.. für... naja mir fällt jetzt nichts ein, aber es ist bestimmt zu gebrauchen. :D

  • Haaalllooo

    • name22
    • 12. April 2010 um 18:57

    So, jetzt muss ich aber auch noch was dazu schreiben. ^^
    Ich habe meinen ersten Computer mit 5 bekommen und zwar einen uralten Mac. :D
    Später als ich einen mehr oder weniger funktionsfähigen PC hatte hab ich dann angefangen kleinere Batch Scripts zu schreiben. :rolleyes:
    Ich kenne AutoIt seit ungefähr einem Jahr, aber ich beschäftige mich erst seit Kurzem intensiv damit. :P

  • Doodle Jump für Pc

    • name22
    • 12. April 2010 um 17:45

    AutoIt installieren oder das Script starten? :D

  • MP3 Player

    • name22
    • 12. April 2010 um 17:44

    Du musst auch einen Ordner angeben der unterstützte Musikdateien enthält. :cursing:
    Das kann man auch in der Anleitung lesen!

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™