It is currently April 27th, 2024, 12:48 am
Lua script activating/deactivating a different skin?
-
- Posts: 134
- Joined: June 30th, 2014, 8:44 am
Lua script activating/deactivating a different skin?
Is that possible? I can't seem to figure out how to do it. It would trivialize my current project, but it just doesn't seem possible..
-
- Moderator
- Posts: 1931
- Joined: January 29th, 2010, 1:43 am
- Location: Willmar, MN
Re: Lua script activating/deactivating a different skin?
SKIN:Bang('!ActivateConfig', 'ConfigName', 'Skin.ini')
SKIN:Bang('!DeactivateConfig', 'ConfigName')
SKIN:Bang('!ToggleConfig', 'ConfigName', 'Skin.ini')
SKIN:Bang('!DeactivateConfig', 'ConfigName')
SKIN:Bang('!ToggleConfig', 'ConfigName', 'Skin.ini')
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Lua script activating/deactivating a different skin?
Smurfier has it exactly right. Basically, anything you can do in a skin with bangs, you can also do in Lua.
-
- Posts: 134
- Joined: June 30th, 2014, 8:44 am
Re: Lua script activating/deactivating a different skin?
smurfier wrote:SKIN:Bang('!ActivateConfig', 'ConfigName', 'Skin.ini')
SKIN:Bang('!DeactivateConfig', 'ConfigName')
SKIN:Bang('!ToggleConfig', 'ConfigName', 'Skin.ini')
But that doesn't work, at all. I've tried it. It won't toggle the skins, for whatever reason.
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Lua script activating/deactivating a different skin?
I assure you it does work. You have to be careful that you understand and use the correct "ConfigName" for the skin you are trying to toggle. Also, don't forget that Lua is always case sensitive, so be careful of case when using commands. SKIN:Bang (good) | Skin:Bang (fail).
http://docs.rainmeter.net/manual/skins#Config
http://docs.rainmeter.net/manual/skins#Config
-
- Posts: 134
- Joined: June 30th, 2014, 8:44 am
Re: Lua script activating/deactivating a different skin?
jsmorley wrote:I assure you it does work. You have to be careful that you understand and use the correct "ConfigName" for the skin you are trying to toggle. Also, don't forget that Lua is always case sensitive, so be careful of case when using commands. SKIN:Bang (good) | Skin:Bang (fail).
http://docs.rainmeter.net/manual/skins#Config
Yeah, I can get every other bang to work with lua, but just not this one. It just doesn't work for whatever reason. I thought maybe toggling skins just doesn't work in lua, but I suppose I'm just doing something wrong. Probably got some quotes in the wrong place or something.
Whatever the case, I have managed to make a workaround that works better than the lua option regardless, so all is well. Thanks for your help.
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA