It is currently April 26th, 2024, 11:04 pm
Lua and WMP
-
- Posts: 44
- Joined: May 10th, 2013, 1:21 am
Lua and WMP
There's sometthings that thew nowplaying.dll can't do, such as actually opening a file to play. I was thinking that maybe I could write a lua script to control media player and use a skin to interface with the script. Anyone know if it's possible to control windows media player from a lua script? And please, don't offer alternatives like winamp or itunes, I'm asking about Windows Media Player only. Thanks!
-
- Rainmeter Sage
- Posts: 5407
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Lua and WMP
Opening a file to play is the job of the actual program not the NowPlaying plugin. The NowPlaying plugin acts as a remote control for multiple players.Fuzzybat23 wrote:There's sometthings that thew nowplaying.dll can't do, such as actually opening a file to play. I was thinking that maybe I could write a lua script to control media player and use a skin to interface with the script. Anyone know if it's possible to control windows media player from a lua script? And please, don't offer alternatives like winamp or itunes, I'm asking about Windows Media Player only. Thanks!
If the file type is associated with WMP (this is set in Windows), then when you select it, or execute it in a bang LeftMouseUpAction=["C:\mysong.mp3"], the associated player (WMP) will open and the song will start.
NowPlaying can now display and control the playback.
I don't see the need for a Lua script, unless you are trying to do something other than playback.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 44
- Joined: May 10th, 2013, 1:21 am
Re: Lua and WMP
the reason I ask is there's another media player remote I have, for yahoo widgets. that one is coded with java and it has a button which lets you search your hardline and open a music file. of course the file is really being opened by media player, but unlike nowplaying.dll, mediaplayer doesn't open to.the desktop, it stays minimized in the background. I guess that's what I'm really aiming for. open the music file with media player while keeping mediaplayer minimized. apologies for misspelling, was answering from my android ;D
-
- Posts: 366
- Joined: November 12th, 2009, 4:47 pm
- Location: Ukraine
Re: Lua and WMP
I'm pretty sure that in Rainmeter's lua you can't use COM objects, so what you asking is not possible, at least for now.
-
- Posts: 1740
- Joined: November 13th, 2012, 9:53 pm
Re: Lua and WMP
i would use the WindowMessage plugin for that.
http://docs.rainmeter.net/manual/plugins/windowmessage
http://docs.rainmeter.net/manual/plugins/windowmessage
-
- Posts: 44
- Joined: May 10th, 2013, 1:21 am
Re: Lua and WMP
Well now that sounds promising.. Any idea where to get a list of the wParam and lParam commands to pass to it?
-
- Posts: 1740
- Joined: November 13th, 2012, 9:53 pm
Re: Lua and WMP
- use the forum search for WindowMessage
- use Google for WindowMessage WMP Rainmeter
- use Google for WindowMeassage WMP
- check the code of your Yahoo! Widget
can't help you (and am not really interested), as WMP is the first thing i get rid of when i install Windows.
- use Google for WindowMessage WMP Rainmeter
- use Google for WindowMeassage WMP
- check the code of your Yahoo! Widget
can't help you (and am not really interested), as WMP is the first thing i get rid of when i install Windows.