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

  • CSV-Editor V0.8 (Stand 23.04.2010)

    • funkey
    • 27. April 2010 um 17:41

    Danke Simon!
    Noch irgendwelche Vorschläge, Kommentare, Bugs?

  • Brettspiel Snakes and Ladders

    • funkey
    • 26. April 2010 um 17:44

    Nettes Spiel.
    Es hat aber noch ein paar Bugs.
    - Die Labels zur Spielerauswahl sind bei mir zu kurz. Ich kann das letzte 'r' von Spieler nicht mehr sehen
    - Hab Einzelplayer gespielt, nachdem ich gewonnen hatte, kam die entsprechende MsgBox, aber das Spiel lief weiter, jedoch konnte natürlich nur noch der Bot weiterkommen.
    - Die Icons sind ja riesig!! (5 Icons haben 866 kB)
    - Du könntest die Icons (kleinere wären nett) und das Hintergrundbild mit FileInstall in die Exe aufnehmen.
    - Sounds wären cool


    mfg funkey

  • CSV-Editor V0.8 (Stand 23.04.2010)

    • funkey
    • 23. April 2010 um 20:48

    Bin mittlerweile schon bei Version 0.8!

    Neuerungen

    ;Version 0.7: April 08, 2010

    ;Added: Icon
    ;Added: Save file when exiting
    ;Added asterisk (star) to see if file has changed
    ;Added in context menu: row to clip
    ;Added in context menu: column to clip
    ;Added: Support full CSV format <-- thanks a lot to progandy!!
    ;Added: Enter @CRLF to item with Ctrl+{Enter}


    ;Version 0.8: April 23, 2010

    ;Added: Cut, copy and paste rows
    ;Added: Renew index after changing row(s)
    ;Added: Accelerators
    ;Added: Search and replace strings
    ;Added: Hide toolbar if you want
    ;Added: Buttons for row up / row down
    ;Added: Create new file

  • Countdown In Msg Box

    • funkey
    • 23. April 2010 um 09:17
    [autoit]

    #Include <Timers.au3>

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

    $hGui = GUICreate("")
    $Timer = _Timer_SetTimer($hGui, 1000, "_UpdateMsgBox")
    MsgBox(262144 + 64, "Countdown", 10, 10)
    _Timer_KillTimer($hGui, $Timer)

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

    Func _UpdateMsgBox($hWnd, $Msg, $iIDTimer, $dwTime)
    Local $sText = ControlGetText("Countdown", "", "Static2")
    ControlSetText("Countdown", "", "Static2", $sText - 1)
    EndFunc

    [/autoit]
  • GDI+ Laser-Text

    • funkey
    • 23. April 2010 um 08:59

    Wow!! :thumbup:
    Einfach nur große Klasse!!

  • In welcher Dll sind die Bilder von _GuiCtrlToolbar

    • funkey
    • 22. April 2010 um 07:47

    Gibt es schon eine UDF um Icons aus der ImageList zu extrahieren?

  • MP3-Sortierer

    • funkey
    • 21. April 2010 um 20:49

    Das war eines meiner ersten Skripts, hab damit ca. 10000 mp3's in 10 Sekunden eingeordnet!
    Skript zum Einordnen von MP3's
    Ist zwar ganz simpel und unflexibel, funktioniert aber super.

  • Editor übersetzen probleme

    • funkey
    • 20. April 2010 um 17:48

    Natürlich gibt es bei Autoit auch das doppelte '=='. Man kan es beim Vergleichen von Strings hernehmen um auf CaseSensitive zu überprüfen!

    [autoit]

    Local $String = "Test"

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

    If $String = "test" Then MsgBox(0,"", "ohne case sensitive")
    If $String == "test" Then MsgBox(0,"=", "mit case sensitive")
    If $String == "Test" Then MsgBox(0,"==", "mit case sensitive")

    [/autoit]
  • Bitte auf verschiedenen Systemen testen und anpassen -->_GuiCtrlListView_MarkItem

    • funkey
    • 20. April 2010 um 17:34

    Bugfix, mit dem Brush kann man jetzt aber nicht mehr die Linienstärke einstellen, ist aber eigentlich sogar besser, weil jetzt die Markierung nicht mehr über das Subitem hinaussteht.
    Ich hatte eigentlich ursprünglich nicht vor die Markierung immer wieder zu erneuern, wenn sie durch scrollen verloren geht, aber wenn jemand eine gute Lösung dafür hat, dann habe ich nichts dagegen einzuwenden.

    Hab die Funktion noch mal erweitert, um entweder das ganze Item zu markieren oder nur wein Subitem.
    Ich hoffe auch, dass sich UEZ hier mal meldet, weil auf seinem System die Markierung nicht richtig positioniert wurde.

    Spoiler anzeigen
    [autoit]

    #include <Array.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <GuiListView.au3>
    #include <WinAPI.au3>

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

    Local $hGui, $listview, $button, $button2, $item1, $item2, $item3, $item4, $item5, $msg

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

    $hGui = GUICreate("listview items", 220, 250, 100, 200)

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

    $listview = GUICtrlCreateListView("col1 |col2|col3|col4 ", 10, 10, 200, 150, -1, 0x21)
    $button = GUICtrlCreateButton("Mark SubItem", 25, 170, 80, 20)
    $button2 = GUICtrlCreateButton("Mark Item", 110, 170, 80, 20)
    $item1 = GUICtrlCreateListViewItem("item1|col12|col13|col14", $listview)
    $item2 = GUICtrlCreateListViewItem("item2|col22|col23|col24", $listview)
    $item3 = GUICtrlCreateListViewItem("item3|col32|col33|col34", $listview)
    $item4 = GUICtrlCreateListViewItem("item4|col42|col43|col44", $listview)
    $item5 = GUICtrlCreateListViewItem("item5|col52|col53|col54", $listview)
    GUISetState()

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

    Do
    $msg = GUIGetMsg()

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

    Select
    Case $msg = $button
    _GuiCtrlListView_MarkItem($hGui, $listview, Random(0, 4, 1), Random(0, 3, 1))
    Case $msg = $button2
    _GuiCtrlListView_MarkItem($hGui, $listview, Random(0, 4, 1), -1, 0xff00)
    EndSelect
    Until $msg = $GUI_EVENT_CLOSE

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

    Func _GuiCtrlListView_MarkItem($hWndGui, $hWnd, $iIndex, $iSubItem, $Color = 0xFF, $Redraw = 1)
    ;funkey April 16, 2010
    Local $iSubItemHelp = $iSubItem
    Local $aWndSize = WinGetPos($hWndGui)
    Local $aWndClientSize = WinGetClientSize($hWndGui)
    Local $aPos = ControlGetPos($hWndGui, "", $hWnd)

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

    Local $tRECT = DllStructCreate('int Left;int Top;int Right;int Bottom')
    If $iSubItem = -1 Then $iSubItemHelp = 0
    Local $aRect = _GUICtrlListView_GetSubItemRect($hWnd, $iIndex, $iSubItemHelp)
    If $iSubItem = 0 Then $aRect[2] = _GUICtrlListView_GetColumnWidth($hWnd, 0)

    DllCall("user32", 'long', 'SetRect', 'ptr', DllStructGetPtr($tRECT), _
    'long', $aRect[0] + $aPos[0] + $aWndSize[2] - $aWndClientSize[0], _
    'long', $aRect[1] + $aPos[1] + $aWndSize[3] - $aWndClientSize[1], _
    'long', $aRect[2] + $aPos[0] + $aWndSize[2] - $aWndClientSize[0], _
    'long', $aRect[3] + $aPos[1] + $aWndSize[3] - $aWndClientSize[1])

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

    If $Redraw Then _WinAPI_RedrawWindow($hWndGui)

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

    Local $hDC, $hBrush, $obj_orig
    $hDC = _WinAPI_GetWindowDC($hWndGui)
    $hBrush = _WinAPI_CreateSolidBrush($Color)
    $obj_orig = _WinAPI_SelectObject($hDC, $hBrush)
    _WinAPI_FrameRect($hDC, DllStructGetPtr($tRECT), $hBrush)

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

    ; clear resources
    _WinAPI_SelectObject($hDC, $obj_orig)
    _WinAPI_DeleteObject($hBrush)
    _WinAPI_ReleaseDC($hWndGui, $hDC)
    EndFunc ;==>_GuiCtrlListView_MarkItem

    [/autoit]
  • Bitte auf verschiedenen Systemen testen und anpassen -->_GuiCtrlListView_MarkItem

    • funkey
    • 20. April 2010 um 12:23

    Ich weiß, die Frage war aber nur, ob der Rahmen für das jeweilige SubItem passt ;).

  • Bitte auf verschiedenen Systemen testen und anpassen -->_GuiCtrlListView_MarkItem

    • funkey
    • 20. April 2010 um 09:41

    Danke für's testen!
    Hab's noch einmal überarbeitet:

    Spoiler anzeigen
    [autoit]

    #include <Array.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <GuiListView.au3>
    #include <WinAPI.au3>

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

    Local $hGui, $listview, $button, $item1, $item2, $item3, $item4, $item5, $msg

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

    $hGui = GUICreate("listview items", 220, 250, 100, 200)

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

    If Random(0,1,1) Then GUICtrlCreateMenu("Test") ;manchmal mit, manchmal ohne Menü

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

    $listview = GUICtrlCreateListView("col1 |col2|col3|col4 ", 10, 10, 200, 150, -1, 0x21)
    $button = GUICtrlCreateButton("Click Me!!!!", 75, 170, 70, 20)
    $item1 = GUICtrlCreateListViewItem("item1|col12|col13|col14", $listview)
    $item2 = GUICtrlCreateListViewItem("item2|col22|col23|col24", $listview)
    $item3 = GUICtrlCreateListViewItem("item3|col32|col33|col34", $listview)
    $item4 = GUICtrlCreateListViewItem("item4|col42|col43|col44", $listview)
    $item5 = GUICtrlCreateListViewItem("item5|col52|col53|col54", $listview)
    GUISetState()

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

    Do
    $msg = GUIGetMsg()

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

    Select
    Case $msg = $button
    _GuiCtrlListView_MarkItem($hGui, $listview, Random(0, 4, 1), Random(0, 3, 1))
    EndSelect
    Until $msg = $GUI_EVENT_CLOSE

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

    Func _GuiCtrlListView_MarkItem($hWndGui, $hWnd, $iIndex, $iSubItem, $Color = 0xFF, $Redraw = 1)
    ;funkey April 16, 2010
    Local $x, $y, $w, $h
    Local $aWndSize = WinGetPos($hWndGui)
    Local $aWndClientSize = WinGetClientSize($hWndGui)
    Local $aPos = ControlGetPos($hWndGui, "", $hWnd)

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

    Local $aRect = _GUICtrlListView_GetSubItemRect($hWnd, $iIndex, $iSubItem)
    $x = $aRect[0] + $aPos[0] + $aWndSize[2] - $aWndClientSize[0]
    $y = $aRect[1] + $aWndSize[3] - $aWndClientSize[1] + $aPos[1]
    $w = $aRect[2] - $aRect[0]
    $h = $aRect[3] - $aRect[1]

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

    If $Redraw Then _WinAPI_RedrawWindow($hWndGui)

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

    Local $hDC, $hPen, $obj_orig
    $hDC = _WinAPI_GetWindowDC($hWndGui)
    $hPen = _WinAPI_CreatePen($PS_SOLID, 3, $Color)
    $obj_orig = _WinAPI_SelectObject($hDC, $hPen)

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

    _WinAPI_DrawLine($hDC, $x, $y - 1, $x + $w, $y - 1)
    _WinAPI_DrawLine($hDC, $x, $y - 1, $x, $y + $h - 1)
    _WinAPI_DrawLine($hDC, $x + $w, $y - 1, $x + $w, $y + $h - 1)
    _WinAPI_DrawLine($hDC, $x, $y + $h - 1, $x + $w, $y + $h - 1)

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

    ; clear resources
    _WinAPI_SelectObject($hDC, $obj_orig)
    _WinAPI_DeleteObject($hPen)
    _WinAPI_ReleaseDC($hWndGui, $hDC)
    EndFunc ;==>_GuiCtrlListView_MarkItem

    [/autoit]

    Funktioniert jetzt super bei mir.

    Zitat von Bugfix

    Wäre es nicht einfacher, statt der 4 Einzellinien mit _WinAPI_FrameRect() zu zeichnen?
    Das RECT könntest du dir gleich mit _GUICtrlListView_GetItemRectEx() ausgeben lassen.


    Ganz so einfach geht es auch wieder nicht.

  • Prüfen ob +- oder gleich eine Variable

    • funkey
    • 20. April 2010 um 09:12
    [autoit]

    Local $Vergleich = 30
    Local $Vacuum = 30

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

    Switch $Vergleich
    Case $Vacuum - 0.1 To $Vacuum + 0.1
    MsgBox(0, "OK", "Messwert in der Toleranz")
    Case Else
    MsgBox(0, "Fehler", "Messwert außerhalb der Toleranz")
    EndSwitch

    [/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit]
  • Bildschirmschoner incl. Config und Preview

    • funkey
    • 20. April 2010 um 08:18

    Ist ganz toll geworden, wie wir es von dir gewohnt sind!! :thumbup:
    Bei mir auf meiner Kiste ruckelt es halt ein wenig, ist aber nicht schlimm.

  • Bitte auf verschiedenen Systemen testen und anpassen -->_GuiCtrlListView_MarkItem

    • funkey
    • 19. April 2010 um 21:36

    Hallo!

    Ich hab hier eine Funktion, die bei mir auf WinXP (klassischer und XP-Style einigermaßen gut funktioniert). Ich habe aber berechtigten Zweifel, dass es unter Vista und Win7 noch so stimmt.
    Die Funktion _GuiCtrlListView_MarkItem umrandet einfach ein SubItem einer ListView, nur leider sollen auf einigen Systemen die Koordinaten nicht passen, sodass das Quadrat nicht schön über dem SubItem gezeichnet wird. Ich hätte aber natürlich gerne, dass es überall System- und Style-unabhängig gleich gut funktioniert.

    Vielen Dank für eure Hilfe!

    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Include <GuiListView.au3>
    #Include <WinAPI.au3>

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

    Opt('MustDeclareVars', 1)

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

    Example()

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

    Func Example()
    Local $hGui, $listview, $button, $item1, $item2, $item3, $item4, $item5, $input1, $msg

    $hGui = GUICreate("listview items", 220, 250, 100, 200)

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

    $listview = GUICtrlCreateListView("col1 |col2|col3 ", 10, 10, 200, 150, -1, 0x21)
    $button = GUICtrlCreateButton("Click Me!!!!", 75, 170, 70, 20)
    $item1 = GUICtrlCreateListViewItem("item1|col12|col13", $listview)
    $item2 = GUICtrlCreateListViewItem("item2|col22|col23", $listview)
    $item3 = GUICtrlCreateListViewItem("item3|col32|col33", $listview)
    $item4 = GUICtrlCreateListViewItem("item4|col42|col43", $listview)
    $item5 = GUICtrlCreateListViewItem("item5|col52|col53", $listview)
    GUISetState()

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

    Do
    $msg = GUIGetMsg()

    Select
    Case $msg = $button
    _GuiCtrlListView_MarkItem($hGui, $listview, Random(0,4,1), Random(0,2,1))
    EndSelect
    Until $msg = $GUI_EVENT_CLOSE
    EndFunc ;==>Example

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

    Func _GuiCtrlListView_MarkItem($hWndGui, $hWnd, $iIndex, $iSubItem, $Color = 0xFF, $Redraw = 1)
    ;funkey April 16, 2010
    Local $aPos, $aRect, $aMenu, $aBorder, $aBorder3D, $aWndSize, $aWndClientSize, $Offset, $iSum = 0
    Local $x, $y, $w, $h
    For $i = 0 To $iSubItem - 1
    $iSum += _GUICtrlListView_GetColumnWidth($hWnd, $i)
    Next
    $aWndSize = WinGetPos($hWndGui)
    $aWndClientSize = WinGetClientSize($hWndGui)
    $aBorder = DllCall("user32.dll", "int", "GetSystemMetrics", "int", 6) ;SM_CYBORDER
    $aBorder3D = DllCall("user32.dll", "int", "GetSystemMetrics", "int", 46) ;SM_CYEDGE

    ;~ ConsoleWrite("Border: " & $aBorder[0] & @CR)
    ;~ ConsoleWrite("Border3D: " & $aBorder3D[0] & @CR)
    ;~ ConsoleWrite("ClientDiff: " & ($aWndSize[2] - $aWndClientSize[0]) / 2 & @CR)

    $Offset = $aWndSize[3] - $aWndClientSize[1]
    $aRect = _GUICtrlListView_GetItemRect($hWnd, $iIndex)
    $aPos = ControlGetPos($hWndGui, "", $hWnd)
    $x = $iSum + $aPos[0] + $aRect[0] + ($aWndSize[2] - $aWndClientSize[0]) / 2 + $aBorder3D[0] + $aBorder[0]
    $y = $aPos[1] + $aRect[1] + $Offset
    $w = _GUICtrlListView_GetColumnWidth($hWnd, $iSubItem)
    $h = $aRect[3] - $aRect[1]

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

    If $Redraw Then _WinAPI_RedrawWindow($hWndGui)

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

    Local $hDC, $hPen, $obj_orig
    $hDC = _WinAPI_GetWindowDC($hWndGui)
    $hPen = _WinAPI_CreatePen($PS_SOLID, 2, $Color)
    $obj_orig = _WinAPI_SelectObject($hDC, $hPen)

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

    _WinAPI_DrawLine($hDC, $x, $y, $x + $w, $y)
    _WinAPI_DrawLine($hDC, $x, $y, $x, $y + $h)
    _WinAPI_DrawLine($hDC, $x + $w, $y, $x + $w, $y + $h)
    _WinAPI_DrawLine($hDC, $x, $y + $h, $x + $w, $y + $h)

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

    ; clear resources
    _WinAPI_SelectObject($hDC, $obj_orig)
    _WinAPI_DeleteObject($hPen)
    _WinAPI_ReleaseDC($hWndGui, $hDC)
    EndFunc ;==>ShowCross

    [/autoit]
  • Listview alle spalten überschriften löschen.

    • funkey
    • 16. April 2010 um 13:06

    Wozu?

    Spoiler anzeigen
    [autoit]

    #cs **************************************************************************

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

    Listview alle spalten überschriften löschen.

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

    http://www.autoit.de/index.php?page…3876#post153876

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

    #ce **************************************************************************

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

    #include <GUIConstantsEx.au3>

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

    #region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 357, 266, 192, 124)
    $ListView = GUICtrlCreateListView("Spalte1|Spalte2|Spalte3|Spalte4|Spalte5|Spalte6", 0, 0, 353, 135)
    $LVItem = GUICtrlCreateListViewItem("1|2|3|4|5|6", $ListView)
    $CheckIt = GUICtrlCreateButton("&Neu1", 120, 140, 113)
    $CheckIt2 = GUICtrlCreateButton("&Neu2", 120, 190, 113)

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

    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $CheckIt
    GUICtrlSetData($ListView, " | | ")
    Sleep(500)
    GUICtrlSetData($ListView, "a|b|c")
    Case $CheckIt2
    GUICtrlSetData($ListView, " | ")
    Sleep(500)
    GUICtrlSetData($ListView, "1|2")

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

    EndSwitch
    WEnd

    [/autoit]
  • _GUICtrlListView_EnsureVisibleEx

    • funkey
    • 15. April 2010 um 13:23

    Als Abfallprodukt meines CSV-Editor erhielt ich nun eine Funktion, die im Unterschied zu _GUICtrlListView_EnsureVisible auch das gesuchte SubItem anzeigt.
    Ich hoffe, das das jemand brauchen kann.

    Spoiler anzeigen
    [autoit]

    #include <GuiListView.au3>

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

    GUICreate("Test _GUICtrlListView_EnsureVisibleEx", 600, 600)

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

    Local $sHeader
    For $i = 1 To 50
    $sHeader &= "|Col" & $i
    Next
    $sHeader = "Col0" & $sHeader

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

    Global $hLV = GUICtrlCreateListView($sHeader, 5, 5, 590, 590)

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

    Local $sItem
    For $i = 1 To 1000
    For $j = 0 To 50
    $sItem &= Random(1, 1000, 1) & "|"
    Next
    GUICtrlCreateListViewItem($sItem, $hLV)
    $sItem = ""
    Next

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

    AdlibRegister("_Test_GUICtrlListView_EnsureVisibleEx", 4000)
    _Test_GUICtrlListView_EnsureVisibleEx()

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

    GUISetState()
    Do
    Until GUIGetMsg() = -3

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

    Func _GUICtrlListView_EnsureVisibleEx($hwnd, $iIndex, $iSubItem = 0, $fPartialOK = False)
    ;funkey April 15, 2010
    If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd)
    _SendMessage($hWnd, $LVM_ENSUREVISIBLE, $iIndex, $fPartialOK)
    Local $aRect = _GUICtrlListView_GetItemRect($hWnd, $iSubItem)
    Local $iPixel
    For $i = 0 To $iSubItem - 2 ; 2 means: show at second visible column
    $iPixel += _GUICtrlListView_GetColumnWidth($hWnd, $i)
    Next
    _GUICtrlListView_Scroll($hWnd, $iPixel + $aRect[0], 0)
    EndFunc

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

    Func _Test_GUICtrlListView_EnsureVisibleEx()
    Local $iItem = Random(1, 1000, 1)
    Local $iSubItem = Random(0, 50, 1)
    Local $sText = _GUICtrlListView_GetItemText($hLV, $iItem, $iSubItem)
    ToolTip(StringFormat("EnsureVisible %i/%i - %s", $iItem, $iSubItem, $sText))
    _GUICtrlListView_EnsureVisibleEx($hLV, $iItem, $iSubItem)
    _GUICtrlListView_SetItemSelected($hLV, $iItem)
    _GUICtrlListView_SetSelectedColumn($hLV, $iSubItem)
    EndFunc

    [/autoit]
  • controlsend problem

    • funkey
    • 14. April 2010 um 16:22

    Wieso sendest du nicht gleich / anstelle von +7 ?
    Hast du ControlSetText schon probiert? Geht meistens besser.

    Wenn das Programm wirklich dagegen gesichert sein sollte, dann handelt es sich meistens um ein Spiel. Das würde dann gegen die Forenregeln verstoßen, dir weiter zu helfen!

  • _WinAPI_GetAsyncKeyState Beispiel

    • funkey
    • 14. April 2010 um 16:14

    Wie bei _IsPressed zu erkennen ist, musst du 0x26 anstelle von 26 verwenden.

    Spoiler anzeigen
    [autoit]

    #include <WinAPI.au3>

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

    Local $uparrow

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

    While 1
    Sleep(250)
    $uparrow = _WinAPI_GetAsyncKeyState(0x26)
    If Not $uparrow = 0 Then
    MsgBox(0, "Ok", "OK")
    ExitLoop
    EndIf
    WEnd

    [/autoit]
  • _WinAPI_GetAsyncKeyState Beispiel

    • funkey
    • 14. April 2010 um 15:40

    ;)

    [autoit]

    Func _IsPressed($sHexKey, $vDLL = 'user32.dll')
    ; $hexKey must be the value of one of the keys.
    ; _Is_Key_Pressed will return 0 if the key is not pressed, 1 if it is.
    Local $a_R = DllCall($vDLL, "short", "GetAsyncKeyState", "int", '0x' & $sHexKey)
    If @error Then Return SetError(@error, @extended, False)
    Return BitAND($a_R[0], 0x8000) <> 0
    EndFunc ;==>_IsPressed

    [/autoit]
  • Internetseite im Hintergrund öffnen

    • funkey
    • 13. April 2010 um 16:49

    _IECreate hat einen visible-Parameter ;)

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™