It is currently March 28th, 2024, 11:23 pm

Need help making changes to a skin..

Get help with creating, editing & fixing problems with skins
Springchiken
Posts: 9
Joined: March 27th, 2020, 2:17 am

Need help making changes to a skin..

Post by Springchiken »

First of i suck at coding, my skills are copy and paste and maybe changing color codes.

What i want to do is launch a Rainmeter(Elegant Music player https://www.deviantart.com/hiphopium/art/Elegant-Music-Player-791581598 ) using A dock( https://www.deviantart.com/not-finch/art/Interactive-Dock-for-Rainmeter-772713805 ). Then if possible add a button on the Elegant Music player below the + button to launch Spotify. And if there's a way to use the same buttons to turn both off (Elegant Music player and Spotify). If not to code buttons to do so.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Need help making changes to a skin..

Post by balala »

Springchiken wrote: March 27th, 2020, 2:26 am What i want to do is launch a Rainmeter(Elegant Music player https://www.deviantart.com/hiphopium/art/Elegant-Music-Player-791581598 ) using A dock( https://www.deviantart.com/not-finch/art/Interactive-Dock-for-Rainmeter-772713805 ). Then if possible add a button on the Elegant Music player below the + button to launch Spotify. And if there's a way to use the same buttons to turn both off (Elegant Music player and Spotify). If not to code buttons to do so.
Let's see if I understood what you need help with. If I am correct, you need help on how to do all this. Am I?
If I am, first question is: have you installed those skins (Elegant Music Player and Interactive Dock for Rainmeter)? If you have, when the skins are installed, both installer launch the appropriate skin (Elegant Music Player\Elegant Music Player\Elegant Music Player.ini and A dock\Dock.ini accordingly). Didn't get them loaded after instalation?
Springchiken
Posts: 9
Joined: March 27th, 2020, 2:17 am

Re: Need help making changes to a skin..

Post by Springchiken »

Im sorry im bad at explaining things.

Yes i have installed both skins. They both work as intended.

What i want to do is modify the code in both Skins. But have no clue how. I have made a image of my desktop with a text overlay to try to help explain what i need help with.

Image

https://imgur.com/a/srkddOV
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Need help making changes to a skin..

Post by balala »

Springchiken wrote: March 27th, 2020, 9:34 am I have made a image of my desktop with a text overlay to try to help explain what i need help with.
A few clarifications would be needed here. Let's make smaller steps at a time.
On the right side of the posted image you say: "This icon now opens Spotify. I want it to open the elegant Music Player". You have to identify which icon is that one. Since initially there is no Spotify icon, I suppose you've added later. If you did, you probably know which icon is that one, what number does it have into the list. Open the A dock\@Resources\Applist.inc file and modify the appropriate GamedirXX variable to the following one: GamedirXX=[!ToggleConfig "Elegant Music Player\Elegant Music Player" "Elegant Music Player.ini"]. Alternatively you can use the !ActivateConfig bang, instead of !ToggleConfig.
Now the question is that you said: "if it can be done I'd love to have this same icon turn off both Spotify and Elegant Music Player". Would you like to deactivate the Elegant Music Palyer skin and close Spotify music player? Have I understood it well?
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Need help making changes to a skin..

Post by Yincognito »

balala wrote: March 27th, 2020, 2:07 pmOpen the A dock\@Resources\Applist.inc file and modify the appropriate GamedirXX variable to the following one: GamedirXX=[!ToggleConfig "Elegant Music Player\Elegant Music Player" "Elegant Music Player.ini"].
Doesn't seem to work here, and I have no clue why. Modifying the GamedirXX variable to [!ToggleConfig "Test" "Test.ini"] yields an ActivateConfig: Invalid parameters in the log, but when directly replacing the SKIN:Bang(command) part in the function interact(index) code from the dock's animation.lua with SKIN:Bang('[!ToggleConfig "Test" "Test.ini"]') everything works as expected. Do you have any idea why this happens? After all, it's exactly the same string in both cases (minus the apostrophes and the fact that in one case it's done directly and in the other indirectly, through Applist.inc).

By the way, you can easily edit the Applist.inc file by right clicking on the dock and choosing List file.

P.S. And yeah, I tried already to modify the Lua code in a million ways (i.e. adding or removing apostrophes, quotes, trying to break down the SKIN:Bang syntax like in the manual, etc.), to no effect. I got rid of the error in some cases, but of course nothing would happen on click anyway.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Need help making changes to a skin..

Post by balala »

Yincognito wrote: March 27th, 2020, 5:02 pm Doesn't seem to work here, and I have no clue why. Modifying the GamedirXX variable to [!ToggleConfig "Test" "Test.ini"] yields an ActivateConfig: Invalid parameters in the log, but when directly replacing the SKIN:Bang(command) part in the function interact(index) code from the dock's animation.lua with SKIN:Bang('[!ToggleConfig "Test" "Test.ini"]') everything works as expected. Do you have any idea why this happens?
No, I have not, especially that here it does work as I described. For instance I replaced the old Gamedir4 with Gamedir4=[!ToggleConfig "WeatherComJSON" "WeatherComJSON.ini"] and the appropriate icon does toggle the existing WeatherConJSON skin. So, no clue...
Maybe try packaging and uploading the skin, as you have it, to can take a look. It definitely should work.
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Need help making changes to a skin..

Post by Yincognito »

balala wrote: March 27th, 2020, 6:22 pm No, I have not, especially that here it does work as I described. For instance I replaced the old Gamedir4 with Gamedir4=[!ToggleConfig "WeatherComJSON" "WeatherComJSON.ini"] and the appropriate icon does toggle the existing WeatherConJSON skin. So, no clue...
Maybe try packaging and uploading the skin, as you have it, to can take a look. It definitely should work.
Yeah, well, it's not that important - if the thing works for the OP, then it's totally fine. I was just baffled by the fact that the same "string"/"command" produced radically different results in my case. In the end, I'm not going to use the skin, or the Lua scripts from it, so it was only a matter of making stuff work so I could help here as well, if necessary.

So thanks, but it isn't worth the effort in my case - especially if everything works for the OP as expected...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Need help making changes to a skin..

Post by balala »

Yincognito wrote: March 27th, 2020, 11:49 pm Yeah, well, it's not that important - if the thing works for the OP, then it's totally fine. I was just baffled by the fact that the same "string"/"command" produced radically different results in my case.
Well, this is a weird situation. But me have no explanation.
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Need help making changes to a skin..

Post by Yincognito »

balala wrote: March 28th, 2020, 9:27 am Well, this is a weird situation. But me have no explanation.
Yeah, don't worry about it anymore. It's not like I'll use Lua or this skin anytime soon... :D
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Need help making changes to a skin..

Post by balala »

Yincognito wrote: March 28th, 2020, 11:15 am Yeah, don't worry about it anymore. It's not like I'll use Lua or this skin anytime soon... :D
:thumbup: