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

  • Zeile in 2D Array schreiben

    • UEZ
    • 5. April 2012 um 23:50

    Sorry, aber ich verstehe nicht, was du genau willst.

    Kannst du ein Beispiel geben, z.B. eine Zeile, die in einem 2D Array abgebildet wird.

    Gruß,
    UEZ

  • Mit AutoIt ermitteln, ob exe für 64bit oder 32bit compiliert wurde

    • UEZ
    • 4. April 2012 um 12:24

    Sollte mit der WinAPIEx.au3 funzen:

    [autoit]


    #Include <APIConstants.au3>
    #Include <WinAPIEx.au3>

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

    Opt('MustDeclareVars', 1)

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

    Global $Text, $Path = @MyDocumentsDir & '\'

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

    While 1
    $Path = FileOpenDialog('Select File', _WinAPI_PathRemoveFileSpec($Path), 'All Files (*.*)', 1 + 2)
    If $Path Then
    If _WinAPI_GetBinaryType($Path) Then
    Switch @extended
    Case $SCS_32BIT_BINARY
    $Text = ' is 32-bit Windows-based application.'
    Case $SCS_64BIT_BINARY
    $Text = ' is 64-bit Windows-based application.'
    Case $SCS_DOS_BINARY
    $Text = ' is MS-DOS–based application.'
    Case $SCS_OS216_BINARY
    $Text = ' is 16-bit OS/2-based application.'
    Case $SCS_PIF_BINARY
    $Text = ' is PIF file that executes an MS-DOS–based application.'
    Case $SCS_POSIX_BINARY
    $Text = ' is POSIX–based application.'
    Case $SCS_WOW_BINARY
    $Text = ' is 16-bit Windows-based application.'
    Case Else
    $Text = ' is unknown executable type.'
    EndSwitch
    Else
    $Text = ' is not executable file.'
    EndIf
    MsgBox(64, '_WinAPI_GetBinaryType()', '"' & _WinAPI_PathStripPath($Path) & '"' & $Text)
    Else
    ExitLoop
    EndIf
    WEnd

    [/autoit]

    Gruß,
    UEZ

  • BubbleIt (2D) V. 1.2

    • UEZ
    • 3. April 2012 um 18:40

    Jetzt fehlt nur noch der Sound...

    Gruß,
    UEZ ;)

  • BubbleIt (2D) V. 1.2

    • UEZ
    • 3. April 2012 um 17:09

    Wenn du ein Bläschen triffst, dann teilt sich dieser doch und das Teilen mit einer kleinen Animation hinterlegen, würde besser Aussehen, als wenn sie sich "nur" einfach teilen.

    Das Ganze noch mit Sound hinterlegen, würde es noch "würzen".

    Gruß,
    UEZ

  • BubbleIt (2D) V. 1.2

    • UEZ
    • 3. April 2012 um 17:03

    Ist schön geworden!

    Wenn die Bläschen platzen würden, würde es schöner aussehen.

    Ach ja, erinnert mich an Pang!

    Gruß,
    UEZ

  • GUI ruckelt

    • UEZ
    • 27. März 2012 um 21:51

    Du musst die Größe des Control mitanpassen:

    [autoit]


    ...
    WinSetState("Foto", "", @SW_MINIMIZE) ;wenn aktiv wird in der nächsten Zeile die Größe 600 bzw. 100 ignoriert
    GUICtrlSetPos($idPreviewPic, 10, 10, 600, 100)
    _PreviewLoadImage($datei1, $idPreviewPic, 600, 100)
    WinSetState("Foto", "", @SW_RESTORE)
    ...

    [/autoit]

    Gruß,
    UEZ

  • PolyShoot (Game)

    • UEZ
    • 27. März 2012 um 18:51

    Erinnert mich ein bisschen an Asteroids....

    Wenn ich mit der Maus genau über dem Raumschiff bin, flippt der komplett aus. Ansonsten gut gemacht!

    Gruß,
    UEZ

  • Gebogenes Objekt auf gerade Linie abrollen ( Oder "Mathe für Runaways" )

    • UEZ
    • 23. März 2012 um 20:48

    War mir schon klar, dass es Eukalyptus richtig heiß gemacht hat, dafür was zu coden. :D


    Well done! :thumbup:


    Gruß,
    UEZ

  • MsgBox erst anzeigen, wenn zuvor x Sekunden lang keine Eingabe getätigt wurde

    • UEZ
    • 15. März 2012 um 09:32

    Probiere es mal damit:

    [autoit]


    $delta_time = 10 * 1000 ;10 Sekunden

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

    $hDLL = DllOpen("user32.dll")
    $timer = TimerInit()
    Do
    $key = _KeyPressCheck(1, 221, -1, $hDLL)
    If $key Then $timer = TimerInit()
    Sleep(50)
    Until TimerDiff($timer) > $delta_time And Not $key
    DllClose($hDll)

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

    ConsoleWrite($delta_time / 1000 & " Sekunden ohne Eingabe" & @LF)

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

    $timer = TimerInit()
    Do
    MsgBox(0, "Info: " & Int(TimerDiff($timer) / 1000), "Test")
    Until TimerDiff($timer) > $delta_time

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

    ; #FUNCTION# ===================================================================
    ; Name : _KeyPressCheck
    ; Description: Check if specified keys are pressed
    ; Parameter(s): sHexKey - Key to check for
    ; Requirement(s): None
    ; Return Value(s): On Success - Returns 1
    ; On Failure - Returns 0
    ; Author(s): Valuater
    ;===============================================================================
    Func _KeyPressCheck($iStart, $iFinish, $iHexKey = -1, $vDLL = 'user32.dll')
    Local $ikey, $ia_R
    For $ikey = $iStart To $iFinish
    If $iHexKey = -1 Then $ia_R = DllCall($vDLL, 'int', 'GetAsyncKeyState', 'int', '0x' & Hex($ikey, 2))
    If $iHexKey <> -1 Then $ia_R = DllCall($vDLL, 'int', 'GetAsyncKeyState', 'int', '0x' & $iHexKey)
    If Not @error And BitAND($ia_R[0], 0x8000) = 0x8000 Then Return 1
    Next
    Return 0
    EndFunc ;==>__KeyPressCheck

    [/autoit]

    Gruß,
    UEZ

  • GDI+ Spielerei 3D-Linien

    • UEZ
    • 10. März 2012 um 23:39

    Wie immer sehr cooooooooollllllllllllll!

    Ich muss mal auch wieder was mit GDI+ machen! Bin total aus der Übung...

    Gruß,
    UEZ

  • Label auf GDI+ Background

    • UEZ
    • 9. März 2012 um 21:39

    Nimm' mal eine dunkle Transparentfarbe:

    [autoit]


    Func _GuiCreateLabel ($iHwnd, $iText, $iX, $iY, $iW, $iH)
    $iGui = GUICreate ("",$iW, $iH, $iX, $iY,BitOR($WS_POPUP, $WS_VISIBLE), BitOR ($WS_EX_MDICHILD,$WS_EX_LAYERED), $iHwnd)
    GUICtrlCreateLabel ($iText,2,0,$iW,$iH,-1,$GUI_WS_EX_PARENTDRAG )
    GUICtrlSetColor (-1,0xff0000)
    GUICtrlSetFont (-1,10,400,0,"Arial", 4) ;teste auch mal 5 anstatt 4
    GUISetBkColor(0x010000, $iGui)
    _WinAPI_SetLayeredWindowAttributes($iGui, 0x010000, 255)
    EndFunc

    [/autoit]

    Gruß,
    UEZ

  • Label auf GDI+ Background

    • UEZ
    • 6. März 2012 um 09:07

    Lasse $WS_BORDER in Zeile 56 einfach weg.

    Gruß,
    UEZ

  • Label auf GDI+ Background

    • UEZ
    • 5. März 2012 um 13:42

    Du kannst mal

    [autoit]


    GUICtrlSetFont (-1,10,400,0,"Arial", 4)

    [/autoit]

    probieren.

    Gruß,
    UEZ

  • Label auf GDI+ Background

    • UEZ
    • 4. März 2012 um 22:53

    Lasse doch die Transparenz vom Label weg und setze die Hintergrundfarbe vom Label schwarz.

    Spoiler anzeigen
    [autoit]


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

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

    _GDIPlus_Startup()
    Global Const $hImage_BG = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\background.png")
    Global Const $iW = _GDIPlus_ImageGetWidth($hImage_BG)
    Global Const $iH = _GDIPlus_ImageGetHeight($hImage_BG)
    Global Const $hGUI = GUICreate("", $iW, $iH, -1, -1, $WS_POPUP, $WS_EX_LAYERED + $WS_EX_TOPMOST)
    SetTransparentBitmap($hGUI, $hImage_BG)
    Global Const $iFW = 90
    Global Const $iFH = 50

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

    Global Const $hGUI_Child = GUICreate("", $iFW, $iFH, 100, 100, $WS_POPUP, $WS_EX_MDICHILD, $hGUI)
    Global Const $idLabel = GUICtrlCreateLabel("Test", 0, 0, $iFW, $iFH)
    GUICtrlSetBkColor(-1, 0)
    GUICtrlSetColor(-1, 0xF0F0F0)
    GUICtrlSetFont(-1, 32, 400, 0, "Arial", 4)
    GUISetState(@SW_SHOW, $hGUI)
    GUISetState(@SW_SHOW, $hGUI_Child)

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

    _GDIPlus_ImageDispose($hImage_BG)

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

    Global Const $SC_DRAGMOVE = 0xF012
    GUIRegisterMsg($WM_LBUTTONDOWN, "_WM_LBUTTONDOWN")

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

    Do
    Until GUIGetMsg() = -3

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

    _GDIPlus_Shutdown()
    Exit

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

    Func _WM_LBUTTONDOWN($hWnd, $iMsg, $wParam, $lParam)
    _SendMessage($hWnd, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0)
    EndFunc ;==>_WM_LBUTTONDOWN

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

    Func SetTransparentBitmap($hGUI, $hImage, $iOpacity = 0xFF)
    Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend
    $hScrDC = _WinAPI_GetDC(0)
    $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC)
    _WinAPI_ReleaseDC(0, $hScrDC)
    $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
    $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap)
    $tSize = DllStructCreate($tagSIZE)
    $pSize = DllStructGetPtr($tSize)
    DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth($hImage))
    DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage))
    $tSource = DllStructCreate($tagPOINT)
    $pSource = DllStructGetPtr($tSource)
    $tBlend = DllStructCreate($tagBLENDFUNCTION)
    $pBlend = DllStructGetPtr($tBlend)
    DllStructSetData($tBlend, "Alpha", $iOpacity)
    DllStructSetData($tBlend, "Format", 1)
    _WinAPI_UpdateLayeredWindow($hGUI, 0, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA)
    _WinAPI_SelectObject($hMemDC, $hOld)
    _WinAPI_DeleteObject($hBitmap)
    _WinAPI_DeleteDC($hMemDC)
    EndFunc ;==>SetTransparentBitmap

    [/autoit]

    Gruß,
    UEZ

  • GDI+ und QuickDraw zu langsam für 65000 pixel

    • UEZ
    • 3. März 2012 um 17:12

    Andy: Feine Sache! Genau sowas hatte ich mir vorgestellt, aber mit ASM bin ich seit der Primzahlen Geschichte nicht mehr vertraut, obwohl so viel Potential darin steckt!

    Gruß,
    UEZ

  • GDI+ und QuickDraw zu langsam für 65000 pixel

    • UEZ
    • 2. März 2012 um 22:36

    Es ist weder GDI+ noch QuickDraw das Problem, sondern AutoIt!

    256*256=256^2= 65536 Schleifendurchgänge sind für AutoIt als Intepretersprache leider zu langsam. ASM würde dir hier sehr wahrscheinlich weiterhelfen!

    Gruß,
    UEZ

  • Happy Birthday eukalyptus

    • UEZ
    • 2. März 2012 um 22:31

    Herzlichen Glückwunsch Mr. GDI+ und alles Gute!

    Ich hoffe weitere ultra coole GDI+ Demos zu sehen! :thumbup:

    Gruß,
    UEZ

  • Bild vergrößern und bewegen

    • UEZ
    • 2. März 2012 um 22:28

    In AutoIt Windows Screenshooter v1.43 Build 2012-02-16 Final habe ich das implementiert. Du kannst das Vorschaubild mit der Maus bewegen und mit dem Mausrad rein- bzw. rauszoomen.

    Gruß,
    UEZ

  • 1 String Doppelt Splitten

    • UEZ
    • 1. März 2012 um 22:44

    Vielleicht so was?

    [autoit]


    #include <Array.au3>
    $days = "So;So,Mo;Mo,Di;Di,Mi;Mi,Do;Do,Fr;Fr,Sa;Sa"
    $aDays = StringSplit(StringRegExpReplace($days, "(\w+);(\w+)", "$1"), ",", 2)
    _ArrayDisplay($aDays)

    [/autoit]

    Gruß,
    UEZ

  • GDI+ Farbe transparent und als neues Bild speichern

    • UEZ
    • 29. Februar 2012 um 14:57

    Bis ich den Code fertig bekommen habe, hast du es bereits selbst hinbekommen!

    Spoiler anzeigen
    [autoit]


    #include <GDIPlus.au3>
    #include <GUIConstantsEx.au3>
    Opt("GuiOnEventMode", 1)

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

    OnAutoItExitRegister("_end")

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

    $chipsetpfad = FileOpenDialog("Chipset", @ScriptDir & "\", "Bilder (*.png)", 1)
    _GDIPlus_Startup()

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

    $chipset = _GDIPlus_ImageLoadFromFile($chipsetpfad)
    $iW = _GDIPlus_ImageGetWidth($chipset)
    $iH = _GDIPlus_ImageGetHeight($chipset)
    $newchipset = GUICreate("Neues Chipset", $iW, $iH)
    GUISetState(@SW_SHOW)

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

    $hGraphics = _GDIPlus_GraphicsCreateFromHWND($newchipset)
    $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics)
    $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _GDIPlus_GraphicsDrawImage($hGraphics, $chipset, 0, 0)
    _GDIPlus_GraphicsDrawImage($hContext, $chipset, 0, 0)

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

    GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
    GUISetOnEvent($GUI_EVENT_PRIMARYUP, "getPixelcolor")

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

    While 1
    Sleep(100)
    WEnd

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

    Func getPixelcolor()
    $pos = MouseGetPos()
    $pix = PixelGetColor($pos[0], $pos[1])
    $sMsgText = StringFormat("Der hexadezimale Wert der Farbe ist: %#06x\t", $pix)
    MsgBox(0, "PixelGetColor", $sMsgText)
    Local $x, $y, $aResult, $iColor
    For $y = 0 To $iH -1
    For $x = 0 To $iW - 1
    $aResult = DllCall($ghGDIPDll, "uint", "GdipBitmapGetPixel", "hwnd", $hBitmap, "int", $x, "int", $y, "uint*", 0)
    $iColor = $aResult[4]
    If (("0x" & Hex($iColor, 6)) / $pix) = 1 Then DllCall($ghGDIPDll, "uint", "GdipBitmapSetPixel", "hwnd", $hBitmap, "int", $x, "int", $y, "uint", "0x00" & Hex($pix, 6))
    Next
    Next
    _GDIPlus_ImageSaveToFile($hBitmap, @ScriptDir & "\Test.png")
    _end()
    EndFunc ;==>getPixelcolor

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

    Func CLOSEClicked()
    _end()
    EndFunc ;==>CLOSEClicked

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

    Func _end()
    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_ImageDispose($chipset)
    _GDIPlus_Shutdown()
    ShellExecute(@ScriptDir & "\Test.png")
    Exit
    EndFunc ;==>_end

    [/autoit]

    Die Ideen waren die Gleichen!

    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™