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

  • CD Lade | Virtueller CDladenknopf | Script für Faule

    • name22
    • 21. Februar 2012 um 22:20
    Zitat

    Wie wärs, wenn du ein Thread aufmachst mit einer Scriptsammlung von dir, den du einfach immer wieder aktualisierst, statt ständig einen neuen Thread wegen ein paar Zeilen Code aufzumachen?


    Damit alle Fragen/Rückmeldungen auch in einen Thread gestopft werden, und die Suche nach einem meiner Programme unnötig erschwert wird? :huh:

  • CD Lade | Virtueller CDladenknopf | Script für Faule

    • name22
    • 21. Februar 2012 um 21:27
    Zitat

    Öhm jedes Laufwerk schließt automatisch wenn du die lade leicht von vorne drückst ;). Das ist extra so gemacht.


    Das wusste ich auch schon ^^. Aber bei mir ist diese Lade so labil, dass ich entweder Angst bekomme, sie kaputtzumachen oder die CD verrutscht. (Und ein leichtes drücken genügt bei meinem CD Laufwerk leider auch nicht).

  • Wie steht ihr zu Fasching?

    • name22
    • 21. Februar 2012 um 21:25

    Ich hasse das ganze Narrengedöns... Man kommt kaum noch mit dem Auto von A nach B, weil die ganzen kleinen Dörfer hier nur mit einer Straße verbunden sind. Und die ist in den Städten natürlich überfüllt mit verkleideten Leuten, die denken man fände es lustig wenn Autofahrer sich zu wichtigen Terminen verspäten.

  • GDIPlus Digitaluhr

    • name22
    • 21. Februar 2012 um 21:21

    Cheater Dieter: Wird gemacht, gute Idee. ;)
    Andy OMG 50 Zeilen Code für ne Uhr Danke, deine Uhr sieht aber auch gut aus (allerdings ist der Code beeindruckender als die Uhr selbst ^^) :D.

  • CD Lade | Virtueller CDladenknopf | Script für Faule

    • name22
    • 21. Februar 2012 um 21:17

    Ich hab schon seit Ewigkeiten ein kleines Script im Hintergrund laufen, das per Klick auf F9 das CD Tray öffnet/schließt. Aber bei mir liegt es nicht an der Faulheit die Hand nen halben Meter zu bewegen sondern daran, dass der Knopf an meinem CD Laufwerk unter dem CD Tray sitzt. Ich muss also entweder meinen PC auf, statt unter den Schreibttisch stellen oder die Tastatur verwenden wenn ich nicht jedesmal meinen Arm bei dem Versuch verrenken will, diese Lade wieder zu schließen.
    Meine Version ist wesentlich praktischer und einfacher als deine, daher bin ich eher wenig beeindruckt.

  • GDIPlus Digitaluhr

    • name22
    • 21. Februar 2012 um 21:08

    Danke für das Feedback :). Ich werde in den nächsten Tagen mal versuchen den Quellcode ein wenig aufzuräumen und "universaler" zu gestalten (d.h. dass die Einstellungen wie Breite/Höhe und auch Schriftart und Farbe verändert werden können ohne den kompletten Code umzukrempeln. Ich habe die Koordinaten nämlich momentan mithilfe von Konstanten zurechtgebogen wodurch die Uhr allerdings auf das eine Font beschränkt wird.)

  • GDIPlus Digitaluhr

    • name22
    • 21. Februar 2012 um 15:23

    Das gibts doch nicht... Ich hab auch Win7 x64 und bei mir funktioniert es prima. Ich kann mir leider überhaupt nicht vorstellen woran das liegen könnte. :S

  • GDIPlus Digitaluhr

    • name22
    • 21. Februar 2012 um 15:19

    Hast du das Font installiert? Ich stell das mal als Anhang rein...

  • GDIPlus Digitaluhr

    • name22
    • 21. Februar 2012 um 14:38
    Zitat

    dit ändert it och nich. Wissn se. Dit is janz komisch. Ick klick da ruff, dann kommt dit au3 symbol für ne milisekunde un denn..isset wech.


    Seltsam... Vor allem wegen #NoTrayIcon.

  • GDIPlus Digitaluhr

    • name22
    • 21. Februar 2012 um 14:08

    Mein erstes neues Programm seit langem... Es ist nichts großes, aber ganz nett. Ich hoffe es gefällt euch :).
    Der Quellcode für die kleine Digitaluhr befindet sich im Anhang. Extradateien werden nicht benötigt, bis auf die Schriftart...
    Auf Windows XP scheint das ganze nicht korrekt zu funktionieren, aber das sollte nicht allzu tragisch sein. ;)

    Code
    [autoit]

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

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

    Opt("GUIOnEventMode", 1)

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

    $iWidth = 115
    $iHeight = 50
    $iX_Pos = @DesktopWidth / 2 - 56
    $iY_Pos = @DesktopHeight / 2 - 25

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

    #region -DLLStruct
    $tPoint = DllStructCreate($tagPOINT)
    DllStructSetData($tPoint, "X", 0)
    DllStructSetData($tPoint, "Y", 0)
    $tSize = DllStructCreate($tagSIZE)
    $pSize = DllStructGetPtr($tSize)
    DllStructSetData($tSize, "X", $iWidth)
    DllStructSetData($tSize, "Y", $iHeight)
    $tDest = DllStructCreate($tagPOINT)
    $pDest = DllStructGetPtr($tDest)
    DllStructSetData($tDest, "X", $iX_Pos)
    DllStructSetData($tDest, "Y", $iY_Pos)
    $tSource = DllStructCreate($tagPOINT)
    $pSource = DllStructGetPtr($tSource)
    $tBlend = DllStructCreate($tagBLENDFUNCTION)
    $pBlend = DllStructGetPtr($tBlend)
    DllStructSetData($tBlend, "Alpha", 255)
    DllStructSetData($tBlend, "Format", 1)
    #endregion -DLLStruct

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

    $hWnd = GUICreate("Clock", $iWidth, $iHeight, 0, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOOLWINDOW))
    GUISetState()

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

    $hDC_Window = _WinAPI_GetDC($hWnd)
    $hDC_Bitmap = _WinAPI_CreateCompatibleDC($hDC_Window)
    $hBitmap = _WinAPI_CreateCompatibleBitmap($hDC_Window, $iWidth, $iHeight)
    _WinAPI_SelectObject($hDC_Bitmap, $hBitmap)

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

    _GDIPlus_Startup()

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

    $hGraphics = _GDIPlus_GraphicsCreateFromHDC($hDC_Bitmap)
    _GDIPlus_GraphicsSetSmoothingMode($hGraphics, 2)
    _GDIPlus_GraphicsSetTextRenderingHint($hGraphics, 3)

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

    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate("Sony Sketch EF")
    $hFont = _GDIPlus_FontCreate($hFamily, 20)

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

    $tLayout_HourX10 = _GDIPlus_RectFCreate(0)
    $tLayout_HourX1 = _GDIPlus_RectFCreate(16)
    $tLayout_Colon1 = _GDIPlus_RectFCreate(34, $iHeight / 2 - 15)
    $tLayout_MinX10 = _GDIPlus_RectFCreate(40)
    $tLayout_MinX1 = _GDIPlus_RectFCreate(56)
    $tLayout_Colon2 = _GDIPlus_RectFCreate(74, $iHeight / 2 - 15)
    $tLayout_SecX10 = _GDIPlus_RectFCreate(80)
    $tLayout_SecX1 = _GDIPlus_RectFCreate(96)

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

    $hBrush_Numbers = _GetBrush()

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

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

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

    While Sleep(30)
    _GDIPlus_GraphicsClear($hGraphics, 0)

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

    $iSecX1 = Mod(@SEC, 10)
    $iSecX10 = Floor(@SEC / 10)
    $iMinX1 = Mod(@MIN, 10)
    $iMinX10 = Floor(@MIN / 10)
    $iHourX1 = Mod(@HOUR, 10)
    $iHourX10 = Floor(@HOUR / 10)

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

    $iY_SecX1 = @MSEC / 1000 * $iHeight / 3 - 9
    If $iSecX1 = 0 Then
    $iY_SecX10 = $iY_SecX1
    Else
    $iY_SecX10 = $iHeight / 3 - 9
    EndIf
    If @SEC = 0 Then
    $iY_MinX1 = $iY_SecX1
    Else
    $iY_MinX1 = $iHeight / 3 - 9
    EndIf
    If $iMinX1 = 0 And @SEC = 0 Then
    $iY_MinX10 = $iY_SecX1
    Else
    $iY_MinX10 = $iHeight / 3 - 9
    EndIf
    If @MIN = 0 And @SEC = 0 Then
    $iY_HourX1 = $iY_SecX1
    Else
    $iY_HourX1 = $iHeight / 3 - 9
    EndIf
    If $iHourX1 = 0 And @MIN = 0 And @SEC = 0 Then
    $iY_HourX10 = $iY_SecX1
    Else
    $iY_HourX10 = $iHeight / 3 - 9
    EndIf

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

    #region -Hours
    DllStructSetData($tLayout_HourX1, "Y", $iHeight - $iY_HourX1 - 15)
    If ($iHourX1 = 3 And $iHourX10 = 2) Or $iHourX1 = 9 Then
    _GDIPlus_GraphicsDrawStringEx($hGraphics, 0, $hFont, $tLayout_HourX1, $hFormat, $hBrush_Numbers)
    Else
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iHourX1 + 1, $hFont, $tLayout_HourX1, $hFormat, $hBrush_Numbers)
    EndIf

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

    DllStructSetData($tLayout_HourX1, "Y", $iHeight / 3 * 2 - $iY_HourX1 - 15)
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iHourX1, $hFont, $tLayout_HourX1, $hFormat, $hBrush_Numbers)

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

    DllStructSetData($tLayout_HourX1, "Y", $iHeight / 3 - $iY_HourX1 - 15)
    If $iHourX1 = 0 Then
    _GDIPlus_GraphicsDrawStringEx($hGraphics, 9, $hFont, $tLayout_HourX1, $hFormat, $hBrush_Numbers)
    Else
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iHourX1 - 1, $hFont, $tLayout_HourX1, $hFormat, $hBrush_Numbers)
    EndIf

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

    DllStructSetData($tLayout_HourX10, "Y", $iHeight - $iY_HourX10 - 15)
    If $iHourX10 = 2 Then
    _GDIPlus_GraphicsDrawStringEx($hGraphics, 0, $hFont, $tLayout_HourX10, $hFormat, $hBrush_Numbers)
    Else
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iHourX10 + 1, $hFont, $tLayout_HourX10, $hFormat, $hBrush_Numbers)
    EndIf

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

    DllStructSetData($tLayout_HourX10, "Y", $iHeight / 3 * 2 - $iY_HourX10 - 15)
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iHourX10, $hFont, $tLayout_HourX10, $hFormat, $hBrush_Numbers)

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

    DllStructSetData($tLayout_HourX10, "Y", $iHeight / 3 - $iY_HourX10 - 15)
    If $iHourX10 = 0 Then
    _GDIPlus_GraphicsDrawStringEx($hGraphics, 2, $hFont, $tLayout_HourX10, $hFormat, $hBrush_Numbers)
    Else
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iHourX10 - 1, $hFont, $tLayout_HourX10, $hFormat, $hBrush_Numbers)
    EndIf
    #endregion -Hours

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

    #region -Minutes
    DllStructSetData($tLayout_MinX1, "Y", $iHeight - $iY_MinX1 - 15)
    If $iMinX1 = 9 Then
    _GDIPlus_GraphicsDrawStringEx($hGraphics, 0, $hFont, $tLayout_MinX1, $hFormat, $hBrush_Numbers)
    Else
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iMinX1 + 1, $hFont, $tLayout_MinX1, $hFormat, $hBrush_Numbers)
    EndIf

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

    DllStructSetData($tLayout_MinX1, "Y", $iHeight / 3 * 2 - $iY_MinX1 - 15)
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iMinX1, $hFont, $tLayout_MinX1, $hFormat, $hBrush_Numbers)

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

    DllStructSetData($tLayout_MinX1, "Y", $iHeight / 3 - $iY_MinX1 - 15)
    If $iMinX1 = 0 Then
    _GDIPlus_GraphicsDrawStringEx($hGraphics, 9, $hFont, $tLayout_MinX1, $hFormat, $hBrush_Numbers)
    Else
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iMinX1 - 1, $hFont, $tLayout_MinX1, $hFormat, $hBrush_Numbers)
    EndIf

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

    DllStructSetData($tLayout_MinX10, "Y", $iHeight - $iY_MinX10 - 15)
    If $iMinX10 = 5 Then
    _GDIPlus_GraphicsDrawStringEx($hGraphics, 0, $hFont, $tLayout_MinX10, $hFormat, $hBrush_Numbers)
    Else
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iMinX10 + 1, $hFont, $tLayout_MinX10, $hFormat, $hBrush_Numbers)
    EndIf

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

    DllStructSetData($tLayout_MinX10, "Y", $iHeight / 3 * 2 - $iY_MinX10 - 15)
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iMinX10, $hFont, $tLayout_MinX10, $hFormat, $hBrush_Numbers)

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

    DllStructSetData($tLayout_MinX10, "Y", $iHeight / 3 - $iY_MinX10 - 15)
    If $iMinX10 = 0 Then
    _GDIPlus_GraphicsDrawStringEx($hGraphics, 5, $hFont, $tLayout_MinX10, $hFormat, $hBrush_Numbers)
    Else
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iMinX10 - 1, $hFont, $tLayout_MinX10, $hFormat, $hBrush_Numbers)
    EndIf
    #endregion -Minutes

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

    #region -Seconds
    DllStructSetData($tLayout_SecX1, "Y", $iHeight - $iY_SecX1 - 15)
    If $iSecX1 = 9 Then
    _GDIPlus_GraphicsDrawStringEx($hGraphics, 0, $hFont, $tLayout_SecX1, $hFormat, $hBrush_Numbers)
    Else
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iSecX1 + 1, $hFont, $tLayout_SecX1, $hFormat, $hBrush_Numbers)
    EndIf

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

    DllStructSetData($tLayout_SecX1, "Y", $iHeight / 3 * 2 - $iY_SecX1 - 15)
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iSecX1, $hFont, $tLayout_SecX1, $hFormat, $hBrush_Numbers)

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

    DllStructSetData($tLayout_SecX1, "Y", $iHeight / 3 - $iY_SecX1 - 15)
    If $iSecX1 = 0 Then
    _GDIPlus_GraphicsDrawStringEx($hGraphics, 9, $hFont, $tLayout_SecX1, $hFormat, $hBrush_Numbers)
    Else
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iSecX1 - 1, $hFont, $tLayout_SecX1, $hFormat, $hBrush_Numbers)
    EndIf

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

    DllStructSetData($tLayout_SecX10, "Y", $iHeight - $iY_SecX10 - 15)
    If $iSecX10 = 5 Then
    _GDIPlus_GraphicsDrawStringEx($hGraphics, 0, $hFont, $tLayout_SecX10, $hFormat, $hBrush_Numbers)
    Else
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iSecX10 + 1, $hFont, $tLayout_SecX10, $hFormat, $hBrush_Numbers)
    EndIf

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

    DllStructSetData($tLayout_SecX10, "Y", $iHeight / 3 * 2 - $iY_SecX10 - 15)
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iSecX10, $hFont, $tLayout_SecX10, $hFormat, $hBrush_Numbers)

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

    DllStructSetData($tLayout_SecX10, "Y", $iHeight / 3 - $iY_SecX10 - 15)
    If $iSecX10 = 0 Then
    _GDIPlus_GraphicsDrawStringEx($hGraphics, 5, $hFont, $tLayout_SecX10, $hFormat, $hBrush_Numbers)
    Else
    _GDIPlus_GraphicsDrawStringEx($hGraphics, $iSecX10 - 1, $hFont, $tLayout_SecX10, $hFormat, $hBrush_Numbers)
    EndIf
    #endregion -Seconds

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

    _GDIPlus_GraphicsDrawStringEx($hGraphics, ":", $hFont, $tLayout_Colon1, $hFormat, $hBrush_Numbers)
    _GDIPlus_GraphicsDrawStringEx($hGraphics, ":", $hFont, $tLayout_Colon2, $hFormat, $hBrush_Numbers)

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

    _WinAPI_UpdateLayeredWindow($hWnd, $hDC_Window, $pDest, $pSize, $hDC_Bitmap, $pSource, 0, $pBlend, $ULW_ALPHA)
    WEnd

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

    Func _GetBrush()
    $hBitmapTmp = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hGraphics)
    $hGraphicsTmp = _GDIPlus_ImageGetGraphicsContext($hBitmapTmp)
    $hBrushTmp1 = _GDIPlus_LineBrushCreate(0, $iHeight / 2 - 17, 0, $iHeight / 2, 0, 0xD0A0A0A0)
    $hBrushTmp2 = _GDIPlus_LineBrushCreate(0, $iHeight / 2, 0, $iHeight / 2 + 17, 0xD0A0A0A0, 0)

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

    _GDIPlus_GraphicsFillRect($hGraphicsTmp, 0, $iHeight / 2 - 17, $iWidth, 17, $hBrushTmp1)
    _GDIPlus_GraphicsFillRect($hGraphicsTmp, 0, $iHeight / 2, $iWidth, 17, $hBrushTmp2)
    $hReturn = _GDIPlus_TextureCreate($hBitmapTmp, 4)

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

    _GDIPlus_GraphicsDispose($hGraphicsTmp)
    _GDIPlus_BitmapDispose($hBitmapTmp)
    _GDIPlus_BrushDispose($hBrushTmp1)
    _GDIPlus_BrushDispose($hBrushTmp2)

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

    Return $hReturn
    EndFunc

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

    Func _Exit()
    Exit
    EndFunc ;==>_Exit

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

    Func _Shutdown()
    _WinAPI_ReleaseDC($hWnd, $hDC_Window)
    _WinAPI_DeleteDC($hDC_Bitmap)
    _WinAPI_DeleteObject($hBitmap)

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

    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_BrushDispose($hBrush_Numbers)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_Shutdown()
    EndFunc ;==>_Shutdown

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

    #region GDIP Functions
    Func _GDIPlus_GraphicsSetTextRenderingHint($hGraphics, $iTextRenderingHint)
    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "hwnd", $hGraphics, "int", $iTextRenderingHint)

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

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

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

    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] [autoit][/autoit] [autoit]

    Func _GDIPlus_TextureCreate($hImage, $iWrapMode = 0)
    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateTexture", "hwnd", $hImage, "int", $iWrapMode, "int*", 0)

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

    If @error Then Return SetError(@error, @extended, 0)
    $GDIP_STATUS = $aResult[0]
    Return $aResult[3]
    EndFunc ;==>_GDIPlus_TextureCreate
    #endregion GDIP Functions

    [/autoit]

    Dateien

    Digital Clock.au3 11,11 kB – 520 Downloads sony_sketch_ef.zip 106,59 kB – 477 Downloads
  • Andy hat Geburtstag

    • name22
    • 6. Februar 2012 um 13:27

    Von mir auch alles Gute nachträglich :thumbup: .

  • Schnitzel hat Geburtstag !

    • name22
    • 6. Februar 2012 um 13:24

    Happy Birthday Schnitzel ;). Zum Glück hab ich deinen Thread noch gesehen. Ich will gar nicht wissen wie viele Geburtstage ich jetzt schon verpasst hab...

  • _GDIPlus_GraphicsDrawStringEx / Buchstaben zentrieren??

    • name22
    • 6. Februar 2012 um 09:43
    Zitat

    Kann man das "$tagRECT" nicht mithilfe der Schwarzwerte im Bild berechnen??


    Das wäre wahrscheinlich auch ziemlich langsam und unzuverlässig. Aber möglich ist es...

  • Probleme mit neuem INet-Anschluss bei der Telekom

    • name22
    • 28. Januar 2012 um 15:08

    Hmm.. Da hast du schon recht. Das Problem ist jetzt nur, das der Telekom klarzumachen ^^. Ich werd einfach weiterhin versuchen jemanden zu erreichen der auch was bewirken kann.
    Was mich wundert, ist dass der Typ noch nicht versucht hat den Vertrag komplett auf einmal abzubezahlen, ich weiß das es diese möglichkeit zumindest bei 1&1 gab. Vielleicht hat er ja nicht genügend Kohle...

  • _Ftp_FileRead gibt Text in Hex Format wieder ...

    • name22
    • 28. Januar 2012 um 15:02
    Zitat von Hilfe

    ...Gibt den gelesenen Binary/String zurück.


    Das ist einfach nur im Binärformat. Wandel es doch einfach nach Bedarf um.

    [autoit]

    MsgBox(0,"",BinaryToString("0x6173647361"))

    [/autoit]
  • Was geht da schief?

    • name22
    • 28. Januar 2012 um 14:54

    Vermutlich... Eigenartiger Fehler.
    So klappt es natürlich:

    [autoit]

    $start = TimerInit()
    $counter=0
    do
    Sleep(100)
    $counter+=1
    ConsoleWrite($counter / 10 & @CRLF)
    Until TimerDiff($start)>20000

    [/autoit]
  • Run/Shellexecute | ProzessID?

    • name22
    • 28. Januar 2012 um 13:54
    Zitat

    ShellExecute ist für alle Dateien und schaut erst nach mit welchem Programm es die Datei öffnen soll. Ich empfele immer ShellExecute zu verwenden.


    Das liegt daran, dass das über den Shellexecute Befehl der Shell32.dll läuft. Im Grunde ist es das selbe als würde man die Datei vom Explorer aus öffnen. Außerdem kann man bei Shellexecute auch spezifizieren was mit der Datei gemacht werden soll (öffnen, ausführen etc.).
    Mit Run kannst du auch auf den Standard Input/Ouput Stream des Programms zugreifen (nützlich für die Kommunikation zwischen Programmen).

  • Probleme mit neuem INet-Anschluss bei der Telekom

    • name22
    • 28. Januar 2012 um 13:50

    Hallo allerseits.
    Ich hab jetzt, seit ich vor ca. 1,5 Monaten umgezogen bin, keinen Internet-/Telefonanschluss im neuen Haus (deswegen war ich auch so gut wie nie im Forum online)...
    Die einzige Möglichkeit dort einen Anschluss zu bekommen ist über die Telekom :( . Leider muss der vorherige Besitzer den Vertrag noch bis zum August halten und bezahlen. Die Daten für den Anschluss will er aber nicht rausrücken...
    Eine Möglichkeit an einen Anschluss zu kommen wäre es, den Vertrag an uns zu übertragen. Leider lässt die Telekom das nur innerhalb von Familienmitgliedern zu, oder um den Vertrag auf die eigene Firma zu übertragen etc.
    Eine weitere Möglichkeit wäre, den ursprünglichen Vertrag samt Anschluss komplett zu sperren (das dauert aber auch ewig). Ich hab mich schon mehrmals mit denen in Verbindung gesetzt, aber wirklich was gebracht hat das nichts.
    Hat jemand eine Idee was es da noch zu machen gäbe, oder kann ich wirklich nur warten? (Internet übers Handynetz kann man dort übrigens auch vergessen, das ist ein kleines Kaff mit max. GPRS Standard und der Empfang ist auch schlecht :pinch: ).

  • _GDIPlus_GraphicsDrawStringEx / Buchstaben zentrieren??

    • name22
    • 28. Januar 2012 um 13:03

    Die Breite und Höhe eines Strings in einer bestimmten Schriftart kannst du mit

    [autoit]

    _GDIPlus_GraphicsMeasureString

    [/autoit]

    messen (Daten sind in einem DLLStruct im ersten Element des zurückgegebenen Arrays). Dann könntest du die Position so errechnen:
    X = Fensterbreite / 2 - Stringbreite / 2
    Y = Fensterhöhe / 2 - Stringhöhe / 2
    Und dann kannst du ein neues Layout mit der RectF Funktion erstellen.

    In der Hilfe müsste ein Beispiel zu der Funktion sein, und Oscar hat glaube ich auch mal ein Beispiel dafür geschrieben.
    Wenn du den Text mit FormatSetAlign zentrierst, dann musst du das Rechteck auch am linken Rand des Fensters lassen, ansonsten wird der Text irgendwo anders zentriert ;).

  • Wie Endlos-Schleife mit wenig CPU Last "bauen"?

    • name22
    • 9. November 2011 um 16:21
    Zitat

    dann wird die Schleife eventuell halt "nur" 500 mal pro sekunde ausgeführt


    In der Theorie... Leider ist die Sleep Funktion bei Werten unter 50 Millisekunden extrem ungenau. Und weniger als 10 - 20 ms sind meistens sowieso nicht drin. Wenn du Zeit hast, 5 Minuten auf deine Berechnung zu warten, dann fügst du halt ein Sleep(1000) ein. Das wäre wohl "Prozessorfreundlich". Allerdings ist der Prozessor nunmal da um Dinge zu berechnen, und er wird auch nicht sofort komplett ausgelastet sein von ein paar kleineren Berechnungen. Selbst umfangreichere Rechnungen wie die von einigen 2D Spielen hier im Forum lasten den Prozessor bei einer Pause von 20 ms nicht allzu sehr aus. Wenn du sofort Ergebnisse sehen willst, dann lass das Sleep weg. Es wird nicht sofort den Prozessor überhitzen...

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™