It is currently May 10th, 2024, 11:24 am

Different Skins for different virtual desktops?

Get help with installing and using Rainmeter.
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: Different Skins for different virtual desktops?

Post by JpsCrazy »

Correct! That was my original plan.
Any advice for that?
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Different Skins for different virtual desktops?

Post by dragonmage »

Maybe something like...

Code: Select all

[Variables]
Opaque=[!RainmeterSetTransparency 255][!RainmeterSetVariable MLA #HideSwitch#]
Trans=[!RainmeterSetTransparency 1][!RainmeterSetVariable MLA #ShowSwitch#]
HideSwitch=[!RainmeterSetVariable MOA #Hide#]
ShowSwitch=[!RainmeterSetVariable MOA #Show#]
Show=#Opaque#
Hide=#Trans#
MOA=#Hide#
MLA=#Show#

[Rainmeter]
MouseOverAction=#MOA#
MouseLeaveAction=#MLA#
I may have gotten a little lost there... give it a shot though.
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: Different Skins for different virtual desktops?

Post by JpsCrazy »

There were a few errors in variables in the code, so I fixed them. (I think?)
;--Added !Execute for mutiple bangs--Deleted brackets for individual bangs--Deleted MOA and MLA inbetween bangs and variables--
[Variables]
Opaque=!Execute [!RainmeterSetTransparency 255][!RainmeterSetVariable #HideSwitch#]
Trans=!Execute [!RainmeterSetTransparency 1][!RainmeterSetVariable #ShowSwitch#]
HideSwitch=!RainmeterSetVariable #Hide#
ShowSwitch=!RainmeterSetVariable #Show#
Show=#Opaque#
Hide=#Trans#
MOA=#Hide#
MLA=#Show#
I think the problem is the MouseOverAction is hide, and MouseLeaveAction is show. So as soon as I move my mouse away from it comes back. MouseOverAction and/or MouseLeaveAction need to be BOTH Show and Hide. (Essentially I need only MouseOverAction or MouseLeaveAction. Both would be more complete, but it should work fine with just one.)
I was thinking like 'MouseOverAction=If Transparency=1 then !RainmeterSetTransparency 255' and vice versa but I couldn't figure out how to make it real code.
I tried to think of substitutes that would work for the transparency, but the substitutes only works for measures. And I couldn't even begin to figure out a way that it would actually work.
User avatar
jsmorley
Developer
Posts: 22632
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Different Skins for different virtual desktops?

Post by jsmorley »

Works fine dragonmage, if you fix the problem that you need to use !Execute when doing two things with one aciton.

Here is a test skin that works fine.

Code: Select all

[Rainmeter]
MouseOverAction=#MOA#
MouseLeaveAction=#MLA#

[Variables]
Opaque=!Execute [!RainmeterSetTransparency 255][!RainmeterSetVariable MLA #HideSwitch#]
Trans=!Execute [!RainmeterSetTransparency 1][!RainmeterSetVariable MLA #ShowSwitch#]
HideSwitch=!Execute [!RainmeterSetVariable MOA #Hide#]
ShowSwitch=!Execute [!RainmeterSetVariable MOA #Show#]
Show=#Opaque#
Hide=#Trans#
MOA=#Hide#
MLA=#Show#

[MeterImage]
Meter=Image
SolidColor=0,0,0,255
W=200
H=50

[MeterOne]
Meter=String
FontSize=15
FontColor=255,255,255,255
AntiAlias=1
Text=This is a test
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Different Skins for different virtual desktops?

Post by dragonmage »

I always put the !Execute in the actual meter, that way if I choose to add more bangs later with variables, I don't have to worry which Variable has the !Execute in it. That also allows you to rearrange the order of the bangs in case that becomes an issue. I never put !Execute in a Variable.
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: Different Skins for different virtual desktops?

Post by JpsCrazy »

JSMorley, I copied your code exactly, pasted it in a .ini file.
I mouse over - it disappears.
I move my mouse back - it reappears.
I exited out of Rainmeter completely. Tried again with your test, and it did the same thing.

I need it to disappear on mouse over - stay hidden - then reappear after another mouseover. And repeat.

Is it me or the code? O.O
(In case it matters, I'm using the Rainmeter 1.2 Beta on Windows XP)
User avatar
jsmorley
Developer
Posts: 22632
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Different Skins for different virtual desktops?

Post by jsmorley »

dragonmage wrote:I always put the !Execute in the actual meter, that way if I choose to add more bangs later with variables, I don't have to worry which Variable has the !Execute in it. That also allows you to rearrange the order of the bangs in case that becomes an issue. I never put !Execute in a Variable.
Ah, Ok. That's fine. Just that your sample might have been misleading since it didn't show that.

Anyway, it works, but I guess not for what the OP really wants.
Iridios
Posts: 1
Joined: March 31st, 2010, 7:12 pm

Re: Different Skins for different virtual desktops?

Post by Iridios »

I don't know how to script it myself but I could probably figure it out when I have time (which is almost never) I will probably want to use something like this myself. It sounds like the process he is looking for is as follows

First there's a variable that can either be hide or show (Hide to start)

Then a mouseover action that activates the hide function followed by a mouse leave action the flips the variable to show
On the next mouse over the show function is activated followed by a mouse leave action the flips the variable back to hide
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: Different Skins for different virtual desktops?

Post by JpsCrazy »

It took me a minute to get it, but that sounds like a really good idea.
I'll see if I can manage it myself.

The obvious question is how to get it to flip from hide to show.
I'm thinking messing around with !RainmeterSetVariable to make it work.
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Different Skins for different virtual desktops?

Post by dragonmage »

The method I was trying should work. I was just assuming you would start visible. I don't have time to modify it now, but if you haven't figured it out by the time I get home from work I'll set it up and test.