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

Beiträge von funkey

  • Drucker verbinden!

    • funkey
    • 27. Oktober 2011 um 09:15

    Vllt funktioniert es, wenn du bei ObjCreate den Usernamen und das Passwort angibst.

  • Bilder in Listbox und Edit

    • funkey
    • 17. Oktober 2011 um 12:25

    Beim Edit verwendest du am besten das RichEdit um Bilder anzuzeigen.

  • Taskmanager blocken? Ist das möglich...

    • funkey
    • 17. Oktober 2011 um 07:41

    Saguhilla:
    Es gibt überhaupt keinen Grund, diesen gelösten Thread nach über 1000 Tagen wiederzubeleben!! :cursing:
    Schon gar nicht, wenn der Code fast identisch mit dem aus Post 7 uind Post 21 ist!!
    Außerdem würde ich dir empfehlen, dass du dir einen anderen Avatar suchst. Dein jetziger gehört BugFix, und den hat kein anderer verdient!

  • GDI+ Bilder übereinander legen?

    • funkey
    • 14. Oktober 2011 um 17:36
    Zitat von button421

    Geil, danke!


    Nichts zu danken! Mittlerweile würde ich es mit GdiPlus machen.

    Zitat von button421

    Ich wäre bereit, das mit dir für LCD-Textdisplays zu erstellen


    ?( Wie meinst du das?

  • GDI+ Bilder übereinander legen?

    • funkey
    • 14. Oktober 2011 um 17:04

    Ich hatte da mal so was gemacht. Allerdings mit GraphicControls.

  • SB Zitate³

    • funkey
    • 14. Oktober 2011 um 16:32

    Da waren ja wieder mal geniale Sprüche dabei!! :thumbup:
    Danke für'S Sammeln Sprenger120!

  • @errorprobleme in Skript

    • funkey
    • 13. Oktober 2011 um 11:48

    ShellExecuteWait wird immer erolgreich ausgeführt, da das Programm ja gestartet werden kann. Du solltest RunWait verwenden und den @exitCode auswerten.

  • progandy hat Geburtstag!

    • funkey
    • 11. Oktober 2011 um 16:19

    Auch von mir noch alles Gute zum Geburtstag!! Bleib so wie du bist, vor allem aber gesund!

  • Labels mit durchscheinendem Hintergrund auf PicControls

    • funkey
    • 10. Oktober 2011 um 14:12

    Hab die Funktion noch ein wenig erweitert, damit das Control mit neuem Text und Farben upgedatet werden kann.
    Code nun komplett in AutoIt. Siehe Post#1

  • zustand eines Button`s erkennen

    • funkey
    • 10. Oktober 2011 um 09:05

    Schau dir mal ControlCommand an.

  • Labels mit durchscheinendem Hintergrund auf PicControls

    • funkey
    • 7. Oktober 2011 um 19:30

    Wen meinst du, UEZ? :D

    AndyTR: Der Nachteil bei meiner Methode ist, das GuiCtrlSetData() nicht mehr funktionieren kann, weil das Label in ein Pic-Control umgewandelt wird und der Text im Bild enthalten ist.

  • Labels mit durchscheinendem Hintergrund auf PicControls

    • funkey
    • 7. Oktober 2011 um 18:55

    Hab hier keine neue Version hochgeladen! :rolleyes: Hab nur gesagt, dass bei GuiCreate die Position zu ändern wäre! :D

    Außerdem habe ich das ganze jetzt selbst mal schnell nach AutoIt übersetzt und zwischenzeitlich hier gepostet.

  • Labels mit durchscheinendem Hintergrund auf PicControls

    • funkey
    • 7. Oktober 2011 um 15:08

    Das Programm muss als x86 ausgeführt werden.
    Außerdem habe ich vergessen, die Position bei GuiCreate zu ändern. Das hatte ich nur schnell eingefügt, um die Gui auf dem zweiten Bildschrim anzuzeigen.

  • Labels mit durchscheinendem Hintergrund auf PicControls

    • funkey
    • 7. Oktober 2011 um 13:57

    Irgendwo im Forum gab es eine Anfrage für sowas. UEZ hat das zwar gelöst, aber mir hatte es noch nicht ganz gefallen.

    Mit der Funktion _LabelMakeTranslucent() wird ein Label (Static) in ein Pic-Control (ebenfalls Static) umgewandelt. Danach wird der Bildbereich eines darunterliegenden Pic-Controls in das ehemalige Label geladen.

    Viel Spaß

    Spoiler anzeigen
    [autoit]


    #region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Res_LegalCopyright=funkey
    #AutoIt3Wrapper_UseX64=n
    #endregion ;**** Directives created by AutoIt3Wrapper_GUI ****

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

    #include <GDIPlus.au3>
    #include <Array.au3>

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

    Global $sFile1 = StringReplace(@AutoItExe, "AutoIt3.exe", "") & '\Examples\GUI\msoobe.jpg'
    Global $sFile2 = StringReplace(@AutoItExe, "AutoIt3.exe", "") & '\Examples\GUI\mslogo.jpg'

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

    Global $hGui = GUICreate("Test", 500, 500)

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

    Global $nTab = GUICtrlCreateTab(10, 10, 480, 480)
    GUICtrlCreateTabItem("Tab1")
    Global $nPic1 = GUICtrlCreatePic($sFile1, 20, 50, 460, 420, 0)

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

    Global $nLbl = GUICtrlCreateLabel("Text-Label", 100, 100, 100, 30)
    GUICtrlSetCursor(-1, 0)
    _LabelMakeTranslucent(-1, $nPic1, 0x50000000, 0xFFFFFFFF)

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

    GUICtrlCreateLabel("Text-Label", 100, 135, 100, 30, 0x201)
    GUICtrlSetCursor(-1, 0)
    _LabelMakeTranslucent(-1, $nPic1, 0x50000000, 0xFFFFFFFF)

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

    GUICtrlCreateLabel("Text-Label", 100, 170, 100, 30, 0x202)
    GUICtrlSetCursor(-1, 0)
    _LabelMakeTranslucent(-1, $nPic1, 0x50000000, 0xFFFFFFFF)

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

    GUICtrlCreateLabel("This is a translucent label", 100, 335, 200, 31, 0x201)
    _LabelMakeTranslucent(-1, $nPic1)

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

    GUICtrlCreateLabel("This is a transparent label", 300, 335, 200, 31, 0x201)

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

    GUICtrlCreateTabItem("Tab2")
    Global $nPic2 = GUICtrlCreatePic($sFile2, 20, 50, 460, 420, 0)

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

    GUICtrlCreateLabel("Translucent label", 30, 200, 100, 30, 0x201)
    _LabelMakeTranslucent(-1, $nPic2, 0x50FF00FF)

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

    GUICtrlCreateLabel("Transparent label", 30, 250, 100, 30, 0x201)

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

    GUICtrlCreateTabItem("")
    GUISetState()

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

    Sleep(1000)
    _LabelMakeTranslucent($nLbl, $nPic1, 0x305555f5, 0xFFf0f000, 1, "New Text")

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

    Do
    Until GUIGetMsg() = -3

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

    Func _LabelMakeTranslucent($nLbl, $nPic, $TransColor = 0x30FFFFFF, $FontColor = 0xFF000000, $StartGdip = 1, $sText = "", $iSize = 8, $sFontName = "Arial", $iStyle = 0)
    Local $hLbl = GUICtrlGetHandle($nLbl)
    Local $hPic = GUICtrlGetHandle($nPic)
    Local $hImage = _SendMessage($hPic, 371)
    Local $hParent = _WinAPI_GetParent($hLbl)
    Local $Style = _WinAPI_GetWindowLong($hLbl, -16)
    Local $iSS_CENTER = BitAND($Style, 0x1)
    Local $iSS_RIGHT = BitAND($Style, 0x2)
    Local $iSS_CENTERIMAGE = BitAND($Style, 0x200)
    Local $IsPic = BitAND($Style, 0xE)
    ConsoleWrite($IsPic & @CR)
    If $sText = "" Then $sText = GUICtrlRead($nLbl)
    If $IsPic = 0xE Then
    $iSS_CENTER = BitAND(GUICtrlRead($nLbl), 0x1)
    $iSS_RIGHT = BitAND(GUICtrlRead($nLbl), 0x2)
    $iSS_CENTERIMAGE = BitAND(GUICtrlRead($nLbl), 0x200)
    Else
    GUICtrlSetData($nLbl, $Style) ;remember the old style in text
    If $iSS_CENTER Then $Style = BitXOR($Style, 0x1) ;delete SS_CENTER
    _WinAPI_SetWindowLong($hLbl, -16, BitOR($Style, 0x200, 0xE))
    EndIf
    Local $aLblPos = ControlGetPos($hParent, "", $hLbl)
    Local $aPicPos = ControlGetPos($hParent, "", $nPic)
    If $StartGdip Then _GDIPlus_Startup()
    Local $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hImage)
    Local $hBitmap2 = _GDIPlus_BitmapCloneArea($hBitmap, $aLblPos[0] - $aPicPos[0], $aLblPos[1] - $aPicPos[1], $aLblPos[2], $aLblPos[3])
    Local $hGraphics = _GDIPlus_ImageGetGraphicsContext($hBitmap2)
    Local $hBrushArea = _GDIPlus_BrushCreateSolid($TransColor)
    _GDIPlus_GraphicsFillRect($hGraphics, 0, 0, $aLblPos[2], $aLblPos[3], $hBrushArea)
    Local $hBrushText = _GDIPlus_BrushCreateSolid($FontColor)
    Local $hFormat = _GDIPlus_StringFormatCreate()
    Local $hFontFamily = _GDIPlus_FontFamilyCreate($sFontName)
    Local $hFont = _GDIPlus_FontCreate($hFontFamily, $iSize, $iStyle)
    Local $tLayout = _GDIPlus_RectFCreate()
    If $iSS_CENTERIMAGE Then DllStructSetData($tLayout, 2, $aLblPos[3] / 2 - $iSize + 1) ;vertictal center
    Local $aInfo = _GDIPlus_GraphicsMeasureString($hGraphics, $sText, $hFont, $tLayout, $hFormat)
    If $iSS_CENTER Then DllStructSetData($aInfo[0], 1, ($aLblPos[2] - DllStructGetData($aInfo[0], 3)) / 2) ;horizontal center
    If $iSS_RIGHT Then DllStructSetData($aInfo[0], 1, $aLblPos[2] - DllStructGetData($aInfo[0], 3) - 1) ; right
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $sText, $hFont, $aInfo[0], $hFormat, $hBrushText)
    Local $hImageNew = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap2)
    _WinAPI_DeleteObject(GUICtrlSendMsg($nLbl, 370, 0, $hImageNew))
    _WinAPI_DeleteObject($hImageNew)
    _GDIPlus_ImageDispose($hBitmap)
    _GDIPlus_ImageDispose($hBitmap2)
    _GDIPlus_BrushDispose($hBrushArea)
    _GDIPlus_BrushDispose($hBrushText)
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFontFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_GraphicsDispose($hGraphics)
    If $StartGdip Then _GDIPlus_Shutdown()
    EndFunc ;==>_LabelMakeTranslucent

    [/autoit]

    Dateien

    Translucent_label.au3 4,64 kB – 529 Downloads
  • Teiltransparenter Label-Background

    • funkey
    • 5. Oktober 2011 um 13:51

    Dann wirst du sowieso nicht drum herum kommen, die einzelnen Labels auf den verschiedenen Seiten manuell sichtbar und unsichtbar zu schalten, egal ob du es mit dieser Funktion oder mit GDIPlus oder so erledigst.
    Eine andere Variante kenne ich noch nicht, bzw. fällt mir jetzt keine ein. :(

  • GUICtrlCreateList und Standard-auswahl

    • funkey
    • 5. Oktober 2011 um 13:32

    Schau dir mal _GUICtrlListBox_SetSel() an oder auch _GUICtrlListBox_SelItemRange().

  • Teiltransparenter Label-Background

    • funkey
    • 5. Oktober 2011 um 13:10

    Hab auf die schnelle diese Funktion gefunden. Da wird allerdings auch die Schrift transparent.

    Spoiler anzeigen
    [autoit]

    GUICreate("Test", 500, 500)
    GUISetBkColor(0xFF0000)

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

    GUICtrlCreateLabel("Transparent 1", 10, 10, 100, 30, 0x201)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    _GuiCtrlMakeTrans(-1, 200)

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

    GUICtrlCreateLabel("Transparent 2", 10, 90, 100, 30, 0x201)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    _GuiCtrlMakeTrans(-1, 100)

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

    GUISetState()

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

    Do
    Until GUIGetMsg() = -3

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

    Func _GuiCtrlMakeTrans($iCtrlID,$iTrans=255)

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

    Local $pHwnd, $nHwnd, $aPos, $a

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

    $hWnd = GUICtrlGetHandle($iCtrlID);Get the control handle
    If $hWnd = 0 then Return SetError(1,1,0)
    $pHwnd = DllCall("User32.dll", "hwnd", "GetParent", "hwnd", $hWnd);Get the parent Gui Handle
    If $pHwnd[0] = 0 then Return SetError(1,2,0)
    $aPos = ControlGetPos($pHwnd[0],"",$hWnd);Get the current pos of the control
    If @error then Return SetError(1,3,0)
    $nHwnd = GUICreate("", $aPos[2], $aPos[3], $aPos[0], $aPos[1], 0x80000000, 0x00080000 + 0x00000040, $pHwnd[0]);greate a gui in the position of the control
    If $nHwnd = 0 then Return SetError(1,4,0)
    $a = DllCall("User32.dll", "hwnd", "SetParent", "hwnd", $hWnd, "hwnd", $nHwnd);change the parent of the control to the new gui
    If $a[0] = 0 then Return SetError(1,5,0)
    If NOT ControlMove($nHwnd,'',$hWnd,0,0) then Return SetError(1,6,-1);Move the control to 0,0 of the newly created child gui
    GUISetState(@SW_Show,$nHwnd);show the new child gui

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

    WinSetTrans($nHwnd,"",$iTrans);set the transparency
    If @error then Return SetError(1,7,0)
    GUISwitch($pHwnd[0]);switch back to the parent Gui

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

    Return $nHwnd;Return the handle for the new Child gui

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

    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit]
  • Stringbearbeitung mit Python-Syntax

    • funkey
    • 3. Oktober 2011 um 13:28

    Nett, gefällt mir! :thumbup:
    Daran könnte man sich gewöhnen.

  • Ausgabestring Längengruppiert für bis zu 10 Werte

    • funkey
    • 1. Oktober 2011 um 20:27

    Nette Funktion!
    Ich bin aber kein Freund von 'Eval()' und Co.
    Und da StringFormat beinahe die selben Möglichkeiten bietet, habe ich das ganze mal kurz umgeschrieben.
    Hier das Ergebnis:

    Spoiler anzeigen
    [autoit]

    Local $aTest[8]

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

    For $i = 1 To 5
    For $j = 0 To UBound($aTest) - 1
    $aTest[$j] = Random(10, 10000, 1)
    Next
    ConsoleWrite(_LenGroupedOutput2(10, " ", 0, $aTest) & @CRLF)
    Next

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

    ConsoleWrite(@CRLF)

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

    For $i = 1 To 5
    For $j = 0 To UBound($aTest) - 1
    $aTest[$j] = Random(10, 10000, 1)
    Next
    ConsoleWrite(_LenGroupedOutput2(10, ".", 1, $aTest) & @CRLF)
    Next

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

    Func _LenGroupedOutput2($sLen, $charFill, $iAlign, $a)
    Local $sSinglePattern, $sPattern
    If Not IsArray($a) Then Return SetError(1)
    If UBound($a) > 32 Then Return SetError(2)

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

    If $iAlign = 0 Then
    $sSinglePattern = "%-" & $sLen & "s"
    Else
    $sSinglePattern = "%" & $sLen & "s"
    EndIf
    For $i = 1 To UBound($a)
    $sPattern &= $sSinglePattern
    Next
    ReDim $a[32]
    Local $sRet = StringFormat($sPattern, $a[0], $a[1], $a[2], $a[3], $a[4], $a[5], $a[6], $a[7], $a[8], $a[9], $a[10], $a[11], $a[12], $a[13], $a[14], $a[15], _
    $a[16], $a[17], $a[18], $a[19], $a[20], $a[21], $a[22], $a[23], $a[24], $a[25], $a[26], $a[27], $a[28], $a[29], $a[31], $a[31])
    Return StringReplace($sRet, " ", StringLeft($charFill, 1))
    EndFunc ;==>_LenGroupedOutput2

    [/autoit]
  • mein 1. fertiges Script

    • funkey
    • 30. September 2011 um 11:16

    Nachid: DOS ist da nicht so heikel wie Linux.
    @campweb: Der Spoiler kann dir nichts anhaben, ein Blick hinein schadet nicht!

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™