Advertisement
Guest User

Namen von Desktop Icons auslesen

a guest
Apr 8th, 2012
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.45 KB | None | 0 0
  1. #cs ----------------------------------------------------------------------------
  2.  
  3.  AutoIt Version: 3.3.8.1
  4.  Author:         myName
  5.  
  6.  Script Function:
  7.     Template AutoIt script.
  8.  
  9. #ce ----------------------------------------------------------------------------
  10.  
  11. ; Script Start - Add your code below here
  12.  
  13. #include <GuiConstantsEx.au3>
  14. #include <GuiListView.au3>
  15.  
  16. Dim $hwnd=0
  17. Dim $hListView=0
  18.  
  19. Dim $DesktopXY[4]
  20.  
  21. Dim $GetItem[8]
  22.  
  23. ; Programm - Start
  24.  
  25. $hwnd=_WinAPI_GetDesktopWindow ()
  26.  
  27. if $hwnd = False Then
  28.  
  29.     MsgBox ( 0 , "Fehler" , "Der Desktop ist nicht geladen" )
  30.     Exit
  31.  
  32. EndIf
  33.  
  34. $DesktopXY = WinGetPos ( "[class:Progman]" )
  35.  
  36. MsgBox ( 0 , "Größe" , "Desktop Breite : " & $DesktopXY[2] & @LF & "Desktop Höhe : " & $DesktopXY[3] )
  37.  
  38. $hListView = ControlGetHandle ( "[Class:Progman]" , "" , "SysListView321")
  39.  
  40. if $hListView = False Then
  41.     MsgBox ( 64 , "Fehler" , "Keine ListView gefunden" )
  42.     Exit
  43. EndIf
  44.  
  45. MsgBox ( 0 , "Info" , "Anzahl der Icons : " & _GUICtrlListView_GetItemCount ( $hListView ) )
  46.  
  47. _GUICtrlListView_BeginUpdate ($hListView)
  48.  
  49. $dll=DllStructCreate ( $tagLVItem )
  50.  
  51. for $i = 0 to _GUICtrlListView_GetItemCount ($hListView) - 1
  52.  
  53.     $ItemText  = _GUICtrlListView_GetItemText ($hListView , $i)
  54.     $GetItem   = _GUICtrlListView_GetItem ($hListView , $i)
  55.  
  56.     ConsoleWrite ( $ItemText & @LF)
  57.     ConsoleWrite ( $GetItem[3] & @LF)
  58.  
  59. Next
  60.  
  61. _GUICtrlListView_EndUpdate ($hListView)
  62.  
  63. $dll = 0
  64. ;$Icons = _GUICtrlListView_GetItemCount ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement