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

Beiträge von BugFix

  • Office 07 design für autoit

    • BugFix
    • 29. Juli 2009 um 17:22

    Ich habe nicht die geringste Ahnung, wie Office 07 aussieht :D
    Wir verwenden in der Fa. ausschließlich die 2000er Version und bisher habe ich darin nichts vermißt, was man im Büroalltag braucht. ;)

    Also poste doch mal ein Bild von dem Style, den du meinst.

  • _FFFormOptionSelect() Wie soll das funktinonieren???

    • BugFix
    • 29. Juli 2009 um 17:10

    Auf diese Fragestellung kann dir niemand eine Antwort geben.
    Beschreibe bitte mit Codebsp., wo ein Problem bei der Anwendung des Befehls auftritt.
    Oder falls du nicht verstehst, welcher Parameter wofür verwendet wird, dann sag das ganz präzise.

    Und hab ruhig etwas Geduld, auch wenn im Durchschnitt bereits nach wenigen Minuten erste Antworten folgen, ist das bei diesem Thema nicht zu erwarten. Die FF.au3 ist eine spezielle UDF von Stilgar. Sie gehört nicht zum Standardumfang von AutoIt und somit kann dir auch die Mehrzahl der User dazu sicher nichts sagen. Ich z.B. verwende auch nicht den Fuchs als Browser und komme daher nie mit dieser UDF in Berührung.

  • TextMeter

    • BugFix
    • 29. Juli 2009 um 14:54
    Zitat von funkey

    Es sollte aber eine Standard-Schriftart geben, denn wenn man nichts auswählt stürzt das Skript ab.


    Danke für den Hinweis, wird sofort geändert. ;)

  • Farbige zeilen in ListView

    • BugFix
    • 29. Juli 2009 um 14:45

    Verstehe ich das jetzt richtig, du erstellst das LV mit _GUICtrlListView_Create()? Dann hast du keine Chance vernünftig mit Farben zu arbeiten. Zumal es gar keinen Sinn macht, diese Funktion zu nutzen. Sie ist (meiner ganz persönlichen Meinung nach) total überflüssig und eher verwirrend.
    Also einfach mit $ID_LV = GUICtrlCreateListView() das LV erstellen und mit $h_LV = GUICtrlGetHandle($ID_LV) das Handle holen, das du für etliche Funktionen der LV-UDF benötigst.

  • TextMeter

    • BugFix
    • 29. Juli 2009 um 14:33

    Hi,
    sicher kennt ihr das auch: mal schnell noch ein Label in die GUI einfügen, und dann dauernd probieren, ob die Maße zum verwendeten Font passen.
    Hier ein kleines Tool, um die erforderlichen Abmessungen zu ermitteln. Font mit Attributen auswählen, Text einfügen/schreiben und messen. Schon wißt ihr, wieviel Platz euer Text beansprucht. ;)

    Edit: Habe jetzt die Fontauswahl mit Standardfont vorbelegt.

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Include <Misc.au3>
    Opt("GUIOnEventMode", 1)
    Opt("MustDeclareVars", 1)
    Global $btChoose, $btMeasure, $cbBold, $cbItalic, $cbStrike, $cbUnderlined, $eText, $Group1, $gui, $inFont, $inHeight, $inSize
    Global $Label1, $Label2, $Label3, $Label4, $Label5, $Label6, $Label7, $Label8, $inWidth, $1stChoose = 1
    Global $bkCol = 0x1E90FF, $LemonChiffon = 0xFFFACD, $Salmon = 0xFA8072
    Global $aFont[8] = [8,0,'Courier New',10,400,0,0,0]

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

    $gui = GUICreate("TextMeter", 452, 367)
    GUISetOnEvent($GUI_EVENT_CLOSE, "guiClose")
    GUISetBkColor($bkCol)
    $Group1 = GUICtrlCreateGroup(" Font ", 15, 16, 420, 121)
    $inSize = GUICtrlCreateInput("", 331, 56, 35, 21, BitOR($ES_CENTER,$ES_READONLY))
    GUICtrlSetBkColor(-1, $LemonChiffon)
    $inFont = GUICtrlCreateInput("", 65, 56, 204, 21, BitOR($ES_CENTER,$ES_READONLY))
    GUICtrlSetBkColor(-1, $LemonChiffon)
    $Label1 = GUICtrlCreateLabel("Name", 30, 59, 32, 17)
    $btChoose = GUICtrlCreateButton("...", 388, 57, 20, 20, $WS_GROUP)
    GUICtrlSetOnEvent(-1, "btChooseClick")
    GUICtrlSetBkColor(-1, $Salmon)
    $Label2 = GUICtrlCreateLabel("PointSize", 280, 59, 48, 17)
    $Label4 = GUICtrlCreateLabel("FontAttribute", 30, 98, 64, 17)
    $cbItalic = GUICtrlCreateCheckbox("", 195, 96, 17, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    GUICtrlCreateLabel("Italic", 215, 98, 40)
    $cbUnderlined = GUICtrlCreateCheckbox("", 265, 96, 17, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    GUICtrlCreateLabel("Underlined", 285, 98, 60, 17)
    $cbStrike = GUICtrlCreateCheckbox("", 360, 96, 17, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    GUICtrlCreateLabel("Strike", 380, 98, 40, 17)
    $Label5 = GUICtrlCreateLabel("Auswahl", 379, 33, 44, 17)
    $cbBold = GUICtrlCreateCheckbox("", 120, 96, 17, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    GUICtrlCreateLabel("Bold", 140, 98, 40, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $eText = GUICtrlCreateEdit("", 15, 171, 420, 105)
    GUICtrlSetBkColor(-1, $LemonChiffon)
    $btMeasure = GUICtrlCreateButton("Ausmessen", 335, 288, 100, 20, $WS_GROUP)
    GUICtrlSetOnEvent(-1, "btMeasureClick")
    GUICtrlSetBkColor(-1, $Salmon)
    $Label3 = GUICtrlCreateLabel("Dein Text", 15, 152, 50, 17)
    $Label6 = GUICtrlCreateLabel("Benötigter Platz", 40, 322, 78, 17)
    $inWidth = GUICtrlCreateInput("", 140, 320, 60, 21, BitOR($ES_CENTER,$ES_READONLY))
    GUICtrlSetBkColor(-1, $LemonChiffon)
    $Label7 = GUICtrlCreateLabel("X", 220, 324, 11, 17)
    $inHeight = GUICtrlCreateInput("", 250, 320, 60, 21, BitOR($ES_CENTER,$ES_READONLY))
    GUICtrlSetBkColor(-1, $LemonChiffon)
    $Label8 = GUICtrlCreateLabel("pt", 330, 323, 26, 17)
    GUISetState(@SW_SHOW)

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

    setFont()

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

    While 1
    Sleep(100)
    WEnd

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

    Func btChooseClick()
    Local $aTmp
    If $1stChoose Then
    $aTmp = _ChooseFont()
    Else
    Local $weight = 400
    If BitAND($aFont[1], 1) Then $weight = 600
    $aTmp = _ChooseFont($aFont[2], $aFont[3], 0, $weight, BitAND($aFont[1], 2), BitAND($aFont[1], 4), BitAND($aFont[1], 8))
    EndIf
    If $aTmp = -1 Then Return
    $aFont = $aTmp
    $1stChoose = 0
    setFont()
    EndFunc

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

    Func setFont()
    If BitAND($aFont[1], 2) Then
    GUICtrlSetState($cbItalic, $GUI_CHECKED)
    Else
    GUICtrlSetState($cbItalic, $GUI_UNCHECKED)
    EndIf
    If BitAND($aFont[1], 4) Then
    GUICtrlSetState($cbUnderlined, $GUI_CHECKED)
    Else
    GUICtrlSetState($cbUnderlined, $GUI_UNCHECKED)
    EndIf
    If BitAND($aFont[1], 8) Then
    GUICtrlSetState($cbStrike, $GUI_CHECKED)
    Else
    GUICtrlSetState($cbStrike, $GUI_UNCHECKED)
    EndIf
    If $aFont[4] > 400 Then
    GUICtrlSetState($cbBold, $GUI_CHECKED)
    $aFont[1] = BitOR($aFont[1], 1)
    Else
    GUICtrlSetState($cbBold, $GUI_UNCHECKED)
    EndIf
    GUICtrlSetData($inFont, $aFont[2])
    GUICtrlSetData($inSize, $aFont[3])
    EndFunc

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

    Func btMeasureClick()
    Local $nText = GUICtrlRead($eText)
    If $nText = '' Then Return
    _GDIPlus_Startup()
    Local $hFormat = _GDIPlus_StringFormatCreate(0)
    Local $hFamily = _GDIPlus_FontFamilyCreate($aFont[2])
    Local $hFont = _GDIPlus_FontCreate($hFamily, $aFont[3], $aFont[1], 3)
    Local $tLayout = _GDIPlus_RectFCreate(15, 171, 0, 0)
    Local $hGraphic = _GDIPlus_GraphicsCreateFromHWND($gui)
    Local $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $nText, $hFont, $tLayout, $hFormat)
    Local $iWidth = Ceiling(DllStructGetData($aInfo[0], "Width"))
    Local $iHeight = Ceiling(DllStructGetData($aInfo[0], "Height"))
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_ShutDown()
    GUICtrlSetData($inHeight, $iHeight)
    GUICtrlSetData($inWidth, $iWidth)
    EndFunc

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

    Func guiClose()
    Exit
    EndFunc

    [/autoit]
  • Farbige zeilen in ListView

    • BugFix
    • 29. Juli 2009 um 12:51

    Nur Zeilen, geht einfacher:

    Spoiler anzeigen
    [autoit]

    #include <GuiListView.au3>
    #include <GUIConstantsEx.au3>
    GUICreate('Test')

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

    Global $aItem[30]

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

    $ListView1 = GUICtrlCreateListView("Spalte 1|Spalte 2", 15, 15, 300, 250)
    ;~ GUICtrlSetBkColor(-1, 0xFF4400) ; Farbe ungerade Zeilen
    ;~ GUICtrlSetBkColor(-1, $GUI_BKCOLOR_LV_ALTERNATE)
    _GUICtrlListView_SetColumnWidth($ListView1, 0, 148)
    _GUICtrlListView_SetColumnWidth($ListView1, 1, 148)

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

    For $i = 0 To UBound($aItem)-1
    $aItem[$i] = GUICtrlCreateListViewItem(Random(10000, 1000000, 1) & '|' & Random(10000, 1000000, 1), $ListView1)
    Switch $i
    Case 0,5,10,15,20,25
    GUICtrlSetBkColor(-1, 0xFFFF23)
    Case 1,6,11,16,21,26
    GUICtrlSetBkColor(-1, 0xFF4400)
    Case Else
    GUICtrlSetBkColor(-1, 0x1144FF)
    EndSwitch
    Next

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

    ; oder Farbe für ein einzelnes Item setzen
    ; GUICtrlSetBkColor($aItem[INDEX], FARBE)

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

    GUISetState()

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

    Do
    Until GUIGetMsg() = -3

    [/autoit]
  • Anpinnen von variablen Seitenleisten

    • BugFix
    • 28. Juli 2009 um 20:06

    Ist aber noch ein kleiner Bug drin, wenn ein Child geöffnet ist und du klickst auf das Label zum Öffnen eines anderen Childs, dann wird das Edit removed, müßte aber verkleinert bleiben. Naja, hast du wenigstens noch was zu pfriemeln. :P

  • Anpinnen von variablen Seitenleisten

    • BugFix
    • 28. Juli 2009 um 18:31

    Meinst du so:

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <WinAPI.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    Opt("GUIOnEventMode", 1)

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

    Global Const $AW_SLIDE = 0x40000
    Global Const $AW_HOR_POSITIVE = 0x1 ; left to right
    Global Const $AW_HOR_NEGATIVE = 0x2 ; right to left
    Global Const $AW_ACTIVATE = 0x20000 ; Activates the window
    Global Const $AW_HIDE = 0x10000
    Global Const $iPI = 3.1415926535897932384626433832795
    Global $aChild[3], $aLbl[3], $aGraphics[3], $hWnd, $guiMain, $edit, $closehWnd = 0
    Local $iHTitel = _WinAPI_GetSystemMetrics(4), $iWBorder = _WinAPI_GetSystemMetrics(32)+_WinAPI_GetSystemMetrics(5)
    Local $iWMain = 800, $iHMain = 600, $iWChild = 200, $iHChild = $iHMain-$iHTitel

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

    _GDIPlus_Startup()

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

    $guiMain = GUICreate('Main', $iWMain, $iHMain, -1, -1, Default, $GUI_WS_EX_PARENTDRAG)
    $hWnd = WinGetHandle($guiMain)
    GUISetOnEvent(-3, '_ende')
    $edit = GUICtrlCreateEdit('', 15, 15, $iWMain-50, $iHMain-30)
    $aLbl[0] = GUICtrlCreateLabel('', $iWMain-20, 0, 18, 70)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    GUICtrlSetOnEvent(-1, "_show")
    $aLbl[1] = GUICtrlCreateLabel('', $iWMain-20, 72, 18, 70)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    GUICtrlSetOnEvent(-1, "_show")
    $aLbl[2] = GUICtrlCreateLabel('', $iWMain-20, 144, 18, 70)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    GUICtrlSetOnEvent(-1, "_show")
    $hGraphics = _GDIPlus_GraphicsCreateFromHWND($guiMain)

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

    $aChild[0] = GUICreate("Child 1", $iWChild, $iHChild-$iWBorder, $iWMain-$iWChild-$iWBorder-21, 0, _
    $WS_CAPTION, $WS_EX_MDICHILD, $guiMain)

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

    $aChild[1] = GUICreate("Child 2", $iWChild, $iHChild-$iWBorder, $iWMain-$iWChild-$iWBorder-21, 0, _
    $WS_CAPTION, $WS_EX_MDICHILD, $guiMain)

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

    $aChild[2] = GUICreate("Child 3", $iWChild, $iHChild-$iWBorder, $iWMain-$iWChild-$iWBorder-21, 0, _
    $WS_CAPTION, $WS_EX_MDICHILD, $guiMain)

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

    GUISetState(@SW_SHOW, $GUImain)

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

    GDIPlus_SetAngledText($hGraphics, 'Pinn 1', 790, 35, 270, "Courier New", 12, 0xFF0000FF)
    GDIPlus_SetAngledText($hGraphics, 'Pinn 2', 790, 107, 270, "Courier New", 12, 0xFF0000FF)
    GDIPlus_SetAngledText($hGraphics, 'Pinn 3', 790, 179, 270, "Courier New", 12, 0xFF0000FF)

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

    While 1
    Sleep(100)
    WEnd

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

    Func _ende()
    Exit
    EndFunc

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

    Func _show()
    Local $ID = @GUI_CtrlId
    For $i = 0 To UBound($aChild) -1
    If ($aLbl[$i] = $ID) And (WinGetState($aChild[$i]) > 5) Then
    $closehWnd = WinGetHandle($aChild[$i])
    Return _hide()
    EndIf
    Next
    For $i = 0 To UBound($aLbl) -1
    If $aLbl[$i] = $ID Then _slideIn(WinGetHandle($aChild[$i]))
    Next
    For $i = 0 To UBound($aChild) -1
    If ($aLbl[$i] <> $ID) And (WinGetState($aChild[$i]) > 5) Then
    $closehWnd = WinGetHandle($aChild[$i])
    Return _hide()
    EndIf
    Next
    EndFunc

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

    Func _hide()
    Local $hWnd = @GUI_WinHandle
    If $closehWnd Then
    $hWnd = $closehWnd
    $closehWnd = 0
    EndIf
    Return _slideOut($hWnd)
    EndFunc

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

    Func _slideIn($hWnd)
    Local $width = $iWMain-30-$iWChild-$iWBorder-21
    ControlMove($guiMain, '', $edit, 15, 15, $width, $iHMain-30)
    AnimateWindow($hWnd, BitOR($AW_SLIDE, $AW_ACTIVATE, $AW_HOR_NEGATIVE))
    EndFunc

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

    Func _slideOut($hWnd)
    AnimateWindow($hWnd, BitOR($AW_SLIDE, $AW_HIDE, $AW_HOR_POSITIVE))
    Local $width = $iWMain-50
    ControlMove($guiMain, '', $edit, 15, 15, $width, $iHMain-30)
    EndFunc

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

    Func AnimateWindow($hWnd, $dwFlags, $dwTime=100)
    DllCall("user32", 'long', 'AnimateWindow', 'hwnd', $hWnd, 'long', $dwTime, 'long', $dwFlags)
    EndFunc

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

    ; #FUNCTION# ================================================================
    ; Name...........: GDIPlus_SetAngledText
    ; Description ...: Adds text to a graphic object at any angle.
    ; Syntax.........: GDIPlus_SetAngledText($hGraphic, $nText, [$iCentreX, [$iCentreY, [$iAngle , [$nFontName , _
    ; [$nFontSize, [$iARGB, [$iAnchor]]]]]]] )
    ; Parameters ....: $hGraphic - The Graphics object to receive the added text.
    ; $nText - Text string to be displayed
    ; $iCentreX - Horizontal coordinate of horixontal centre of the text rectangle (default = 0 )
    ; $iCentreY - Vertical coordinate of vertical centre of the text rectangle (default = 0 )
    ; $iAngle - The angle which the text will be place in degrees. (default = "" or blank = 0 )
    ; $nFontName - The name of the font to be used (default = "" or Blank = "Arial" )
    ; $nFontSize - The font size to be used (default = "" or Blank = 12 )
    ; $iARGB - Alpha(Transparency), Red, Green and Blue color (0xAARRGGBB) (Default= "" = random color
    ; or Default = Blank = 0xFFFF00FF )
    ; $iAnchor - If zero (default) positioning $iCentreX, $iCentreY values refer to centre of text string.
    ; If not zero positioning $iCentreX, $iCentreY values refer to top left corner of text string.
    ; Return values .: 1
    ; Author ........: Malkey
    ; Modified.......:
    ; Remarks .......: Call _GDIPlus_Startup() before starting this function, and call _GDIPlus_Shutdown()after function ends.
    ; Can enter calculation for Angle Eg. For incline, -ATan($iVDist / $iHDist) * 180 / $iPI , where
    ; $iVDist is Vertical Distance, $iHDist is Horizontal Distance, and, $iPI is Pi, (an added Global Const).
    ; When used with other graphics, call this function last. The MatrixRotate() may affect following graphics.
    ; Related .......: _GDIPlus_Startup(), _GDIPlus_Shutdown(), _GDIPlus_GraphicsDispose($hGraphic)
    ; Link ..........;
    ; Example .......; Yes
    ; ========================================================================================
    Func GDIPlus_SetAngledText($hGraphic, $nText, $iCentreX = 0, $iCentreY = 0, $iAngle = 0, $nFontName = "Arial", _
    $nFontSize = 12, $iARGB = 0xFFFF00FF, $iAnchor = 0)
    Local $x, $y, $iX, $iY, $iWidth, $iHeight
    Local $hMatrix, $iXt, $iYt, $hBrush, $hFormat, $hFamily, $hFont, $tLayout

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

    ; Default values
    If $iAngle = "" Then $iAngle = 0
    If $nFontName = "" Or $nFontName = -1 Then $nFontName = "Arial" ; "Microsoft Sans Serif"
    If $nFontSize = "" Then $nFontSize = 12
    If $iARGB = "" Then ; Randomize ARGB color
    $iARGB = "0xFF" & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2)
    EndIf

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

    $hFormat = _GDIPlus_StringFormatCreate(0)
    $hFamily = _GDIPlus_FontFamilyCreate($nFontName)
    $hFont = _GDIPlus_FontCreate($hFamily, $nFontSize, 1, 3)
    $tLayout = _GDIPlus_RectFCreate($iCentreX, $iCentreY, 0, 0)
    $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $nText, $hFont, $tLayout, $hFormat)
    $iWidth = Ceiling(DllStructGetData($aInfo[0], "Width"))
    $iHeight = Ceiling(DllStructGetData($aInfo[0], "Height"))

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

    ;Later calculations based on centre of Text rectangle.
    If $iAnchor = 0 Then ; Reference to middle of Text rectangle
    $iX = $iCentreX
    $iY = $iCentreY
    Else ; Referenced centre point moved to top left corner of text string.
    $iX = $iCentreX + (($iWidth - Abs($iHeight * Sin($iAngle * $iPI / 180))) / 2)
    $iY = $iCentreY + (($iHeight + Abs($iWidth * Sin($iAngle * $iPI / 180))) / 2)
    EndIf

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

    ;Rotation Matrix
    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixRotate($hMatrix, $iAngle, 1)
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)

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

    ;x, y are display coordinates of center of width and height of the rectanglular text box.
    ;Top left corner coordinates rotate in a circular path with radius = (width of text box)/2.
    ;Parametric equations for a circle, and adjustments for centre of text box
    $x = ($iWidth / 2) * Cos($iAngle * $iPI / 180) - ($iHeight / 2) * Sin($iAngle * $iPI / 180)
    $y = ($iWidth / 2) * Sin($iAngle * $iPI / 180) + ($iHeight / 2) * Cos($iAngle * $iPI / 180)

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

    ;Rotation of Coordinate Axes formulae - To display at x and y after rotation, we need to enter the
    ;x an y position values of where they rotated from. This is done by rotating the coordinate axes.
    ;Use $iXt, $iYt in _GDIPlus_RectFCreate. These x, y values is the position of the rectangular
    ;text box point before rotation. (before translation of the matrix)
    $iXt = ($iX - $x) * Cos($iAngle * $iPI / 180) + ($iY - $y) * Sin($iAngle * $iPI / 180)
    $iYt = -($iX - $x) * Sin($iAngle * $iPI / 180) + ($iY - $y) * Cos($iAngle * $iPI / 180)

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

    $hBrush = _GDIPlus_BrushCreateSolid($iARGB)
    $tLayout = _GDIPlus_RectFCreate($iXt, $iYt, $iWidth, $iHeight)
    _GDIPlus_GraphicsDrawStringEx($hGraphic, $nText, $hFont, $tLayout, $hFormat, $hBrush)

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

    ; Clean up resources
    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    $tLayout = ""
    Return 1
    EndFunc ;==>GDIPlus_SetAngledText

    [/autoit]
  • Anpinnen von variablen Seitenleisten

    • BugFix
    • 28. Juli 2009 um 16:47

    Ich habe es mal noch grafisch aufgewertet ;)

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <WinAPI.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    Opt("GUIOnEventMode", 1)

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

    Global Const $AW_SLIDE = 0x40000
    Global Const $AW_HOR_POSITIVE = 0x1 ; left to right
    Global Const $AW_HOR_NEGATIVE = 0x2 ; right to left
    Global Const $AW_ACTIVATE = 0x20000 ; Activates the window
    Global Const $AW_HIDE = 0x10000
    Global Const $iPI = 3.1415926535897932384626433832795
    Global $aChild[3], $aLbl[3], $aGraphics[3], $hWnd, $closehWnd = 0
    Local $iHTitel = _WinAPI_GetSystemMetrics(4), $iWBorder = _WinAPI_GetSystemMetrics(32)+_WinAPI_GetSystemMetrics(5)
    Local $iWMain = 800, $iHMain = 600, $iWChild = 200, $iHChild = $iHMain-$iHTitel

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

    _GDIPlus_Startup()

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

    $guiMain = GUICreate('Main', $iWMain, $iHMain, -1, -1, Default, $GUI_WS_EX_PARENTDRAG)
    $hWnd = WinGetHandle($guiMain)
    GUISetOnEvent(-3, '_ende')
    $aLbl[0] = GUICtrlCreateLabel('', $iWMain-20, 0, 18, 70)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    GUICtrlSetOnEvent(-1, "_show")
    $aLbl[1] = GUICtrlCreateLabel('', $iWMain-20, 72, 18, 70)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    GUICtrlSetOnEvent(-1, "_show")
    $aLbl[2] = GUICtrlCreateLabel('', $iWMain-20, 144, 18, 70)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    GUICtrlSetOnEvent(-1, "_show")
    $hGraphics = _GDIPlus_GraphicsCreateFromHWND($guiMain)

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

    $aChild[0] = GUICreate("Child 1", $iWChild, $iHChild-$iWBorder, $iWMain-$iWChild-$iWBorder-21, 0, _
    $WS_CAPTION, $WS_EX_MDICHILD, $guiMain)

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

    $aChild[1] = GUICreate("Child 2", $iWChild, $iHChild-$iWBorder, $iWMain-$iWChild-$iWBorder-21, 0, _
    $WS_CAPTION, $WS_EX_MDICHILD, $guiMain)

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

    $aChild[2] = GUICreate("Child 3", $iWChild, $iHChild-$iWBorder, $iWMain-$iWChild-$iWBorder-21, 0, _
    $WS_CAPTION, $WS_EX_MDICHILD, $guiMain)

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

    GUISetState(@SW_SHOW, $GUImain)

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

    GDIPlus_SetAngledText($hGraphics, 'Pinn 1', 790, 35, 270, "Courier New", 12, 0xFF0000FF)
    GDIPlus_SetAngledText($hGraphics, 'Pinn 2', 790, 107, 270, "Courier New", 12, 0xFF0000FF)
    GDIPlus_SetAngledText($hGraphics, 'Pinn 3', 790, 179, 270, "Courier New", 12, 0xFF0000FF)

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

    While 1
    Sleep(100)
    WEnd

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

    Func _ende()
    Exit
    EndFunc

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

    Func _show()
    Local $ID = @GUI_CtrlId
    For $i = 0 To UBound($aChild) -1
    If ($aLbl[$i] = $ID) And (WinGetState($aChild[$i]) > 5) Then
    $closehWnd = WinGetHandle($aChild[$i])
    Return _hide()
    EndIf
    Next
    For $i = 0 To UBound($aLbl) -1
    If $aLbl[$i] = $ID Then _slideIn(WinGetHandle($aChild[$i]))
    Next
    For $i = 0 To UBound($aChild) -1
    If ($aLbl[$i] <> $ID) And (WinGetState($aChild[$i]) > 5) Then
    $closehWnd = WinGetHandle($aChild[$i])
    Return _hide()
    EndIf
    Next
    EndFunc

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

    Func _hide()
    Local $hWnd = @GUI_WinHandle
    If $closehWnd Then
    $hWnd = $closehWnd
    $closehWnd = 0
    EndIf
    Return _slideOut($hWnd)
    EndFunc

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

    Func _slideIn($hWnd)
    AnimateWindow($hWnd, BitOR($AW_SLIDE, $AW_ACTIVATE, $AW_HOR_NEGATIVE))
    EndFunc

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

    Func _slideOut($hWnd)
    AnimateWindow($hWnd, BitOR($AW_SLIDE, $AW_HIDE, $AW_HOR_POSITIVE))
    EndFunc

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

    Func AnimateWindow($hWnd, $dwFlags, $dwTime=100)
    DllCall("user32", 'long', 'AnimateWindow', 'hwnd', $hWnd, 'long', $dwTime, 'long', $dwFlags)
    EndFunc

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

    ; #FUNCTION# ================================================================
    ; Name...........: GDIPlus_SetAngledText
    ; Description ...: Adds text to a graphic object at any angle.
    ; Syntax.........: GDIPlus_SetAngledText($hGraphic, $nText, [$iCentreX, [$iCentreY, [$iAngle , [$nFontName , _
    ; [$nFontSize, [$iARGB, [$iAnchor]]]]]]] )
    ; Parameters ....: $hGraphic - The Graphics object to receive the added text.
    ; $nText - Text string to be displayed
    ; $iCentreX - Horizontal coordinate of horixontal centre of the text rectangle (default = 0 )
    ; $iCentreY - Vertical coordinate of vertical centre of the text rectangle (default = 0 )
    ; $iAngle - The angle which the text will be place in degrees. (default = "" or blank = 0 )
    ; $nFontName - The name of the font to be used (default = "" or Blank = "Arial" )
    ; $nFontSize - The font size to be used (default = "" or Blank = 12 )
    ; $iARGB - Alpha(Transparency), Red, Green and Blue color (0xAARRGGBB) (Default= "" = random color
    ; or Default = Blank = 0xFFFF00FF )
    ; $iAnchor - If zero (default) positioning $iCentreX, $iCentreY values refer to centre of text string.
    ; If not zero positioning $iCentreX, $iCentreY values refer to top left corner of text string.
    ; Return values .: 1
    ; Author ........: Malkey
    ; Modified.......:
    ; Remarks .......: Call _GDIPlus_Startup() before starting this function, and call _GDIPlus_Shutdown()after function ends.
    ; Can enter calculation for Angle Eg. For incline, -ATan($iVDist / $iHDist) * 180 / $iPI , where
    ; $iVDist is Vertical Distance, $iHDist is Horizontal Distance, and, $iPI is Pi, (an added Global Const).
    ; When used with other graphics, call this function last. The MatrixRotate() may affect following graphics.
    ; Related .......: _GDIPlus_Startup(), _GDIPlus_Shutdown(), _GDIPlus_GraphicsDispose($hGraphic)
    ; Link ..........;
    ; Example .......; Yes
    ; ========================================================================================
    Func GDIPlus_SetAngledText($hGraphic, $nText, $iCentreX = 0, $iCentreY = 0, $iAngle = 0, $nFontName = "Arial", _
    $nFontSize = 12, $iARGB = 0xFFFF00FF, $iAnchor = 0)
    Local $x, $y, $iX, $iY, $iWidth, $iHeight
    Local $hMatrix, $iXt, $iYt, $hBrush, $hFormat, $hFamily, $hFont, $tLayout

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

    ; Default values
    If $iAngle = "" Then $iAngle = 0
    If $nFontName = "" Or $nFontName = -1 Then $nFontName = "Arial" ; "Microsoft Sans Serif"
    If $nFontSize = "" Then $nFontSize = 12
    If $iARGB = "" Then ; Randomize ARGB color
    $iARGB = "0xFF" & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2)
    EndIf

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

    $hFormat = _GDIPlus_StringFormatCreate(0)
    $hFamily = _GDIPlus_FontFamilyCreate($nFontName)
    $hFont = _GDIPlus_FontCreate($hFamily, $nFontSize, 1, 3)
    $tLayout = _GDIPlus_RectFCreate($iCentreX, $iCentreY, 0, 0)
    $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $nText, $hFont, $tLayout, $hFormat)
    $iWidth = Ceiling(DllStructGetData($aInfo[0], "Width"))
    $iHeight = Ceiling(DllStructGetData($aInfo[0], "Height"))

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

    ;Later calculations based on centre of Text rectangle.
    If $iAnchor = 0 Then ; Reference to middle of Text rectangle
    $iX = $iCentreX
    $iY = $iCentreY
    Else ; Referenced centre point moved to top left corner of text string.
    $iX = $iCentreX + (($iWidth - Abs($iHeight * Sin($iAngle * $iPI / 180))) / 2)
    $iY = $iCentreY + (($iHeight + Abs($iWidth * Sin($iAngle * $iPI / 180))) / 2)
    EndIf

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

    ;Rotation Matrix
    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixRotate($hMatrix, $iAngle, 1)
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)

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

    ;x, y are display coordinates of center of width and height of the rectanglular text box.
    ;Top left corner coordinates rotate in a circular path with radius = (width of text box)/2.
    ;Parametric equations for a circle, and adjustments for centre of text box
    $x = ($iWidth / 2) * Cos($iAngle * $iPI / 180) - ($iHeight / 2) * Sin($iAngle * $iPI / 180)
    $y = ($iWidth / 2) * Sin($iAngle * $iPI / 180) + ($iHeight / 2) * Cos($iAngle * $iPI / 180)

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

    ;Rotation of Coordinate Axes formulae - To display at x and y after rotation, we need to enter the
    ;x an y position values of where they rotated from. This is done by rotating the coordinate axes.
    ;Use $iXt, $iYt in _GDIPlus_RectFCreate. These x, y values is the position of the rectangular
    ;text box point before rotation. (before translation of the matrix)
    $iXt = ($iX - $x) * Cos($iAngle * $iPI / 180) + ($iY - $y) * Sin($iAngle * $iPI / 180)
    $iYt = -($iX - $x) * Sin($iAngle * $iPI / 180) + ($iY - $y) * Cos($iAngle * $iPI / 180)

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

    $hBrush = _GDIPlus_BrushCreateSolid($iARGB)
    $tLayout = _GDIPlus_RectFCreate($iXt, $iYt, $iWidth, $iHeight)
    _GDIPlus_GraphicsDrawStringEx($hGraphic, $nText, $hFont, $tLayout, $hFormat, $hBrush)

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

    ; Clean up resources
    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    $tLayout = ""
    Return 1
    EndFunc ;==>GDIPlus_SetAngledText

    [/autoit]
  • datei in ordner öffnen

    • BugFix
    • 27. Juli 2009 um 23:15
    Zitat von StreetFlame

    ist da irgendwas anderes dran?


    Du mußt nur den korrekten Pfad zur Verknüpfung (z.B. Desktop) verwenden:

    [autoit]

    Exit ShellExecute(@DesktopDir & '\Linkname.lnk')

    [/autoit]
  • datei in ordner öffnen

    • BugFix
    • 27. Juli 2009 um 23:05

    Nehmen wir an die andere Datei sei ein Bild: bild.jpg
    Dann kannst du z.B. in deinem Skript schreiben:

    [autoit]

    Exit ShellExecute(@ScriptDir & '\bild.jpg')

    [/autoit]


    Damit wird dein Skript beendet und gleichzeitig die andere Datei, die im gleichen Verzeichnis liegt (ScriptDir) aufgerufen.

  • Anpinnen von variablen Seitenleisten

    • BugFix
    • 27. Juli 2009 um 16:15

    Ah, OK - da hast du recht. :D

    Hier mal ein Bsp. mit Child-Window.

    Spoiler anzeigen
    [autoit]

    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    Opt("GUIOnEventMode", 1)

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

    Global Const $AW_SLIDE = 0x40000
    Global Const $AW_HOR_POSITIVE = 0x1 ; left to right
    Global Const $AW_HOR_NEGATIVE = 0x2 ; right to left
    Global Const $AW_ACTIVATE = 0x20000 ; Activates the window
    Global Const $AW_HIDE = 0x10000
    Global $hWnd

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

    $GUImain = GUICreate('Main', 800, 600, -1, -1, Default, $GUI_WS_EX_PARENTDRAG)
    GUISetOnEvent(-3, '_ende')
    $btPinn = GUICtrlCreateButton('', 770, 10, 15, 15)
    GUICtrlSetOnEvent(-1, "_show")
    GUICtrlCreateEdit('PINN', 770, 30, 15, 60, BitOR($ES_CENTER,$ES_MULTILINE,$ES_READONLY))

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

    $GUIchild = GUICreate("", 596, 578, 200, 0, Default, $WS_EX_MDICHILD, $GUImain)
    GUISetOnEvent(-3, "_hide")
    $hWnd = WinGetHandle($GUIchild)

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

    GUISetState(@SW_SHOW, $GUImain)

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

    While 1
    Sleep(100)
    WEnd

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

    Func _ende()
    Exit
    EndFunc

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

    Func _show()
    AnimateWindow($hWnd, BitOR($AW_SLIDE, $AW_ACTIVATE, $AW_HOR_NEGATIVE))
    EndFunc

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

    Func _hide()
    AnimateWindow($hWnd, BitOR($AW_SLIDE, $AW_HIDE, $AW_HOR_POSITIVE))
    EndFunc

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

    Func AnimateWindow($hWnd, $dwFlags, $dwTime=200)
    DllCall("user32", 'long', 'AnimateWindow', 'hwnd', $hWnd, 'long', $dwTime, 'long', $dwFlags)
    EndFunc

    [/autoit]
  • Wie füge ich eine video ein?

    • BugFix
    • 26. Juli 2009 um 23:28
    Zitat von Understood

    Ich glaub durch diese Fehlermeldung kannst du selber schließen was das Problem ist.
    Die Datei ist fehlerhaft, oder ist für die Ausführung für Windows nicht vorgesehen.


    Das ist u.U. ein Trugschluß. Jahrzehntelange Erfahrung mit Windows-Fehlermeldungen, läßt mich glauben, dass im Fehlerfall per Random ausgelost wird, welche Fehlermeldung gezeigt wird. :rofl:
    Das einzig Sichere: Windows kommt mit der Datei nicht klar, weiß aber selber nicht warum. Für solche Fehlermeldungen sollte man Programmierer verprügeln. Dann schon lieber keine Meldung. ;)

  • MouseGetPos Etwas komplexer (Programm)

    • BugFix
    • 26. Juli 2009 um 23:22

    Vielleicht beschreibst du einfach mal näher, was denn im Gegensatz zu MouseGetPos() von deiner Funktion für Features erbracht werden. Wo liegt der Mehrwert, was könnte mich reizen diese anzuwenden?

  • Nochmal Präsentation

    • BugFix
    • 26. Juli 2009 um 22:27

    Ich hab was Schönes für dich: Erstellen eines Excel-Diagramms (hier Torte) mit AutoIt.

  • Anpinnen von variablen Seitenleisten

    • BugFix
    • 26. Juli 2009 um 22:05

    Das Pinnen selbst könntest du hiermit lösen. Der Rest ist dann noch etwas Kosmetik ;)

  • VLC Problem

    • BugFix
    • 26. Juli 2009 um 20:32

    Da du die Datei abspielen kannst, ist der Inhalt unbeschädigt. Vermutlich sind im Header Informationen beschädigt. Du hast nicht geschrieben, was es für eine Videodatei ist. Aber für AVI hatte ich mal ein Programm mit dem der Header neu erstellt werden konnte, sollte es auch für andere Formate geben, denke ich. Viel Glück beim Suchen. ;)

  • Teile vom Bildschirm als Bild speichern?

    • BugFix
    • 26. Juli 2009 um 19:56

    Hier nochmal der Code, aber auf Basis eines gespeicherten Bildes.

    Basis *.bmp
    [autoit]

    #include <GDIPlus.au3>
    #include <ScreenCapture.au3>
    #include <WinAPI.au3>

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

    _Main()

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

    Func _Main()
    Local $hBitmap, $iX, $iY

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

    _GDIPlus_Startup()

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

    ; Capture 32 bit bitmap
    _ScreenCapture_Capture(@TempDir & '\capture.bmp')
    $hBitmap = _GDIPlus_BitmapCreateFromFile(@TempDir & '\capture.bmp')

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

    ; Create 24 bit bitmap clone
    $iX = _GDIPlus_ImageGetWidth ($hBitmap)
    $iY = _GDIPlus_ImageGetHeight ($hBitmap)

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

    MsgBox(0, 'Maße', 'Bildabmessung: ' & $iX & ' x ' & $iY)

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

    ; Clean up resources
    _WinAPI_DeleteObject ($hBitmap)

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

    ; Shut down GDI+ library
    _GDIPlus_ShutDown ()

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

    EndFunc ;==>_Main

    [/autoit]


    Edit:

    Basis *.jpg
    [autoit]

    #include <GDIPlus.au3>
    #include <ScreenCapture.au3>
    #include <WinAPI.au3>

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

    _Main()

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

    Func _Main()
    Local $hBitmap, $iX, $iY, $hImage

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

    _GDIPlus_Startup()

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

    ; Capture 32 bit bitmap
    _ScreenCapture_Capture(@TempDir & '\capture.jpg')
    $hBitmap = _GDIPlus_BitmapCreateFromFile(@TempDir & '\capture.jpg')
    $hImage = _GDIPlus_ImageLoadFromFile(@TempDir & '\capture.jpg')

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

    ; Create 24 bit bitmap clone
    $iX = _GDIPlus_ImageGetWidth($hImage); ($hBitmap)
    $iY = _GDIPlus_ImageGetHeight($hImage); ($hBitmap)

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

    MsgBox(0, 'Maße', 'Bildabmessung: ' & $iX & ' x ' & $iY)

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

    ; Clean up resources
    _WinAPI_DeleteObject ($hBitmap)

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

    ; Shut down GDI+ library
    _GDIPlus_ShutDown ()

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

    EndFunc ;==>_Main

    [/autoit]


    Gib mal in der SuFu Screencapture ein, da findest du schon etliche Lösungen.

  • Teile vom Bildschirm als Bild speichern?

    • BugFix
    • 26. Juli 2009 um 17:49

    Ich hab das Bsp. aus der Hilfe mal leicht verändert, so siehst du, wie du zu den Maßen kommst:

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <ScreenCapture.au3>
    #include <WinAPI.au3>

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

    _Main()

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

    Func _Main()
    Local $hWnd, $hBitmap, $hClone, $hImage, $iX, $iY, $hDC

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

    ; Initialize GDI+ library
    _GDIPlus_Startup ()

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

    ; Handle des aktiven Fensters holen
    $hWnd = WinGetHandle('[ACTIVE]')

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

    ; Capture 32 bit bitmap
    $hBitmap = _ScreenCapture_CaptureWnd ("", $hWnd)
    $hImage = _GDIPlus_BitmapCreateFromHBITMAP ($hBitmap)

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

    ; Create 24 bit bitmap clone
    $iX = _GDIPlus_ImageGetWidth ($hImage)
    $iY = _GDIPlus_ImageGetHeight ($hImage)

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

    MsgBox(0, 'Maße', 'Bildabmessung: ' & $iX & ' x ' & $iY)

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

    ; Clean up resources
    _GDIPlus_ImageDispose ($hClone)
    _GDIPlus_ImageDispose ($hImage)
    _WinAPI_DeleteObject ($hBitmap)

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

    ; Shut down GDI+ library
    _GDIPlus_ShutDown ()

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

    EndFunc ;==>_Main

    [/autoit] [autoit][/autoit] [autoit][/autoit]
  • Teile vom Bildschirm als Bild speichern?

    • BugFix
    • 26. Juli 2009 um 17:31
    Zitat von MrWong

    Aber eine Frage hab ich dann doch noch wie kann ich denn nun die Bildgröße herausfinden? Danke


    Ich verstehe den Sinn deiner Frage nicht. Du willst doch nur einen bestimmten Bildausschnitt capturen. Dafür übergibst du die Koordinaten - also weißt du doch, welche Abmessungen dein Bild hat.

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™