Albert88 Posted June 4, 2009 Posted June 4, 2009 Hello, I have got the listview that controls the list of songs from windows media player, but when I want to know what song is singing it always show me the same song because he return me the song focused and selected, and not the playing. How can I know that song is playing exactly?? Thanks.
BrettF Posted June 5, 2009 Posted June 5, 2009 Hi, Please remember to only bump your posts once in a 24 hour period! Have you tried using WMP COM? There is a UDF somewhere on the forums, search for it Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Albert88 Posted June 5, 2009 Author Posted June 5, 2009 (edited) Hi, Please remember to only bump your posts once in a 24 hour period! Have you tried using WMP COM? There is a UDF somewhere on the forums, search for it Cheers, Brett Ups sorry for the bump. I looked the UDF from Squirrely1 in this post -> http://www.autoitscript.com/forum/index.ph...rt=#entry510851 However, I don´t want embed my wmp into a gui with IE. Well, my code is the next: #Include <GuiListView.au3> ;First I look for the window If WinExists("[CLASS:WMPlayerApp; TITLE:Reproductor de Windows Media]") Then ;take the handle and its control $hWin = WinGetHandle("[CLASS:WMPlayerApp; TITLE:Reproductor de Windows Media]") $hLB = ControlGetHandle($hWin, "", "[CLASS:SysListView32; INSTANCE:1]") ;count the list item (songs) $iLBCount = _GUICtrlListView_GetItemCount($hLB) For $i = 0 To $iLBCount - 1 ;If a song is singing then show me If _GUICtrlListView_GetItemSelected($hLB,$i) == True Then MsgBox(0,"Escuchas","Estás escuchando: " & @CRLF & _GUICtrllistview_getitemtext($hLB,$i)) EndIf Next Else ;error if wmp isn´t open MsgBox(16, "Error", "Windows Media Player no está abierto.") EndIf Exit Then, I said that the function _GUICtrlListView_GetItemSelected($hLB,$i) show me the item selected but it can that isn´t singing, basically because I click on the song once. Edited June 5, 2009 by Albert88
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now