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

  • _GDI+_MatrixRotate

    • name22
    • 1. März 2011 um 21:28

    Kannst du mal das Script zeigen, oder einen relevanten Ausschnitt daraus? Ich weiß im Moment nämlich nicht einmal wie du was auf die GUI zeichnest...

  • _GDI+_MatrixRotate

    • name22
    • 1. März 2011 um 21:02

    Ich glaube er meint

    [autoit]

    _GDIPlus_GraphicsClear()

    [/autoit]


    Mit _GDIPlus_imageDispose entfernst du ein mit GDI+ geladenes Bild aus dem Arbeitsspeicher, und das wäre in diesem Fall eher geringfügig sinnvoll. ;)

  • GDI+ Auf Desktop/Bildschirm zeichnen.

    • name22
    • 1. März 2011 um 21:00

    BadBunny hat mich in der Shoutbox gefragt wie man Kreise auf ein transparentes Fenster malen könnte, um so wie bei Paint o.Ä. zu malen. (Ich hoffe ich hab das richtig verstanden :S ).
    Naja, hier ist das Script. Gezeichnet wird übrigens durch Gedrückthalten der Strg Taste, während ihr mit Entfernen alles löschen könnt. Viel Spaß :D!

    Edit: P.S: Mit Escape könnt ihr das Script beenden :whistling: ...

    Spoiler anzeigen
    [autoit]

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

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

    ; - Author: name22 (http://www.autoit.de)

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

    Opt("GUIOnEventMode", 1)
    OnAutoItExitRegister("_Close")

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

    $vUser32DLL = DllOpen("User32.dll")

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

    $iGUIWidth = @DesktopWidth
    $iGUIHeight = @DesktopHeight

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

    $tSize = DllStructCreate($tagSIZE)
    $pSize = DllStructGetPtr($tSize)
    DllStructSetData($tSize, "X", $iGUIWidth)
    DllStructSetData($tSize, "Y", $iGUIHeight)
    $tSource = DllStructCreate($tagPOINT)
    $pSource = DllStructGetPtr($tSource)
    $tBlend = DllStructCreate($tagBLENDFUNCTION)
    $pBlend = DllStructGetPtr($tBlend)
    DllStructSetData($tBlend, "Alpha", 255)
    DllStructSetData($tBlend, "Format", 1)

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

    $hWnd = GUICreate("", $iGUIWidth, $iGUIHeight, 0, 0, BitOR(0x80000000, 0x08000000), BitOR(0x00080000, 0x00000008, 0x00000080))
    GUISetState()

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

    $hDC_Window = _WinAPI_GetDC($hWnd)
    $hDC_Buffer = _WinAPI_CreateCompatibleDC($hDC_Window)
    $hBitmap_Buffer = _WinAPI_CreateCompatibleBitmap($hDC_Window, $iGUIWidth, $iGUIHeight)
    _WinAPI_SelectObject($hDC_Buffer, $hBitmap_Buffer)

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

    _GDIPlus_Startup()

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

    $hGraphics = _GDIPlus_GraphicsCreateFromHDC($hDC_Buffer)
    _GDIPlus_GraphicsSetSmoothingMode($hGraphics, 2)

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

    $hPen_Draw = _GDIPlus_PenCreate(0xFF000000, 15)
    _GDIPlus_PenSetLineCap($hPen_Draw, 0x02, 0x02, 2)

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

    GUISetOnEvent($GUI_EVENT_CLOSE, "_Close", $hWnd)
    HotKeySet("{DELETE}", "_Erase")
    HotKeySet("{ESC}", "_Close")

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

    $aMousePos = MouseGetPos()
    $aMousePos_Old = MouseGetPos()

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

    While Sleep(15)
    $aMousePos = MouseGetPos()
    Switch True
    Case _IsPressed("11", $vUser32DLL)
    Switch True
    Case $aMousePos[0] <> $aMousePos_Old[0] Or $aMousePos[1] <> $aMousePos_Old[1]
    _GDIPlus_GraphicsDrawLine($hGraphics, $aMousePos_Old[0], $aMousePos_Old[1], $aMousePos[0], $aMousePos[1], $hPen_Draw)
    EndSwitch
    EndSwitch

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

    $aMousePos_Old = $aMousePos

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

    _WinAPI_UpdateLayeredWindow($hWnd, $hDC_Window, 0, $pSize, $hDC_Buffer, $pSource, 0, $pBlend, 2)
    WEnd

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

    Func _Erase()
    _GDIPlus_GraphicsClear($hGraphics, 0x00000000)
    EndFunc

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

    Func _Close()
    _WinAPI_ReleaseDC($hWnd, $hDC_Window)
    _WinAPI_DeleteDC($hDC_Buffer)
    _WinAPI_DeleteObject($hBitmap_Buffer)

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

    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_PenDispose($hPen_Draw)
    _GDIPlus_Shutdown()

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

    DllClose($vUser32DLL)
    Exit
    EndFunc

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

    #region "GDIP.au3 Functions"
    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _GDIPlus_PenSetLineCap
    ; Description ...: Sets the cap styles for the start, end, and dashes in a line drawn with the pen
    ; Syntax.........: _GDIPlus_PenSetLineCap($hPen, $iStartCap, $iEndCap, $iDashCap)
    ; Parameters ....: $hPen - Pointer to a Pen object
    ; $iStartCap - Line cap style for the start cap:
    ; |0x00 - Line ends at the last point. The end is squared off
    ; |0x01 - Square cap. The center of the square is the last point in the line. The height
    ; +and width of the square are the line width.
    ; |0x02 - Circular cap. The center of the circle is the last point in the line. The diameter
    ; +of the circle is the line width.
    ; |0x03 - Triangular cap. The base of the triangle is the last point in the line. The base
    ; +of the triangle is the line width.
    ; |0x10 - Line ends are not anchored.
    ; |0x11 - Line ends are anchored with a square. The center of the square is the last point in
    ; +the line. The height and width of the square are the line width.
    ; |0x12 - Line ends are anchored with a circle. The center of the circle is at the last point
    ; +in the line. The circle is wider than the line.
    ; |0x13 - Line ends are anchored with a diamond (a square turned at 45 degrees). The center of the diamond is at
    ; +the last point in the line. The diamond is wider than the line.
    ; |0x14 - Line ends are anchored with arrowheads. The arrowhead point is located at the last
    ; +point in the line. The arrowhead is wider than the line.
    ; |0xff - Line ends are made from a CustomLineCap object
    ; $iEndCap - Line cap style for the end cap (same values as $iStartCap)
    ; $iDashCap - Start and end caps for a dashed line:
    ; |0 - A square cap that squares off both ends of each dash
    ; |2 - A circular cap that rounds off both ends of each dash
    ; |3 - A triangular cap that points both ends of each dash
    ; Return values .: Success - True
    ; Failure - False and either:
    ; |@error and @extended are set if DllCall failed
    ; |$GDIP_STATUS contains a non zero value specifying the error code
    ; Remarks .......: None
    ; Related .......: _GDIPlus_PenSetDashCap, _GDIPlus_PenSetEndCap, _GDIPlus_PenSetStartCap
    ; Link ..........; @@MsdnLink@@ GdipSetPenLineCap197819
    ; Example .......; No
    ; ===============================================================================================================================
    Func _GDIPlus_PenSetLineCap($hPen, $iStartCap, $iEndCap, $iDashCap)
    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetPenLineCap197819", "hwnd", $hPen, "int", $iStartCap, "int", $iEndCap, "int", $iDashCap)

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

    If @error Then Return SetError(@error, @extended, False)
    $GDIP_STATUS = $aResult[0]
    Return $aResult[0] = 0
    EndFunc ;==>_GDIPlus_PenSetLineCap
    #endregion "GDIP.au3 Functions"

    [/autoit]
  • GDI+ Graphic in Mitte von Gui (ChildGui???)

    • name22
    • 1. März 2011 um 19:00

    Mach es halt so...

    Spoiler anzeigen
    [autoit]

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

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

    $hMain = GUICreate("Test", 400, 400, 200, 200)
    GUISetState()

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

    $hChild = GUICreate("", 100, 100, 250, 250, $WS_POPUP, Default, $hMain)
    GUISetState()
    GUISwitch($hMain)

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

    _GDIPlus_Startup()

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

    $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hChild)
    _GDIPlus_GraphicsSetSmoothingMode($hGraphics, 2)

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

    _GDIPlus_GraphicsClear($hGraphics, 0xFFFFFFFF)
    _GDIPlus_GraphicsFillEllipse($hGraphics, 10, 10, 80, 70)

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

    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_Shutdown()

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

    GUIRegisterMsg($WM_MOVE, "_Move")

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

    While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

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

    Func _Move($hWnd, $Msg, $wParam, $lParam)
    If $hWnd = $hMain Then WinMove($hChild, "", Int(BinaryMid($lParam, 1, 2)) + 50, Int(BinaryMid($lParam, 3, 4)) + 50)
    EndFunc

    [/autoit]
  • _GDIPlus Grafik "entfernen"

    • name22
    • 28. Februar 2011 um 22:30
    Zitat

    wie kann ich ne Grafik, die ich zuvor mit _GDIPlus gezeichnet hab, wieder entfernen?


    Mit einer anderen Farbe (z.B. Weiß) drüberzeichnen.

    [autoit]

    _GDIPlus_GraphicsClear($hGraphic, 0xFFFFFFFF)

    [/autoit]

    .

  • Frage zu nem "Kleinen" Script

    • name22
    • 28. Februar 2011 um 20:19

    @nightfire0110 Das war jetzt nicht auf dich bezogen, ich wollte nur Skilkor darüber informieren, dass unser Forum ihn keineswegs veurteilen wird nur weil er einem Neuankömmling die Lösung zu seinem Problem geliefert hat. Puh, langer Satz ^^ ....

  • Frage zu nem "Kleinen" Script

    • name22
    • 28. Februar 2011 um 20:12
    Zitat

    Und Sorry an die Anderen dass ich einem neuling die evt lösung auf dem Silberteller Pressentiere


    Darüber wird sich keiner beschweren, nur wenn jemand ein Script verlangt ohne auch nur versucht zu haben es selbst zu machen verweisen wir ihn meist auf die Jobbörse ;).

  • Hilfe bei GUI checken

    • name22
    • 28. Februar 2011 um 19:24

    Mit GUICtrlRead kannst du den Inhalt eines Controls auslesen.

    Zitat

    Desweiteren wollte ich wissen wie ich ein Feld aktivieren kann über checkbox, und dies soll soll dann in die Berechnung mit einfließen.


    Wie bitte? Welches Feld? Und wie soll das in die Berechnung einfließen? Außerdem scheinst du Artikel vor Substantiv vergessen zu haben.

  • GUICtrlSetFont für die ganze GUI?

    • name22
    • 26. Februar 2011 um 23:29

    Mit

    [autoit]

    GUISetFont

    [/autoit]

    kannst du die Standardschriftart für die GUI festlegen, aber das geht nur bevor du die Elemente erzeugst...

  • Bitte um Hilfe! If WinExists error beim Compelieren

    • name22
    • 21. Februar 2011 um 21:54

    Wir bräuchten mal so eine Art "Aufräum-Team" :D ... Damit alles schön ordentlich an seinen Platz kommt. :)

  • Bitte um Hilfe! If WinExists error beim Compelieren

    • name22
    • 21. Februar 2011 um 20:38
    Zitat

    Der Beitrag »Bitte um Hilfe! If WinExists error beim Compelieren« von »Schully« (Heute, 20:26) wurde aus folgendem Grund vom Autor selbst gelöscht: Danke für die schell Hilfe (Heute, 20:36)


    *facepalm* Wieso löschst du dann den Beitrag :pinch:? Wenn jeder seinen Beitrag löschen würde nachdem sein Problem gelöst wurde, versteht keiner mehr worum es hier eigentlich ging...

  • [Frage] wildcats/dateien verstecken

    • name22
    • 21. Februar 2011 um 19:37

    1. Vielleicht mit StringRegExp, aber ich hab leider nicht genau verstanden was du willst...
    2. Mit

    [autoit]

    FileSetAttrib

    [/autoit]
  • [GDI+] Transparent "zeichnen" auf auf ein Bmp32 - Andy?

    • name22
    • 19. Februar 2011 um 23:17

    Erstell doch aus dem Gerätekontext mit der Bitmap eine GDI+ Grafik. Dann kannst du mit _GDIPlus_GraphicsClear die Bitmap transparent setzen. Somit musst du auch nicht jedesmal eine neue Bitmap erstellen. ;)

    [autoit]

    $hGraphics = _GDIPlus_GraphicsCreateFromHDC($hDC_Bitmap)
    _GDIPlus_GraphicsClear($hGraphics, 0x00000000)

    [/autoit]
  • Monopoly Digital 1.0

    • name22
    • 19. Februar 2011 um 18:30
    Zitat

    Was meinst du mit visuellen Effekten?


    Naja... Es wäre übersichtlicher wenn sich die Spielfiguren bewegen und nicht teleportieren würden ;). Außerdem Könnte man die Würfel auch grafisch anzeigen anstatt in einer MsgBox.

  • Monopoly Digital 1.0

    • name22
    • 19. Februar 2011 um 16:51

    Bei mir steht MONOPCDIGITA1.0... Schriftgröße 15 würde bei mir passen.

  • Monopoly Digital 1.0

    • name22
    • 19. Februar 2011 um 16:44

    Direkt am Anfang innerhalb von 4 Zügen alle Bahnhöfe eingesackt... Das Spiel gefällt mir, könnte aber noch ein paar visuelle Effekte vertragen ^^.

  • OneEventMode

    • name22
    • 19. Februar 2011 um 15:59

    Wir haben für dich doch jetzt wirklich mehr als genug Beispiele geschrieben, oder? Eigentlich solltest du das doch jetzt nach 2 (3?) Threads zum selben Thema verstanden haben...

  • Input keine Buchstaben

    • name22
    • 19. Februar 2011 um 15:42

    Beenden könnte man das so:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

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

    $hWnd = GUICreate("Test", 200, 35)
    $cInput = GUICtrlCreateInput("", 5, 5, 190, 25)
    GUISetState()

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

    $iOldNumber = ""

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

    While True
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    If GUICtrlRead($cInput) <> $iOldNumber Then
    $iOldNumber = GUICtrlRead($cInput)
    If StringRegExp($iOldNumber, "[^0-9]", 0) Then Exit
    EndIf
    WEnd

    [/autoit]
  • Super Mario...

    • name22
    • 19. Februar 2011 um 13:15

    Erstens ist das hier im falschen Unterforum (Es sei denn dieser Thread hat auch nur im entferntesten etwas mit Galenda zu tun), zweitens solltest du nicht 2 mal den gleichen Thread in verschiedenen Unterforen erstellen.

  • Script geht nicht weiter nach öffnen zweiter Form

    • name22
    • 18. Februar 2011 um 21:47
    Zitat

    Der oneventmode ist in diesem Fall glaube ich eher ungeeignet, viel zu viele Elemente für die man dann jeweils ne Funktion braucht. Wobei man denke ich die Alphabets Buttons sehr viel gescheiter erzeugen und den Code dadurch um etliche Zeilen kürzen könnte. Ein Array für die Buttons wäre da wohl angesagt.


    Aha :huh: .....

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

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

    Opt("GUIOnEventMode", 1)

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

    Global $aButtons[11] = [10]

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

    $hWnd = GUICreate("Test", 410, 50)
    For $i = 1 To $aButtons[0]
    $aButtons[$i] = GUICtrlCreateButton(Chr($i + 64), ($i - 1) * 40 + 5, 5, 40, 40)
    GUICtrlSetOnEvent(-1, "_ButtonClicked")
    Next
    GUISetState()

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

    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit", $hWnd)

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

    While Sleep(1000)
    WEnd

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

    Func _Exit()
    Exit
    EndFunc

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

    Func _ButtonClicked()
    MsgBox(64, "Button Pressed", GUICtrlRead(@GUI_CtrlId))
    EndFunc

    [/autoit]

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™