Kip Posted May 5, 2007 Share Posted May 5, 2007 (edited) From MSDN: (all functions for the method: Settings)ISAVAILABLEPLAYSTOPPAUSEFASTFORWARDFASTREVERSECURRENTPOSITIONCURRENTPOSITIONSTRINGNEXTPREVIOUSCURRENTITEMCURRENTMARKERPLAYITEMI have no idea how to use them Edited May 5, 2007 by kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
Kip Posted May 5, 2007 Share Posted May 5, 2007 Or better: ALL FUNCTIONS MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
sshrum Posted June 1, 2007 Share Posted June 1, 2007 How do you get the SharedUserRating value (according to the MSDN docs this is the user specified rating)? I tried creating a function to pull "wm/SharedUserRating" but it's always empty. Func WMGetSharedUserRating($sObj) Return $sObj.GetItemInfo("WM/SharedUserRating") EndFunc TIA Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
lod3n Posted June 1, 2007 Share Posted June 1, 2007 I may be wrong, but I think all of the "WM/" attributes only apply to WMA and other Windows Media filetypes. You might be able to use "Rating" instead. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
sshrum Posted June 1, 2007 Share Posted June 1, 2007 I may be wrong, but I think all of the "WM/" attributes only apply to WMA and other Windows Media filetypes. You might be able to use "Rating" instead.Tried that earlier...returns nothing.The ratings apply to all media formats Granted most of these are stored within the WM database however, if you have the 'global'/'retain my rating' option enabled in WMP, it will create a ID3 tag in the MP3 file. I just haven't figured out how to extract/write to this tag. Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
sshrum Posted June 5, 2007 Share Posted June 5, 2007 (edited) How about this instead of individual property functions: Func WMGet($sObj, $sAttrib) Return $sObj.GetItemInfo($sAttrib) EndFunc You can call it this way: Func _RetrieveMeta($sObj) ConsoleWrite("(_RetrieveMeta) Retrieving WMP tags") Dim $aMeta[2][$aWMPTags[0]+1] $aMeta[0][0] = 1 ;~ $sMsg = "" for $i = 1 to $aWMPTags[0] ConsoleWrite(".") $aMeta[1][$i] = WMGet($sObj, $aWMPTags[$i]) ;~ $sMsg &= $i & " - " & $aWMPTags[$i] & ": " & $aMeta[1][$i] & @CRLF Next ;~ msgbox(0,$sAppTitle,$sMsg) ConsoleWrite("done" & @CRLF) return $aMeta EndFunc Main script will look like this: $aWMPTags = StringSplit("AcquisitionTime,AlbumID,AlbumIDAlbumArtist,Author,AverageLevel,Bitrate,BuyNow,BuyTickets,Copyrig ht,CurrentBitrate,Duration,FileSize,FileType,Is_Protected,IsVBR,MediaType,MoreInfo,PeakValue,Provide rLogoURL,ProviderURL,RecordingTime,ReleaseDate,RequestState,SourceURL,SyncState,Title,TrackingID,Use rCustom1,UserCustom2,UserEffectiveRating,UserLastPlayedTime,UserPlayCount,UserPlaycountAfternoon,Use rPlaycountEvening,UserPlaycountMorning,UserPlaycountNight,UserPlaycountWeekday,UserPlaycountWeekend, UserRating,UserServiceRating,WM/AlbumArtist,WM/AlbumTitle,WM/Category,WM/Composer,WM/Conductor,WM/ContentDistributor,WM/ContentGroupDescription,WM/EncodingTime,WM/Genre,WM/GenreID,WM/InitialKey,WM/Language,WM/Lyrics,WM/MCDI,WM/MediaClassPrimaryID,WM/MediaClassSecondaryID,WM/Mood,WM/ParentalRating,WM/Period,WM/ProtectionType,WM/Provider,WM/ProviderRating,WM/ProviderStyle,WM/Publisher,WM/SubscriptionContentID,WM/SubTitle,WM/TrackNumber,WM/UniqueFileIdentifier,WM/WMCollectionGroupID,WM/WMCollectionID,WM/WMContentID,WM/Writer,WM/Year", ",") $sObj = WMOpenFile($sFilename) $aMeta = _RetrieveMeta($sObj) Works for me. Edited June 5, 2007 by sshrum Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
sshrum Posted June 5, 2007 Share Posted June 5, 2007 How about a WMSet...so we can adjust the values in the files! Something like this (I already know it doesn't work...but you get the idea): Func WMSet($sObj, $sAttrib, $sValue) if wmget($sObj, "Is_Protected") = "false" then $sObj.SetItemInfo($sAttrib, $sValue) EndFunc I just don't know how to get the setiteminfo to work. Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
lod3n Posted June 5, 2007 Share Posted June 5, 2007 @sshrumAccording to:http://msdn2.microsoft.com/en-us/library/bb262748.aspxSetItemInfo: "If you embed the Windows Media Player control in your application, file attributes that you change will not be written to the digital media file until the user runs Windows Media Player."Perhaps if Windows Media Player (the program, not the object) is also running, perhaps minimized, the info can be set/read in real time? Just a theory. Good luck with your project, it sounds interesting. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
fong1sky Posted June 7, 2007 Share Posted June 7, 2007 If I want to get the current playing item info in WMP. But not the script ask to open a specific file(just like the Active WinAMP UDF). how can i do? And can I get the current play time and seek time to play? Thanks Link to comment Share on other sites More sharing options...
lod3n Posted June 7, 2007 Share Posted June 7, 2007 Like, attach to a Media Player application window, and query to find out what's currently playing? I don't think you can do that no. It would be nice though. You can do that with an IE window using _IEAttach, but that uses some dark magic which I don't think can be applied here. (at least, not casually...) [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
fong1sky Posted June 8, 2007 Share Posted June 8, 2007 Like, attach to a Media Player application window, and query to find out what's currently playing? I don't think you can do that no. It would be nice though. You can do that with an IE window using _IEAttach, but that uses some dark magic which I don't think can be applied here. (at least, not casually...)Thanks for your reply.I'm interested how to use _IEAttach, to do something like that can you tell me more about this? Link to comment Share on other sites More sharing options...
fong1sky Posted June 9, 2007 Share Posted June 9, 2007 Or how can I modify this script to make WMP window appear? So it look like using WMP to play media usually. Thanks Link to comment Share on other sites More sharing options...
lod3n Posted June 11, 2007 Share Posted June 11, 2007 You can use the openPlayer method on the player object, but I think you lose your ability to control it, which is stupid. Hopefully I'm wrong about that. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
gsb Posted July 13, 2007 Share Posted July 13, 2007 Using this approach (BTW very nice UDF there CFire) is there a way to build a dynamic "spectrum analyzer" ...equalizer? Are the hooks accessible in the Windows Media Player Com Object to do such? Thanks, gsb "Did you ever stop to think? ...and forget to restart!" Link to comment Share on other sites More sharing options...
RazerM Posted July 13, 2007 Share Posted July 13, 2007 Nice UDFs although it is limited in that only one sound file may be opened at once. My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. Link to comment Share on other sites More sharing options...
Iuli Posted March 13, 2008 Share Posted March 13, 2008 I get an error when i play the media for the first time. This is what i get : "Exception Processing Message 0xc000007b Parameters 0x762E023C 0x762E023C 0x762E023C". Personally, i dunno why i get this error. I checked the functions again and agian and nothing. Anyway, i would greatly apreciate some help. I also specify that i Use Windows Vista, so WMP 11 [size="2"]SFXMaker[/size] - The most complete switchless installer creator software[indent][/indent] Link to comment Share on other sites More sharing options...
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