Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1.
- #include <GUIConstantsEx.au3>
- 2.
- #include <GuiStatusBar.au3>
- 3.
- #include <ListViewConstants.au3>
- 4.
- #include <ProgressConstants.au3>
- 5.
- #include <StaticConstants.au3>
- 6.
- #include <WindowsConstants.au3>
- 7.
- #include <File.au3>
- 8.
- #include <GuiListView.au3>
- 9.
- 10.
- #Region ### START Koda GUI section ### Form=c:\dokumente und einstellungen\gamer\desktop\form1.kxf
- 11.
- $Form1 = GUICreate("AlizameSound : ", 633, 454, 192, 124)
- 12.
- GUISetBkColor(0x000000)
- 13.
- $listview = GUICtrlCreateListView("Name|Endung|Ort", 40, 24, 529, 241,$LVS_EX_FULLROWSELECT)
- 14.
- GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 300)
- 15.
- GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 80)
- 16.
- GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 145)
- 17.
- GUICtrlSetState ($listview, $GUI_DROPACCEPTED)
- 18.
- 19.
- GUICtrlSetBkColor(-1, 0x6A6A6A)
- 20.
- $StatusBar1 = _GUICtrlStatusBar_Create($Form1)
- 21.
- _GUICtrlStatusBar_SetMinHeight($StatusBar1, 35)
- 22.
- $Progress1 = GUICtrlCreateProgress(40, 288, 529, 9)
- 23.
- $Label1 = GUICtrlCreateLabel("0", 576, 280, 11, 20)
- 24.
- GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
- 25.
- $Label2 = GUICtrlCreateLabel(":", 584, 280, 7, 20)
- 26.
- GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
- 27.
- $Label3 = GUICtrlCreateLabel("00", 592, 280, 18, 20)
- 28.
- GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
- 29.
- $MenuItem1 = GUICtrlCreateMenu("&Einstellungen")
- 30.
- $MenuItem10 = GUICtrlCreateMenuItem("Immer im Vordergrund", $MenuItem1, -1 , 1)
- 31.
- $MenuItem11 = GUICtrlCreateMenuItem("Playlist immer wiederholen", $MenuItem1)
- 32.
- $MenuItem2 = GUICtrlCreateMenu("Ü&ber")
- 33.
- $MenuItem8 = GUICtrlCreateMenuItem("AlizameSound v1.0", $MenuItem2)
- 34.
- $MenuItem9 = GUICtrlCreateMenuItem("© by Alizame", $MenuItem2)
- 35.
- $MenuItem3 = GUICtrlCreateMenu("&Credits")
- 36.
- $MenuItem4 = GUICtrlCreateMenuItem("Danke an:", $MenuItem3)
- 37.
- $MenuItem5 = GUICtrlCreateMenuItem("Jonathan Bennet und das AutoIt Team für AutoIt v3", $MenuItem3)
- 38.
- $MenuItem6 = GUICtrlCreateMenuItem("Gun-Food und peethebee für das Forum!!!", $MenuItem3)
- 39.
- $MenuItem7 = GUICtrlCreateMenuItem("Ach und alle User aus dem Forum xP", $MenuItem3)
- 40.
- ;#######
- 41.
- $Icon1 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\links.ico", 0, 192, 320, 40, 40, BitOR($SS_NOTIFY,$WS_GROUP))
- 42.
- $Icon2 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\wiederholen.ico", 0, 232, 320, 40, 40, BitOR($SS_NOTIFY,$WS_GROUP))
- 43.
- $Icon3 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\play.ico", 0, 272, 320, 40, 40, BitOR($SS_NOTIFY,$WS_GROUP))
- 44.
- $Icon4 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\pause.ico", 0, 312, 320, 40, 40, BitOR($SS_NOTIFY,$WS_GROUP))
- 45.
- $Icon5 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\stopp.ico", 0, 352, 320, 40, 40, BitOR($SS_NOTIFY,$WS_GROUP))
- 46.
- $Icon6 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\rechts.ico", 0, 392, 320, 40, 40, BitOR($SS_NOTIFY,$WS_GROUP))
- 47.
- $Icon7 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\add.ico", 0, 576, 32, 40, 40, BitOR($SS_NOTIFY,$WS_GROUP))
- 48.
- $Icon8 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\delete.ico", 0, 576, 80, 40, 40, BitOR($SS_NOTIFY,$WS_GROUP))
- 49.
- $Icon9 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\halblinks.ico", 0, 432, 320, 20, 40, BitOR($SS_NOTIFY,$WS_GROUP))
- 50.
- $Icon10 = GUICtrlCreateIcon("C:\Dokumente und Einstellungen\Gamer\Desktop\musikplayer\bilder\halbrechts.ico", 0, 176, 320, 20, 40, BitOR($SS_NOTIFY,$WS_GROUP))
- 51.
- GUISetState(@SW_SHOW)
- 52.
- #EndRegion ### END Koda GUI section ###
- 53.
- 54.
- GUIRegisterMsg(0x004E, "_DoubleClickOnListView")
- 55.
- 56.
- 57.
- $aPos = ControlGetPos($Form1, '', $Progress1)
- 58.
- While 1
- 59.
- Switch GUIGetMsg( )
- 60.
- Case $GUI_EVENT_CLOSE
- 61.
- Exit
- 62.
- Case $GUI_EVENT_PRIMARYUP
- 63.
- $aInfo = GUIGetCursorInfo($Form1)
- 64.
- If $aInfo[4] = $Progress1 Then
- 65.
- $iPercent = 100 / $aPos[2] * ($aInfo[0] - $aPos[0])
- 66.
- GUICtrlSetData($Progress1, $iPercent)
- 67.
- GUICtrlSetData($Label3, Int($iPercent) & '')
- 68.
- EndIf
- 69.
- Case $GUI_EVENT_DROPPED
- 70.
- Dim $szDrive, $szDir, $szFName, $szExt
- 71.
- $PathSplit = _PathSplit( @GUI_DragFile & "", $szDrive, $szDir, $szFName, $szExt)
- 72.
- GUICtrlCreateListViewItem ($PathSplit[3] & "|" & $PathSplit[4] & "|" & $PathSplit[1] & $PathSplit[2],$listview)
- 73.
- 74.
- Case $Icon7
- 75.
- $Datei_Input = FileOpenDialog ("Dateien Hinzufügen", @MyDocumentsDir, "Alle Dateien (*.*)", 7)
- 76.
- $Datei = StringSplit($Datei_Input,"|")
- 77.
- Dim $szDrive, $szDir, $szFName, $szExt
- 78.
- For $i = 1 To $Datei[0] Step 1
- 79.
- $PathSplit = _PathSplit($Datei[$i], $szDrive, $szDir, $szFName, $szExt)
- 80.
- GUICtrlCreateListViewItem ($PathSplit[3] & "|" & $PathSplit[4] & "|" & $PathSplit[1] & $PathSplit[2],$listview)
- 81.
- Next
- 82.
- 83.
- Case $Icon8
- 84.
- GUICtrlDelete (GUICtrlRead ($listview))
- 85.
- 86.
- Case $listview
- 87.
- _GUICtrlListView_SortItems ($listview, GUICtrlGetState ($listview))
- 88.
- 89.
- 90.
- EndSwitch
- 91.
- $vol = GUICtrlRead( $Progress1 )
- 92.
- SoundSetWaveVolume($vol)
- 93.
- 94.
- 95.
- 96.
- WEnd
- 97.
- Func _DoubleClickOnListView($hWndGUI, $MsgID, $wParam, $lParam);Die Eigentliche Funktion
- 98.
- Local $tagNMHDR, $event, $hwndFrom, $code
- 99.
- $tagNMHDR = DllStructCreate("int;int;int", $lParam)
- 100.
- If @error Then Return
- 101.
- $event = DllStructGetData($tagNMHDR, 3); Checkt wie das EVENT aussieht
- 102.
- If $wParam = $ListView Then;Wenn der Klick auf das ListView ging..
- 103.
- If $event = $NM_DBLCLK Then;.. Wenn es ein DoppelKlick war
- 104.
- ; Hier kommt hin was er machen soll:
- 105.
- 106.
- $scolor = GUICtrlRead($ListView)
- 107.
- _GUICtrlListView_SetTextBkColor($scolor , 0xFF0000)
- 108.
- $sz = GUICtrlRead(GUICtrlRead($ListView))
- 109.
- ToolTip(""&$sz,0,0)
- 110.
- InputBox(" "," ",""&$sz )
- 111.
- EndIf
- 112.
- EndIf
- 113.
- $tagNMHDR = 0
- 114.
- $event = 0
- 115.
- $lParam = 0
- 116.
- EndFunc ;==>_DoubleClickOnListView
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement