It is currently December 9th, 2021, 3:31 am

Support ? Aimp 4.7

Report bugs with the Rainmeter application and suggest features.
User avatar
balala
Rainmeter Sage
Posts: 13533
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Support ? Aimp 4.7

Post by balala »

David8192 wrote: November 5th, 2021, 11:52 pm This works for Aimp, but obviously the path is not the same for the other players:
David8192 wrote: November 5th, 2021, 11:52 pm Currently I do not have Winamp and itunes to test with, and Musicbee is a portable version so it might not be the same as the end user's in some ways.
Both correct.
David8192 wrote: November 5th, 2021, 11:52 pm This is why I wanted to use the !WriteKeyValue bang.
What I noticed is

Code: Select all

PlayerPath="C:\Program Files\AIMP3\AIMP.exe"
should change according to the selected player.
So,
I suggest you not to write the path with a !WriteKeyValue bang, but only set it dynamically, through !SetOption. If you are not sure how to do this, please let us know, for addidtance.
David8192 wrote: November 5th, 2021, 11:52 pm It could have been nice if there was a way to just delete "C:\Program Files\AIMP3\AIMP.exe" when another player is chosen so that rainmeter can do auto detection.
In most cases there is no need to add a PlayerPath option. I never did, however have to admit that rarely using the OpenPlayer parameter (and never tried out none version of the AIMP player). In many cases Rainmeter should detect the path, without having to explicitly add it. If you install the other players as well, you could try first which of them is working without adding a PlayerPath, because I suppose many (almost all) should work.
David8192 wrote: November 5th, 2021, 11:52 pm

Code: Select all

[Aimp]
Meter=Image
MeasureName=Player
X=25
Y=40
ImageName=#@#Images\skin\Aimp1
DynamicVariables=1
LeftMouseUpAction=[!WriteKeyValue Player PlayerPath="C:\Program Files\AIMP3\AIMP.exe"][!WriteKeyValue Aimp ImageName "#@#Images\skin\Aimp1"][!WriteKeyValue iTunes ImageName "#@#Images\skin\iTunes"][!WriteKeyValue MusicBee ImageName "#@#Images\skin\MusicBee"][!WriteKeyValue Winamp ImageName "#@#Images\skin\Winamp"][!WriteKeyValue Player PlayerName "AIMP" #@#Player.inc][!RefreshGroup Neonite]
Note a typo in the first !WriteKeyValue bang of the above LeftMouseUpAction option: there is a not needed equal: LeftMouseUpAction=[!WriteKeyValue Player PlayerPath="C:\Program Files\AIMP3\AIMP.exe"][!WriteKeyValue Aimp Ima.... Remove it otherwise the writing doesn!t work. I suppose it's a copy - paste mistake, but it is there.
User avatar
David8192
Posts: 152
Joined: July 8th, 2021, 11:30 pm
Location: The King's Avenue, Golden Kingdom

Re: Support ? Aimp 4.7

Post by David8192 »

balala wrote: November 6th, 2021, 12:34 pm Both correct.

I suggest you not to write the path with a !WriteKeyValue bang, but only set it dynamically, through !SetOption. If you are not sure how to do this, please let us know, for addidtance.
I prefered !WriteKeyValue over !SetOption because it writes a permanent value which cannot be changed in case of a refresh.
On second thought, this might be what I need.
In most cases there is no need to add a PlayerPath option. I never did, however have to admit that rarely using the OpenPlayer parameter (and never tried out none version of the AIMP player). In many cases Rainmeter should detect the path, without having to explicitly add it. If you install the other players as well, you could try first which of them is working without adding a PlayerPath, because I suppose many (almost all) should work.
I need to at least have a pattern for this issue to be simplified. Possibly, each player's path should be written to the player measure whenever the particular player is called. Or something in this line.
Note a typo in the first !WriteKeyValue bang of the above LeftMouseUpAction option: there is a not needed equal: LeftMouseUpAction=[!WriteKeyValue Player PlayerPath="C:\Program Files\AIMP3\AIMP.exe"][!WriteKeyValue Aimp Ima.... Remove it otherwise the writing doesn!t work. I suppose it's a copy - paste mistake, but it is there.
Thanks for noticing that. I'm on it.
For some Reason, the square root of X2 does not involve X

the DA GALLERY 8-)
User avatar
David8192
Posts: 152
Joined: July 8th, 2021, 11:30 pm
Location: The King's Avenue, Golden Kingdom

Re: Support ? Aimp 4.7

Post by David8192 »

death.crafter wrote: November 6th, 2021, 3:33 am You do realize that not everyone has AIMP installed in C...

Saying this cause you asked about the end user, which means this skin is not for your personal use.
I am really hoping they do dc.
Writing instructions is not my favorite.

Also, why would someone prefer another partition or drive?
For some Reason, the square root of X2 does not involve X

the DA GALLERY 8-)
User avatar
balala
Rainmeter Sage
Posts: 13533
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Support ? Aimp 4.7

Post by balala »

David8192 wrote: November 6th, 2021, 8:37 pm Possibly, each player's path should be written to the player measure whenever the particular player is called.
Probably especially if you want to open the player with the OpenPlayer parameter. As said I'm not entirely sure, since I rarely (well, in fact I think never) used this feature, on any player.
David8192 wrote: November 6th, 2021, 8:44 pm Also, why would someone prefer another partition or drive?
I perfectly agree with death.crafter. The answer probably is that for any reason which sometimes only the user knows, but is definitely possible. If you want to realize a skin to be used by many users out there, you have to take this possibility into account.
User avatar
David8192
Posts: 152
Joined: July 8th, 2021, 11:30 pm
Location: The King's Avenue, Golden Kingdom

Re: Support ? Aimp 4.7

Post by David8192 »

balala wrote: November 6th, 2021, 8:45 pm Probably especially if you want to open the player with the OpenPlayer parameter. As said I'm not entirely sure, since I rarely (well, in fact I think never) used this feature, on any player.

I perfectly agree with death.crafter. The answer probably is that for any reason which sometimes only the user knows, but is definitely possible. If you want to realize a skin to be used by many users out there, you have to take this possibility into account.
Well, the anthill has turned into a mountain. :oops: Then I will have to make some instructions against high hopes on this version of Aimp.
For some Reason, the square root of X2 does not involve X

the DA GALLERY 8-)
User avatar
death.crafter
Rainmeter Sage
Posts: 1208
Joined: April 24th, 2021, 8:13 pm

Re: Support ? Aimp 4.7

Post by death.crafter »

What stops you from doing this?

Code: Select all

[AIMPPath]
Measure=String
String=C:\Program Files (x86)\AIMP\AIMP.exe

[OpenAIMP]
Measure=Plugin
Plugin=RunCommand
Program=PowerShell
Parameter=$defPath = '[&AIMPPath]'; if (-not (Test-Path -Path $defPath -PathType Leaf)) {$currentPath = (Get-Process AIMP -ErrorAction SilentlyContinue).Path; if ($currentPath) { Start-Process $currentPath -ErrorAction SilentlyContinue; $currentPath } else {Start-Process $defPath -ErrorAction SilentlyContinue; $defPath } } else {Start-Process $defPath -ErrorAction SilentlyContinue; $defPath}
OutputType=ANSI
DynamicVariables=1
IfMatch=[AIMPPath:EscRegExp]
IfNotMatchAction=[!WriteKeyValue AIMPPath String "[OpenAIMP]"][!SetOption AIMPPath String "[OpenAIMP]"]
from the Realm of Death
User avatar
balala
Rainmeter Sage
Posts: 13533
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Support ? Aimp 4.7

Post by balala »

death.crafter wrote: November 7th, 2021, 7:34 am What stops you from doing this?

Code: Select all

[AIMPPath]
Measure=String
String=C:\Program Files (x86)\AIMP\AIMP.exe

[OpenAIMP]
Measure=Plugin
Plugin=RunCommand
Program=PowerShell
Parameter=$defPath = '[&AIMPPath]'; if (-not (Test-Path -Path $defPath -PathType Leaf)) {$currentPath = (Get-Process AIMP -ErrorAction SilentlyContinue).Path; if ($currentPath) { Start-Process $currentPath -ErrorAction SilentlyContinue; $currentPath } else {Start-Process $defPath -ErrorAction SilentlyContinue; $defPath } } else {Start-Process $defPath -ErrorAction SilentlyContinue; $defPath}
OutputType=ANSI
DynamicVariables=1
IfMatch=[AIMPPath:EscRegExp]
IfNotMatchAction=[!WriteKeyValue AIMPPath String "[OpenAIMP]"][!SetOption AIMPPath String "[OpenAIMP]"]
It seems there is a small mistake in the above code. I suppose by IfMatch=[AIMPPath:EscRegExp] you meant IfMatch=[AIMPPath:EscapeRegExp], right? IfMatch=[AIMPPath:EscRegExp] is not a supported section variable.
User avatar
death.crafter
Rainmeter Sage
Posts: 1208
Joined: April 24th, 2021, 8:13 pm

Re: Support ? Aimp 4.7

Post by death.crafter »

balala wrote: November 7th, 2021, 11:25 am It seems there is a small mistake in the above code. I suppose by IfMatch=[AIMPPath:EscRegExp] you meant IfMatch=[AIMPPath:EscapeRegExp], right? IfMatch=[AIMPPath:EscRegExp] is not a supported section variable.
Ahh yes, it's Escape. Thanks for pointing out :D
from the Realm of Death
User avatar
balala
Rainmeter Sage
Posts: 13533
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Support ? Aimp 4.7

Post by balala »

death.crafter wrote: November 7th, 2021, 11:54 am Ahh yes, it's Escape. Thanks for pointing out :D
:thumbup:
Don't worry, it happens to all of us from time to time.
User avatar
David8192
Posts: 152
Joined: July 8th, 2021, 11:30 pm
Location: The King's Avenue, Golden Kingdom

Re: Support ? Aimp 4.7

Post by David8192 »

death.crafter wrote: November 7th, 2021, 7:34 am What stops you from doing this?

Code: Select all

[AIMPPath]
Measure=String
String=C:\Program Files (x86)\AIMP\AIMP.exe

[OpenAIMP]
Measure=Plugin
Plugin=RunCommand
Program=PowerShell
Parameter=$defPath = '[&AIMPPath]'; if (-not (Test-Path -Path $defPath -PathType Leaf)) {$currentPath = (Get-Process AIMP -ErrorAction SilentlyContinue).Path; if ($currentPath) { Start-Process $currentPath -ErrorAction SilentlyContinue; $currentPath } else {Start-Process $defPath -ErrorAction SilentlyContinue; $defPath } } else {Start-Process $defPath -ErrorAction SilentlyContinue; $defPath}
OutputType=ANSI
DynamicVariables=1
IfMatch=[AIMPPath:EscRegExp]
IfNotMatchAction=[!WriteKeyValue AIMPPath String "[OpenAIMP]"][!SetOption AIMPPath String "[OpenAIMP]"]
Can I do it for 4 different players.......... simultaneously, sorta?
For some Reason, the square root of X2 does not involve X

the DA GALLERY 8-)