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. UEZ

Beiträge von UEZ

  • Icons glätten?

    • UEZ
    • 11. April 2013 um 20:58

    Die Icons sind in 4, 8 und 32 Bit und in einer Auflösung von 16x16, 32x32, 48x48 und 256x256 abgespeichert. D.h. du solltest je nach Bedarf das entsprechende Icon dir heraussuchen.

    Einen Icon in 32x32 auf 256x256 zu skalieren, macht hier keinen Sinn.

    Spoiler anzeigen
    [autoit]


    #include <GUIConstantsEx.au3>

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

    GUICreate("Meine GUI Icons", 700, 300)

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

    $icon = "C:\Windows\system32\mobsync.exe"

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

    GUICtrlCreateIcon($icon, 1, 20, 20, 16, 16)
    GUICtrlCreateIcon($icon, 1, 100, 20, 32, 32)
    GUICtrlCreateIcon($icon, 1, 200, 20, 48, 48)
    GUICtrlCreateIcon($icon, 1, 300, 20, 256, 256)
    GUISetState()

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

    While 1
    Local $msg = GUIGetMsg()

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

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd

    [/autoit]

    Notfalls muss du das Icon mit GDI+ / WinAPI extrahieren und skalieren.

    Gruß,
    UEZ

  • textfile (komma separiert) in ein 2d Array einlesen

    • UEZ
    • 10. April 2013 um 15:54

    Probiere es mal damit: [ gelöst ] CSV-Datei in ein Array einlesen

    Gruß,
    UEZ

  • String packen ohne auf Festplatte auszulagern ?

    • UEZ
    • 8. April 2013 um 20:41

    Oder schaue hier mal rein: http://www.autoitscript.com/forum/topic/12…thm-collection/

    In dem Archiv gibt es ein Compression Ordner mit einigen Pack Algorithmen in Assembler geschrieben!

    Gruß,
    UEZ

  • MX-Au3 Lizenz v1.1

    • UEZ
    • 7. April 2013 um 21:29

    Das Ganze nun auch in Englisch! ;)

    Gruß,
    UEZ

  • Perforator v1.25 build 2015-06-30 beta

    • UEZ
    • 7. April 2013 um 10:56

    Neues und sehr wahrscheinlich letztes Update, es sein denn, es werden noch Bugs gefunden!

    Jetzt können auch GIF Animationen in der Haupt GUI abgespielt werden.

    Gruß,
    UEZ

  • Countdown und Progressbar

    • UEZ
    • 5. April 2013 um 20:41

    Ein bissle Mathe und dein Problem ist gelöst:

    Spoiler anzeigen
    [autoit]


    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

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

    $fill = 15000

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

    GUICreate("My GUI")

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

    GUISetState()
    $ID_1 = GUICtrlCreateButton("Countdown", 10, 25, 100)
    $ID_2 = GUICtrlCreateButton("Progress", 10, 55, 100)
    $progress = GUICtrlCreateProgress(70, 0, 200, 20)

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

    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $ID_1
    _sleep(30000)
    Case $ID_2
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

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

    Func _sleep($time)
    $tstart = TimerInit()
    $stime = $time
    Do
    GUICtrlCreateLabel("Zeit : " & $stime / 1000 & " sec", 0, 2)
    Sleep(1000)
    $stime -= 1000
    GUICtrlSetData($progress, Floor(100 * (($time - $stime) / $time)))
    Until TimerDiff($tstart) >= $time
    EndFunc ;==>_sleep

    [/autoit]

    Gruß,
    UEZ

  • RegEx Ausdruck

    • UEZ
    • 5. April 2013 um 16:38

    Probiere es mal damit:

    [autoit]


    $sLog = "2013-04-05 16:12:04 : Aufz. Start Mustermann AG" & @CRLF & _
    "2013-04-05 17:42:04 : Aufz. Start Mustermann AG" & @CRLF & _
    "2013-04-05 18:32:04 : Aufz. Start Mustermann AG" & @CRLF

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

    $sLog_New = StringRegExpReplace($sLog, "(?m)(\d+\-\d+\-\d+)(\h)(\d+\:\d+\:\d+.*)", "\1" & @TAB & "\3")
    MsgBox(0, "", $sLog_New)

    [/autoit]

    Gruß,
    UEZ

  • a* A-Star Algorithmus (Grafik!!)

    • UEZ
    • 5. April 2013 um 09:53

    Da hatte jemand wohl eine lange Nacht gehabt! ;)


    Sehr schön geworden! :thumbup:

    Cool wäre es, wenn man schwarze Linien zeichnen könnte anstatt "mühselig" die Punkte zu setzen! Und ich kann das Ziel löschen.

    Gruß,
    UEZ

  • Ist AutoIt das richtige Programm für mich.

    • UEZ
    • 4. April 2013 um 10:15

    @David: ich weiß nicht, was du willst? Wenn dir AutoIt nicht zusagt, dann benutze AutoIt einfach nicht, denn es zwingt dich ja niemand dazu! Wenn andere AutoIt benutzen, dann ist das deren "Problem".

    Ich schlage vor, dass du solche Diskussionen hier lieber nicht anfängst, ansonsten wird der Thread dicht gemacht und der Bann Hammer wird geschwungen!

    Gruß,
    UEZ

  • Perforator v1.25 build 2015-06-30 beta

    • UEZ
    • 4. April 2013 um 10:08

    Hi funkey,

    danke erst mal für dein Feedback. :)

    Was meinst du genau? Die Optimierung der _WinAPI_GuiImageHole() Funktion? Die Idee mit den GIFs hatte ich seit gestern und habe mir noch keine tiefen Gedanken gemacht, wie ich diese Funktion besser aufteilen kann, damit die großen Animationen weniger CPU Ressourcen fressen.

    Ich schaue mal...

    Gruß,
    UEZ

  • Perforator v1.25 build 2015-06-30 beta

    • UEZ
    • 4. April 2013 um 01:18

    Neues Update: nun können auch animierte GIFs benutzt werden, um eine "durchlöcherte" animierte GUI zu erzeugen.

    Beispiel 2 im engl. Forum (Link in Post#1).

    Ich hoffe, dass das Tool einigermaßen fehlerfrei ist.

    Gruß,
    UEZ

  • Hintergrundbild zu 50% transparent / Texte + Buttons sollen aber zu 100% angezeigt werden

    • UEZ
    • 2. April 2013 um 18:09
    Zitat von timyboy

    Dein Spoiler geht leider nicht zu oeffnen im IE..

    Dann nimm einen anderen Browser! 8|

    Gruß,
    UEZ

  • [GDI+] Runder, Animierter Ladebalken

    • UEZ
    • 2. April 2013 um 15:49

    Hi GtaSpider,

    ist schon klar, wenn du die 5 Zeilen weg lässt, dass es geht, aber

    Zitat

    Edit: Nun ist der Code etwas besser aufgeräumt
    + ProgressSet Funktion läuft
    + Eine Hand voll mehr Einstellungsmöglichkeiten


    ProgressSet Funktion läuf bei mir nicht ;)

    Gruß,
    UEZ

  • [GDI+] Runder, Animierter Ladebalken

    • UEZ
    • 2. April 2013 um 15:04

    Irgendwie funzt ProgressSet() bei mir nicht richtig!

    Guckst du hier: http://www.4shared.com/video/9qWfeBp9…45834_Test.html

    Gruß,
    UEZ

  • Hintergrundbild zu 50% transparent / Texte + Buttons sollen aber zu 100% angezeigt werden

    • UEZ
    • 2. April 2013 um 09:59

    Du musst den Pfad in Zeile 11 entsprechend anpassen!

    Gruß,
    UEZ

  • [GDI+] Runder, Animierter Ladebalken

    • UEZ
    • 2. April 2013 um 09:49

    Sieht echt klasse aus! :thumbup:

    Gruß,
    UEZ

  • Problem mit Kollisionen

    • UEZ
    • 1. April 2013 um 22:21

    Das bekomme ich, wenn ich dein Skript starte:

    Zitat


    "C:\_Downloads\Game.au3"(464,1) : error: syntax error
    WEnd
    ^
    "C:\_Downloads\Game.au3"(10,28) : error: _end(): undefined function.
    OnAutoItExitRegister("_end")
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    C:\_Downloads\Game.au3 - 2 error(s), 0 warning(s)
    !>22:17:37 AU3Check ended. Press F4 to jump to next error.rc:2
    >Exit code: 2 Time: 0.518

    Alles anzeigen

    Und wie gesagt, fehlen die gesamten Bilder. Wie sollen wir dir Helfen, wenn wir nichts sehen können. Ein bisschen mehr Mühe solltest du dir schon geben, ansonsten wird dir nicht gut geholfen.

    Gruß,
    UEZ

  • Hintergrundbild zu 50% transparent / Texte + Buttons sollen aber zu 100% angezeigt werden

    • UEZ
    • 1. April 2013 um 22:11

    Meinst du sowas hier?

    Spoiler anzeigen
    [autoit]


    #include <GUIConstantsEx.au3>
    #include <GDIPlus.au3>

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

    _GDIPlus_Startup()
    Global $hGUI = GUICreate("Test", 400, 300)
    Global $iPicBG = GUICtrlCreatePic("", 0, 0, 400, 300)
    GUICtrlSetState(-1, $GUI_DISABLE)
    Global $iInp = GUICtrlCreateInput("Coded by UEZ 2013", 50, 50, 300, 100)
    Global $iBtnX = GUICtrlCreateButton("Exit", 350, 250, 40, 40)

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

    Global $iBGImage = _GDIPlus_BitmapCreateFromFile("c:\Program Files (x86)\AutoIt3\Examples\GUI\msoobe.jpg")
    _GDIPlus_SendAlphaImageToControl($hGUI, $iBGImage, $iPicBG)
    GUISetState()

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

    Do
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE, $iBtnX
    GUIDelete()
    _GDIPlus_BitmapDispose($iBGImage)
    _GDIPlus_Shutdown()
    Exit
    EndSwitch
    Until False

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

    Func _GDIPlus_SendAlphaImageToControl($hGUI, $hImage, $iCtrl, $fAlpha = -0.33333) ;coded by UEZ 2013
    Local $hAttribute_Alpha = _GDIPlus_ImageAttributesCreate()
    Local $tColorMatrix = _GDIPlus_ColorMatrixCreateTranslate(0, 0, 0, $fAlpha)
    Local $pColorMatrix = DllStructGetPtr($tColorMatrix)
    _GDIPlus_ImageAttributesSetColorMatrix($hAttribute_Alpha, 0, True, $pColorMatrix)
    Local $iW = _GDIPlus_ImageGetWidth($hImage), $iH = _GDIPlus_ImageGetHeight($hImage)
    Local $aCtrl = ControlGetPos($hGUI, "", $iCtrl)
    Local $iCtrlW = $aCtrl[2], $iCtrlH = $aCtrl[3]
    Local $aRet = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iCtrlW, "int", $iCtrlH, "int", 0, "int", $GDIP_PXF32ARGB, "ptr", 0, "int*", 0)
    Local $hGfxCtxt = _GDIPlus_ImageGetGraphicsContext($aRet[6])
    _GDIPlus_GraphicsDrawImageRectRectIA($hGfxCtxt, $hImage, 0, 0, $iW, $iH, 0, 0, $iCtrlW, $iCtrlH, $hAttribute_Alpha)
    Local $hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($aRet[6])
    Local $hB = GUICtrlSendMsg($iCtrl, 0x0172, 0, $hHBITMAP)
    If $hB Then _WinAPI_DeleteObject($hB)
    _WinAPI_DeleteObject($hHBITMAP)
    _GDIPlus_GraphicsDispose($hGfxCtxt)
    _GDIPlus_BitmapDispose($aRet[6])
    _GDIPlus_ImageAttributesDispose($hAttribute_Alpha)
    EndFunc ;==>_GDIPlus_SendAlphaImageToControl

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

    Func _GDIPlus_ColorMatrixCreate()
    Return _GDIPlus_ColorMatrixCreateScale(1, 1, 1, 1)
    EndFunc ;==>_GDIPlus_ColorMatrixCreate

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

    Func _GDIPlus_ColorMatrixCreateScale($nRed, $nGreen, $nBlue, $nAlpha = 1)
    Local $tCM, $tagGDIPCOLORMATRIX = "float m[25];"
    $tCM = DllStructCreate($tagGDIPCOLORMATRIX)
    DllStructSetData($tCM, "m", $nRed, 1)
    DllStructSetData($tCM, "m", $nGreen, 7)
    DllStructSetData($tCM, "m", $nBlue, 13)
    DllStructSetData($tCM, "m", $nAlpha, 19)
    DllStructSetData($tCM, "m", 1, 25)
    Return $tCM
    EndFunc ;==>_GDIPlus_ColorMatrixCreateScale

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

    Func _GDIPlus_ColorMatrixCreateTranslate($nRed, $nGreen, $nBlue, $nAlpha = 0)
    Local $iI, $tCM, $aFactors[4] = [$nRed, $nGreen, $nBlue, $nAlpha]
    $tCM = _GDIPlus_ColorMatrixCreate()
    For $iI = 0 To 3
    DllStructSetData($tCM, "m", $aFactors[$iI], 21 + $iI)
    Next
    Return $tCM
    EndFunc ;==>_GDIPlus_ColorMatrixCreateTranslate

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

    Func _GDIPlus_GraphicsDrawImageRectRectIA($hGraphics, $hImage, $nSrcX, $nSrcY, $nSrcWidth, $nSrcHeight, $nDstX, $nDstY, $nDstWidth, $nDstHeight, $hImageAttributes = 0, $iUnit = 2)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipDrawImageRectRect", "handle", $hGraphics, "handle", $hImage, "float", $nDstX, "float", $nDstY, "float", $nDstWidth, "float", $nDstHeight, "float", $nSrcX, "float", $nSrcY, "float", $nSrcWidth, "float", $nSrcHeight, "int", $iUnit, "handle", $hImageAttributes, "int", 0, "int", 0)
    If @error Then Return SetError(@error, @extended, False)
    Return $aResult[0] = 0
    EndFunc ;==>_GDIPlus_GraphicsDrawImageRectRectIA

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

    Func _GDIPlus_ImageAttributesCreate()
    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateImageAttributes", "int*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    Return $aResult[1]
    EndFunc ;==>_GDIPlus_ImageAttributesCreate

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

    Func _GDIPlus_ImageAttributesDispose($hImageAttributes)
    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipDisposeImageAttributes", "handle", $hImageAttributes)
    If @error Then Return SetError(@error, @extended, False)
    Return $aResult[0] = 0
    EndFunc ;==>_GDIPlus_ImageAttributesDispose

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

    Func _GDIPlus_ImageAttributesSetColorMatrix($hImageAttributes, $iColorAdjustType = 0, $fEnable = False, $pClrMatrix = 0, $pGrayMatrix = 0, $iColorMatrixFlags = 0)
    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetImageAttributesColorMatrix", "handle", $hImageAttributes, "int", $iColorAdjustType, "int", $fEnable, "ptr", $pClrMatrix, "ptr", $pGrayMatrix, "int", $iColorMatrixFlags)
    If @error Then Return SetError(@error, @extended, False)
    Return $aResult[0] = 0
    EndFunc ;==>_GDIPlus_ImageAttributesSetColorMatrix

    [/autoit]

    Gruß,
    UEZ

  • Problem mit Kollisionen

    • UEZ
    • 30. März 2013 um 21:13

    Das Skript ist nicht lauffähig und die Anhänge fehlen.

    Das macht die Sache nicht einfacher....


    Gruß,
    UEZ

  • Kolisionsabfrage von einem Quadrat und Rechteck

    • UEZ
    • 30. März 2013 um 09:59

    Hier eine leichte Modifikation deines Programmes:

    Spoiler anzeigen
    [autoit]


    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

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

    Global $iW = 625, $iH = 443
    Global $BalkenBreite = 20, $BalkenHoehe = 100, $BallGroesse = 9, $SchrittY = 10
    Global $BalkenLPosX = 20, $BalkenRPosX = $iW - $BalkenLPosX - $BalkenBreite, $BalkenLPosY = 100, $BalkenRPosY = 100
    Global $BallX, $BallY, $BallVektorX, $BallVektorY
    InitBallPos()

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 625, 443)
    GUISetBkColor(0x000000)
    Global $BalkenL = GUICtrlCreateGraphic($BalkenLPosX, $BalkenLPosY, $BalkenBreite, $BalkenHoehe)
    GUICtrlSetBkColor(-1, 0xFFFF00)
    Global $BalkenR = GUICtrlCreateGraphic($BalkenRPosX, $BalkenRPosY, $BalkenBreite, $BalkenHoehe)
    GUICtrlSetBkColor(-1, 0xFFFF00)
    Global $Ball = GUICtrlCreateGraphic($BallX, $BallY, $BallGroesse, $BallGroesse)
    GUICtrlSetBkColor(-1, 0xFF0000)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    HotKeySet("{up}","up")
    HotKeySet("{down}","down")
    HotKeySet("{ESC}","_Exit")

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

    While Sleep(10)
    $BallX += $BallVektorX
    $BallY += $BallVektorY
    If ($BallY <= 0) Or ($BallY >= $iH - $BallGroesse) Then $BallVektorY *= -1
    Switch $BallX
    Case -100 To 0
    MsgBox(0, "Test", "Spieler 1 hat verloren!")
    InitBallPos()
    Case $iW - $BallGroesse To $iW + 100
    MsgBox(0, "Test", "Spieler 2 hat verloren!")
    InitBallPos()
    EndSwitch
    If _RectCollision(Int($BallX), Int($BallY), Int($BallX) + $BallGroesse, Int($BallY) + $BallGroesse, _
    $BalkenLPosX, $BalkenLPosY, $BalkenLPosX + $BalkenBreite, $BalkenLPosY + $BalkenHoehe) Or _
    _RectCollision(Int($BallX), Int($BallY), Int($BallX) + $BallGroesse, Int($BallY) + $BallGroesse, _
    $BalkenRPosX, $BalkenRPosY, $BalkenRPosX + $BalkenBreite, $BalkenRPosY + $BalkenHoehe) Then $BallVektorX *= -1
    GUICtrlSetPos($Ball, $BallX, $BallY)
    WEnd

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

    Func _Exit()
    GUIDelete()
    Exit
    EndFunc

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

    Func up()
    If $BalkenLPosY - $SchrittY > -$SchrittY Then
    $BalkenLPosY -= $SchrittY
    GUICtrlSetPos($BalkenL, $BalkenLPosX, $BalkenLPosY)
    EndIf
    EndFunc

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

    Func down()
    If $BalkenLPosY + $BalkenHoehe + $SchrittY < $iH + $SchrittY Then
    $BalkenLPosY += $SchrittY
    GUICtrlSetPos($BalkenL, $BalkenLPosX, $BalkenLPosY)
    EndIf
    EndFunc

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

    Func InitBallPos()
    $BallX = RandomBallPos(0)
    $BallY = RandomBallPos(1)
    $BallVektorX = _Random(-2, 2, -0.25, 0.25)
    $BallVektorY = _Random(-2, 2, -0.25, 0.25)
    EndFunc

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

    Func _Random($min, $max, $emin, $emax, $int = 0)
    Local $r1 = Random($min, $emin, $int)
    Local $r2 = Random($emax, $max, $int)
    If Random(0, 1, 1) Then Return $r1
    Return $r2
    EndFunc ;==>_Random

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

    Func RandomBallPos($Achse)
    If Not $Achse Then Return Random($iW / 3, $iW * 2 / 3, 1)
    Return Random($iH / 3, $iH * 2 / 3, 1)
    EndFunc

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

    Func _RectCollision($Rect1X1,$Rect1Y1,$Rect1X2,$Rect1Y2, $Rect2X1, $Rect2Y1, $Rect2X2, $Rect2Y2)
    ; Prog@ndy
    Local Const $tagRECT = "long;long;long;long"
    Local $1 = DllStructCreate($tagRECT)
    Local $2 = DllStructCreate($tagRECT)
    Local $3 = DllStructCreate($tagRECT)
    DllStructSetData($1,1,$Rect1X1)
    DllStructSetData($1,2,$Rect1Y1)
    DllStructSetData($1,3,$Rect1X2)
    DllStructSetData($1,4,$Rect1Y2)
    DllStructSetData($2,1,$Rect2X1)
    DllStructSetData($2,2,$Rect2Y1)
    DllStructSetData($2,3,$Rect2X2)
    DllStructSetData($2,4,$Rect2Y2)
    Local $r = DllCall("User32.dll", "int", "IntersectRect", "ptr", DllStructGetPtr($3), "ptr", DllStructGetPtr($1), "ptr", DllStructGetPtr($2))
    If @error Then Return SetError(1,0,0)
    Return $r[0]<>0
    EndFunc

    [/autoit]

    Gruß,
    UEZ

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™