I want to get the title and the singer of the current playing song.
and then save it into a .txt file
please tell me or give me some hints
It is currently May 2nd, 2024, 10:38 am
How can I make use of the iTunesplugin.dll ?
-
- Posts: 14
- Joined: September 26th, 2012, 11:12 am
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: How can I make use of the iTunesplugin.dll ?
First, you should use the NowPlaying plugin instead. The iTunes plugin is much more limited and is no longer being updated.
That said, something like this should work:
That will create a file that looks like this (for example):
If you need it formatted differently, you'll have to use a very simple Lua script, but this will be equally doable. :)
That said, something like this should work:
Code: Select all
[MeasureArtist]
Measure=Plugin
Plugin=NowPlaying
PlayerName=iTunes
PlayerType=Artist
TrackChangeAction=[!WriteKeyValue "Variables" "Artist" "[MeasureArtist]" "filename.txt"][!WriteKeyValue "Variables" "Title" "[MeasureTitle]" "filename.txt"]
[MeasureTitle]
Measure=Plugin
Plugin=NowPlaying
PlayerName=[MeasureArtist]
PlayerType=Title
Code: Select all
[Variables]
Artist=Led Zeppelin
Title=Kashmir
-
- Posts: 291
- Joined: July 25th, 2011, 9:53 am
- Location: Lublin, Poland
Re: How can I make use of the iTunesplugin.dll ?
Would be easier if you provide code of your skin..
BTW. You should use NowPlaying plugin instead..
Basically, you need to know which measure gives Artist name and Track name..
Example bang code: LeftMouseUpAction=[cmd /c echo.[mArtist]-[mPlayer] >c:\1.txt]
Replace code parts with:
[mArtist] - Name of measure providing Artist name
[mPlayer] - Name of measure providing Song title
c:\1.txt - Patch to save txt file
BTW. You should use NowPlaying plugin instead..
Basically, you need to know which measure gives Artist name and Track name..
Example bang code: LeftMouseUpAction=[cmd /c echo.[mArtist]-[mPlayer] >c:\1.txt]
Replace code parts with:
[mArtist] - Name of measure providing Artist name
[mPlayer] - Name of measure providing Song title
c:\1.txt - Patch to save txt file
"Never argue with an idiot, he will drag you down to his level and beat you with experience."
my deviantART | Alternative Rainmeter tray icons
my deviantART | Alternative Rainmeter tray icons
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: How can I make use of the iTunesplugin.dll ?
That method would present issues with track or artist names that contain punctuation (e.g. >). Writing the string with Lua would be more reliable.lysy1993lbn wrote:Example bang code: LeftMouseUpAction=[cmd /c echo.[mArtist]-[mPlayer] >c:\1.txt]
-
- Posts: 14
- Joined: September 26th, 2012, 11:12 am
Re: How can I make use of the iTunesplugin.dll ?
where is filename.txt?Kaelri wrote:First, you should use the NowPlaying plugin instead. The iTunes plugin is much more limited and is no longer being updated.
That said, something like this should work:
That will create a file that looks like this (for example):Code: Select all
[MeasureArtist] Measure=Plugin Plugin=NowPlaying PlayerName=iTunes PlayerType=Artist TrackChangeAction=[!WriteKeyValue "Variables" "Artist" "[MeasureArtist]" "filename.txt"][!WriteKeyValue "Variables" "Title" "[MeasureTitle]" "filename.txt"] [MeasureTitle] Measure=Plugin Plugin=NowPlaying PlayerName=[MeasureArtist] PlayerType=Title
If you need it formatted differently, you'll have to use a very simple Lua script, but this will be equally doable.Code: Select all
[Variables] Artist=Led Zeppelin Title=Kashmir
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: How can I make use of the iTunesplugin.dll ?
Wherever you want it. If you simply use "filename.txt" with no path, it will look for the file in the same folder as the skin .INI file. (C:\Users\YourName\Documents\Rainmeter\Skins\Whatever\filename.txt)
-
- Posts: 14
- Joined: September 26th, 2012, 11:12 am
Re: How can I make use of the iTunesplugin.dll ?
i just copied you code to see if it works,Kaelri wrote:Wherever you want it. If you simply use "filename.txt" with no path, it will look for the file in the same folder as the skin .INI file. (C:\Users\YourName\Documents\Rainmeter\Skins\Whatever\filename.txt)
but no filename.txt exist
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: How can I make use of the iTunesplugin.dll ?
Yes, you'll need to create the file before you can write to it.
-
- Posts: 14
- Joined: September 26th, 2012, 11:12 am
Re: How can I make use of the iTunesplugin.dll ?
i created a filename.txt like this:Kaelri wrote:Yes, you'll need to create the file before you can write to it.
[Variables]
Artist=
Title=
but when I change the song, I still cant write the info of the current song into it
-
- Posts: 14
- Joined: September 26th, 2012, 11:12 am