It is currently May 2nd, 2024, 10:38 am

How can I make use of the iTunesplugin.dll ?

Get help with creating, editing & fixing problems with skins
kIsS.kIt
Posts: 14
Joined: September 26th, 2012, 11:12 am

How can I make use of the iTunesplugin.dll ?

Post by kIsS.kIt »

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 :sos: :sos: :sos:
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: How can I make use of the iTunesplugin.dll ?

Post by Kaelri »

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:

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
That will create a file that looks like this (for example):

Code: Select all

[Variables]
Artist=Led Zeppelin
Title=Kashmir
If you need it formatted differently, you'll have to use a very simple Lua script, but this will be equally doable. :)
User avatar
lysy1993lbn
Posts: 291
Joined: July 25th, 2011, 9:53 am
Location: Lublin, Poland

Re: How can I make use of the iTunesplugin.dll ?

Post by lysy1993lbn »

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
"Never argue with an idiot, he will drag you down to his level and beat you with experience."
my deviantART | Alternative Rainmeter tray icons
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: How can I make use of the iTunesplugin.dll ?

Post by Kaelri »

lysy1993lbn wrote:Example bang code: LeftMouseUpAction=[cmd /c echo.[mArtist]-[mPlayer] >c:\1.txt]
That method would present issues with track or artist names that contain punctuation (e.g. >). Writing the string with Lua would be more reliable.
kIsS.kIt
Posts: 14
Joined: September 26th, 2012, 11:12 am

Re: How can I make use of the iTunesplugin.dll ?

Post by kIsS.kIt »

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:

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
That will create a file that looks like this (for example):

Code: Select all

[Variables]
Artist=Led Zeppelin
Title=Kashmir
If you need it formatted differently, you'll have to use a very simple Lua script, but this will be equally doable. :)
where is filename.txt?
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: How can I make use of the iTunesplugin.dll ?

Post by Kaelri »

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)
kIsS.kIt
Posts: 14
Joined: September 26th, 2012, 11:12 am

Re: How can I make use of the iTunesplugin.dll ?

Post by kIsS.kIt »

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)
i just copied you code to see if it works,
but no filename.txt exist :(
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: How can I make use of the iTunesplugin.dll ?

Post by Kaelri »

Yes, you'll need to create the file before you can write to it.
kIsS.kIt
Posts: 14
Joined: September 26th, 2012, 11:12 am

Re: How can I make use of the iTunesplugin.dll ?

Post by kIsS.kIt »

Kaelri wrote:Yes, you'll need to create the file before you can write to it.
i created a filename.txt like this:

[Variables]
Artist=
Title=

but when I change the song, I still cant write the info of the current song into it
kIsS.kIt
Posts: 14
Joined: September 26th, 2012, 11:12 am

Re: How can I make use of the iTunesplugin.dll ?

Post by kIsS.kIt »

:sos: :sos: :sos: