It is currently May 3rd, 2024, 11:43 pm

[Solved] !RainmeterActivateConfig Syntax

Get help with creating, editing & fixing problems with skins
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

[Solved] !RainmeterActivateConfig Syntax

Post by Seahorse »

It occurs to me that another way of solving a popup issue (negative X values) is to break the Lyrics off into a separate config. I've done this and it works fine. So now all I want to do is launch it from a button in the media player skin.
!RainmeterActivateConfig [Config] [Ini-file]
Activates a new configuration ini-file. The ini-file is just the name of the file; do not include the path.
This seems simple enough, Theme is Cobalt, skins are in directories of their own Cobolt\Lyrics and Cobolt\Media Player

Code: Select all

[MeterLricsButton]
Meter=Button
ButtonImage=#ROOTCONFIGPATH#\Images\LyricsButton.png
X=25r
Y=r
LeftMouseUpAction=!RainmeterActivateConfig #CURRENTCONFIG#\Lyrics Lyrics.ini
Doesn't work, neither do:

LeftMouseUpAction=!RainmeterActivateConfig Cobalt\Lyrics Lyrics.ini
LeftMouseUpAction=!RainmeterActivateConfig Lyrics Lyrics.ini
LeftMouseUpAction=!RainmeterActivateConfig Lyrics.ini

I've waded through four pages of search results some showing full path names, values in speech marks and so on and these don't work either, clearly I am missing something and would appreciate a steer.
Last edited by Seahorse on July 1st, 2011, 2:51 pm, edited 1 time in total.
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: !RainmeterActivateConfig Syntax

Post by poiru »

First of all, you should always enclose the arguments in quotes to avoid issues with spacing (Media Player without quotes is not equal to "Media Player"). Try something like this:

Code: Select all

LeftMouseUpAction=!RainmeterActivateConfig "Gnometer\Clock" "Clock.ini"
.. where the path to Clock.ini is blaa\Rainmeter\Skins\Gnometer\Clock\Clock.ini.

Also, you #CURRENTCONFIG# expands to the current config. When used in Clock.ini, for example, it would expand to Gnometer\Clock.

---

I think a better approach would be to have the lyrics meter hidden, and use:

Code: Select all

LeftMouseUpAction=!Execute [!RainmeterShowMeter "LyricsMeter" "Cobalt\Lyrics"][!RainmeterRedraw "Cobalt\Lyrics"]
Or, if you want the fade effect of ActivateConfig, add "OnRefreshAction=!RainmeterHide" to the lyrics skin and the following from the other skin:

Code: Select all

LeftMouseUpAction=!Execute [!RainmeterShowFade "Cobalt\Lyrics"]
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: !RainmeterActivateConfig Syntax

Post by Seahorse »

I had it working and hidden toggling in the main skin. This works fine for the three edges of the screen the player isn't touching and requires a change of all the X values if you put the player on the right of the screen and want it to popout on the left as I do.

Lyrics as an independent skin doesn't have this issue, though I suspect it might need some #SCREENAREAWIDTH# & #SCREENAREAHEIGHT# love to avoid running off the screen given it's random sizes. Hence my cunning plan to simply launch the second skin with the Lyrics from the media player skin, removing the problem with positioning.

Lyrics.ini as a stand alone skin with Hidden=1 commented out so I can see that it actually runs it launches and runs fine, from right click config menus, so there's my validation of Lyrics.ini, all I need to do now is launch it from the Media Player.ini and use

Code: Select all

Group=Popup
LeftMouseUpAction=!RainmeterToggleMeterGroup Popup
with Hidden=1 restored in the Lyrics.ini to make it vanish by clicking as before.

So using your Gnometer example:

Code: Select all

LeftMouseUpAction=!RainmeterActivateConfig "Cobalt\Lyrics" "Lyrics.ini"
Should launch the lyrics skin, however, it doesn't, I am now looking for spelling issues in folders & filenames... :-(
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
Waldensamkeit
Posts: 83
Joined: March 15th, 2011, 12:39 pm
Location: Hamilton, New Jersey

Re: !RainmeterActivateConfig Syntax

Post by Waldensamkeit »

I do something similar with a couple weather skins. I have a small "today" temperature and icon with a simple description and then clicking on the icon will activate the VClouds 2 forecast config. I remember having exactly the same problem and then settled on toggle instead of activate and/or deactivate and everything works fine.

Code: Select all

LeftMouseUpAction=!RainmeterToggleConfig VCloudsWeather2 "VClouds Weather 2 - 2Days.ini"
Took me a while to figure out the quotes. Nothing seemed to work until i put quotes around the name of the .ini only.
Maybe that'll work for you too.
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: !RainmeterActivateConfig Syntax

Post by Seahorse »

Thanks but still works as a stand-alone, but not launching from media skin... :confused:
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: !RainmeterActivateConfig Syntax

Post by poiru »

What is the full path to Lyrics.ini? Copy it from Explorer and paste here.
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: !RainmeterActivateConfig Syntax

Post by Seahorse »

E:\Data Files\Rainmeter\Skins\Cobolt\Lyrics

i.e. My Documents lives on E:
Capture.PNG
You do not have the required permissions to view the files attached to this post.
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: !RainmeterActivateConfig Syntax

Post by poiru »

Cobolt != Cobalt ;)
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: !RainmeterActivateConfig Syntax

Post by Seahorse »

ARRRRRRGHHHHHHHHHHHH! :x

Image

It's been misspelt since I created it and I never noticed...

..works as intended with the right spelling. :oops:

Media player ini:

Code: Select all

LeftMouseUpAction=!RainmeterActivateConfig "Cobolt\Lyrics" "Lyrics.ini"
This works better though:

Code: Select all

LeftMouseUpAction=!RainmeterToggleConfig "Cobolt\Lyrics" "Lyrics.ini"
Lyrics ini:

Code: Select all

LeftMouseUpAction=!RainmeterDeactivateConfig
I'll tinker over the weekend and see if it does the job.
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: [Solved] !RainmeterActivateConfig Syntax

Post by Seahorse »

Hmm, fires up the lyrics skin fine. If I load another album the media player skin continues to show the previous ones art and details, although the buttons work just fine (play/pause etc). Closing & opening the media player skin skin clears this, though not in all instances. Actually, it breaks as soon as the lyrics skin is toggled a second time in the media player skin. CLosing the lyrics skin and then refreshing the player restores functionality.

Will tinker more... :sly:

Two instances of NowPlaying seems to be the cause as it's used by the player and the lyrics skins... :confused:
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt