It is currently October 21st, 2019, 4:14 am

Create a "hotspot" to hide/show your skins

Tips and Tricks from the Rainmeter Community
Ao Nuu Shin
Posts: 128
Joined: May 2nd, 2015, 9:13 am

Re: Create a "hotspot" to hide/show your skins

Ao Nuu Shin » June 19th, 2015, 6:57 am

jsmorley wrote:Sometimes you may want a quick way to hide all Rainmeter skins while taking a screenshot or working on something where the skins are visibly or physically in the way. You can create a skin to use as a "hotspot" on the screen that will turn your skins on and off by just moving your mouse to it.

This does not "unload" the skins, and they keep working in the background, but are just "hidden".

The skin:

[Rainmeter]
Update=500

[MeterHotspot]
Meter=Image
W=5
H=5
SolidColor=0,0,0,1
MouseOverAction=!ToggleGroup MySkins

Then in Rainmeter.ini, (Edit settings from the context menu) in each [ConfigName] section, just add the line:

Group=MySkins

If there is already a Group= line there, like Group=Enigma, just add your group name with Group=Enigma | MySkins

Don't add this group name to the hotspot skin itself....

Stick this invisible hotspot in the corner of your monitor or wherever you like it, and when you move your mouse over it, all Rainmeter skins will be hidden. When you want to restore them, just move the mouse back up there again.

Hey, hello! Remember me? Eh, well, first I want to thank you again for helping everyone with the rainmeter projects, I'm happy that I am a part here with all of you. Second, I have a question to make, i'm working on a new project, and I created two opposite bars for desktop, a left and a right. With this toggle thingy, will I be able to have hidden them on the sides of the screen? Like, whenever the mouse is not pointing on them, they won't appear, and when the mouse moves on the sides they will appear. example ( moving on left side, the bar shows itself.)

I have the code ready, If you want to see it to get an idea, just tell me and I will paste it here.
You do not have the required permissions to view the files attached to this post.
Ao Nuu Shin
Posts: 128
Joined: May 2nd, 2015, 9:13 am

Re: Create a "hotspot" to hide/show your skins

Ao Nuu Shin » June 28th, 2015, 11:17 pm

*Lovely bump*
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3575
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Create a "hotspot" to hide/show your skins

eclectic-tech » June 29th, 2015, 2:43 pm

Ao Nuu Shin wrote:*Lovely bump*
Please paste your code that is not working...

You are going to want a variation of this tip; you do not want to hide ALL your loaded skins, you want to toggle groups of skins for each side menu.
Ao Nuu Shin
Posts: 128
Joined: May 2nd, 2015, 9:13 am

Re: Create a "hotspot" to hide/show your skins

Ao Nuu Shin » June 30th, 2015, 8:31 am

eclectic-tech wrote: Please paste your code that is not working...

You are going to want a variation of this tip; you do not want to hide ALL your loaded skins, you want to toggle groups of skins for each side menu.

Ok, cool, i'll show you my code for the two bars - left and right - I want to make them hideable.

Code: Select all

[Rainmeter]
Author=Senjuroman
Info=Grand Hall skin
Update=1000
________________

[Metadata]
Description=Aesthetic Black Bar
Version=1.1

[Variables]
fontColor=182,182,180,255
fontType=

_________________

[Background]
Meter=IMAGE
ImageName=#@#Images/apps.png
X=0
Y=0
_________________

[meterBarChrome]
 Meter=STRING
 MouseOverAction=!Execute [PLAY Button Sound Effect 1.wav][!SetOption MeterBarChrome FontColor 255,255,255,255][!SetOption MeterBarChrome StringStyle Bold]
 LeftMouseUpAction=!Execute ["C:/Program Files (x86)/Google/Chrome/Application/Chrome.exe"]
 LeftMouseDownAction=!Execute [PLAY Button Sound Effect 2.wav]
 MouseLeaveAction=!Execute [!SetOption MeterBarChrome FontColor #fontColor#][!SetOption MeterBarChrome StringStyle Bold]
 StringStyle=Bold
 StringAlign=CENTER
 sTRINGeFFECT=Shadow
 FontFace=#fontType#
 FontSize=10 
 FontColor=#fontColor#
 AntiAlias=1 
 AutoScale=1 
 Text="Chrome"  
 X=180
 Y=97

_________________

[meterBarSkype]
 Meter=STRING
 MouseOverAction=!Execute [PLAY Button Sound Effect 1.wav][!SetOption MeterBarSkype FontColor 255,255,255,255][!SetOption MeterBarSkype StringStyle Bold]
 LeftMouseUpAction=!Execute ["C:/Program Files (x86)/Skype/Phone/Skype.exe"]
 LeftMouseDownAction=!Execute [PLAY Button Sound Effect 2.wav]
 MouseLeaveAction=!Execute [!SetOption MeterBarSkype FontColor #fontColor#][!SetOption MeterBarSkype StringStyle Bold]
 StringStyle=Bold
 StringAlign=CENTER
 sTRINGeFFECT=Shadow
 FontFace=#fontType#
 FontSize=10 
 FontColor=#fontColor#
 AntiAlias=1 
 AutoScale=1 
 Text="Skype"  
 X=180
 Y=218

_________________

[meterBarSteam]
 Meter=STRING
 MouseOverAction=!Execute [PLAY Button Sound Effect 1.wav][!SetOption MeterBarSteam FontColor 255,255,255,255][!SetOption MeterBarSteam StringStyle Bold]
 LeftMouseUpAction=!Execute ["C:/Program Files (x86)/Steam/Steam.exe"]
 LeftMouseDownAction=!Execute [PLAY Button Sound Effect 2.wav]
 MouseLeaveAction=!Execute [!SetOption MeterBarSteam FontColor #fontColor#][!SetOption MeterBarSteam StringStyle Bold]
 StringStyle=Bold
 StringAlign=CENTER
 sTRINGeFFECT=Shadow
 FontFace=#fontType#
 FontSize=10 
 FontColor=#fontColor#
 AntiAlias=1 
 AutoScale=1 
 Text="Steam"  
 X=180
 Y=338

_________________

[meterBarTorrent]
 Meter=STRING
 MouseOverAction=!Execute [PLAY Button Sound Effect 1.wav][!SetOption MeterBarTorrent FontColor 255,255,255,255][!SetOption MeterBarTorrent StringStyle Bold]
 LeftMouseUpAction=!Execute ["C:/Program Files (x86)/uTorrent/uTorrent.exe"]
 LeftMouseDownAction=!Execute [PLAY Button Sound Effect 2.wav]
 MouseLeaveAction=!Execute [!SetOption MeterBarTorrent FontColor #fontColor#][!SetOption MeterBarTorrent StringStyle Bold]
 StringStyle=Bold
 StringAlign=CENTER
 sTRINGeFFECT=Shadow
 FontFace=#fontType#
 FontSize=10 
 FontColor=#fontColor#
 AntiAlias=1 
 AutoScale=1 
 Text="Torrent"  
 X=180
 Y=470

_________________

[meterBarFacebook]
 Meter=STRING
 MouseOverAction=!Execute [PLAY Button Sound Effect 1.wav][!SetOption MeterBarFacebook FontColor 255,255,255,255][!SetOption MeterBarFacebook StringStyle Bold]
 LeftMouseUpAction=!Execute ["www.facebook.com"]
 LeftMouseDownAction=!Execute [PLAY Button Sound Effect 2.wav]
 MouseLeaveAction=!Execute [!SetOption MeterBarFacebook FontColor #fontColor#][!SetOption MeterBarFacebook StringStyle Bold]
 StringStyle=Bold
 StringAlign=CENTER
 sTRINGeFFECT=Shadow
 FontFace=#fontType#
 FontSize=12 
 FontColor=#fontColor#
 AntiAlias=1 
 AutoScale=1 
 Text="Facebook"  
 X=60
 Y=155

_________________

[meterBarDeviantArt]
 Meter=STRING
 MouseOverAction=!Execute [PLAY Button Sound Effect 1.wav][!SetOption MeterBarDeviantArt FontColor 255,255,255,255][!SetOption MeterBarDeviantArt StringStyle Bold]
 LeftMouseUpAction=!Execute ["www.deviantart.com"]
 LeftMouseDownAction=!Execute [PLAY Button Sound Effect 2.wav]
 MouseLeaveAction=!Execute [!SetOption MeterBarDeviantArt FontColor #fontColor#][!SetOption MeterBarDeviantArt StringStyle Bold]
 StringStyle=Bold
 StringAlign=CENTER
 sTRINGeFFECT=Shadow
 FontFace=#fontType#
 FontSize=12 
 FontColor=#fontColor#
 AntiAlias=1 
 AutoScale=1 
 Text="DeviantArt"  
 X=61
 Y=275

_________________

[meterBarYoutube]
 Meter=STRING
 MouseOverAction=!Execute [PLAY Button Sound Effect 1.wav][!SetOption MeterBarYoutube FontColor 255,255,255,255][!SetOption MeterBarYoutube StringStyle Bold]
 LeftMouseUpAction=!Execute ["www.youtube.com"]
 LeftMouseDownAction=!Execute [PLAY Button Sound Effect 2.wav]
 MouseLeaveAction=!Execute [!SetOption MeterBarYoutube FontColor #fontColor#][!SetOption MeterBarYoutube StringStyle Bold]
 StringStyle=Bold
 StringAlign=CENTER
 sTRINGeFFECT=Shadow
 FontFace=#fontType#
 FontSize=12 
 FontColor=#fontColor#
 AntiAlias=1 
 AutoScale=1 
 Text="Youtube"  
 X=60
 Y=395
Last edited by Brian on June 30th, 2015, 4:31 pm, edited 1 time in total.
Reason: Please use [code] tags next time.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3575
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Create a "hotspot" to hide/show your skins

eclectic-tech » June 30th, 2015, 9:31 pm

@ Ao Nuu Shin

The quick and simple way is to add 2 lines to your skin's [Rainmeter] section, and create a separate toggle skin...

Add these 2 lines to the [Rainmeter] section of the skin you posted.

Code: Select all

Group=LeftSidebar
OnRefreshAction=!ToggleGroup LeftSideBar

Now create a new skin and save it in a different folder from the one with your sidebar meters; preferably in a new sub-folder of your main skin (only 1 skin in any folder can be active). Here's a working sample:

ToggleLeftSB.ini

Code: Select all

[Rainmeter]
Update=1000

[MeterToggleLeftSB]
Meter=Image
W=1
H=#ScreenAreaHeight#
SolidColor=0,0,0,1
MouseOverAction=[!ToggleGroup LeftSidebar]
Load both skins. Nothing will show until you move your mouse to the left edge of the screen. Then your sidebar skin will appear. Move over the edge again to hide it.

---
A second option might be to use the ActionTimer.dll

Here is an example using a modified version of your code:

Code: Select all

[Rainmeter]
Author=Senjuroman
Info=Grand Hall skin
Update=1000
OnUnFocusAction=[!CommandMeasure mSidePanelLeft "Execute 2"]

; Using ActionList.dll will give you a 'controllable' movement (versus a sudden Show/Hide).

; I created 2 position variables (PosA & PosB) to control the top meters for Facebook and Chrome links. I set all the meters below these to relative positions rather than the fixed ones. 

; I calculated a value for X that would hide all meters (-240), then created the mSidePanelLeft measure with commands to increase PosA & PosB from -240 and clamped the positions at 60 & 180 (your initial positions).

; I do not have your background image, so I changed it to a solidcolor.

; I created an image meter to trigger the side panel action [MeterToggle]. It is the last meter in the skin, so it will always be on top of any displayed meter in this skin. SolidColor=0,0,0,1 allows it to be almost invisible, but react to mouse actions.On mouseover it will initiate the movement of the left side panel to it's display position. 

; I put the close action on the background image, so the panels will remain open as long as the mouse is over the background.

; Finally, I added a OnUnFocusAction to the [Rainmeter] section to close the panels (ActionList2) if the skin loses focus to a launched app.

; The 'W' variable will control the speed of the movement (higher for slower, lower for faster)
 
; ________________

[Metadata]
Description=Aesthetic Black Bar
Version=1.1

[Variables]
fontColor=182,182,180,255
fontType=
PosA=-240
PosB=-240
U=[!UpdateMeasure mSidePanelLeft][!UpdateMeter *][!Redraw]
W=20

; _________________

[mSidePanelLeft]
Measure=Plugin
Plugin=ActionTimer
ActionList1=ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#|ShowPanels|Wait #W#
ActionList2=HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#|HidePanels|Wait #W#
ShowPanels=[!SetVariable PosA "(Clamp(#PosA#+20,-240,60))"][!SetVariable PosB "(Clamp(#PosB#+20,-240,180))"]#U#
HidePanels=[!SetVariable PosA "(Clamp(#PosA#-20,-240,60))"][!SetVariable PosB "(Clamp(#PosB#-20,-240,180))"]#U#
DynamicVariables=1

[Background]
Meter=IMAGE
;ImageName=#@#Images/apps.png
X=(#PosA#-60)
Y=40
W=240
H=(#ScreenAreaHeight#-260)
SolidColor=0,0,0,64
MouseLeaveAction=[!CommandMeasure mSidePanelLeft "Execute 2"]
DynamicVariables=1

; _________________

[meterBarChrome]
 Meter=STRING
 MouseOverAction=!Execute [PLAY Button Sound Effect 1.wav][!SetOption MeterBarChrome FontColor 255,255,255,255][!SetOption MeterBarChrome StringStyle Bold]
 LeftMouseUpAction=!Execute ["C:/Program Files (x86)/Google/Chrome/Application/Chrome.exe"]
 LeftMouseDownAction=!Execute [PLAY Button Sound Effect 2.wav]
 MouseLeaveAction=!Execute [!SetOption MeterBarChrome FontColor #fontColor#][!SetOption MeterBarChrome StringStyle Bold]
 StringStyle=Bold
 StringAlign=CENTER
 sTRINGeFFECT=Shadow
 FontFace=#fontType#
 FontSize=10 
 FontColor=#fontColor#
 AntiAlias=1 
 AutoScale=1 
 Text="Chrome"  
 X=#PosB#
 Y=98
DynamicVariables=1

; _________________

[meterBarSkype]
 Meter=STRING
 MouseOverAction=!Execute [PLAY Button Sound Effect 1.wav][!SetOption MeterBarSkype FontColor 255,255,255,255][!SetOption MeterBarSkype StringStyle Bold]
 LeftMouseUpAction=!Execute ["C:/Program Files (x86)/Skype/Phone/Skype.exe"]
 LeftMouseDownAction=!Execute [PLAY Button Sound Effect 2.wav]
 MouseLeaveAction=!Execute [!SetOption MeterBarSkype FontColor #fontColor#][!SetOption MeterBarSkype StringStyle Bold]
 StringStyle=Bold
 StringAlign=CENTER
 sTRINGeFFECT=Shadow
 FontFace=#fontType#
 FontSize=10 
 FontColor=#fontColor#
 AntiAlias=1 
 AutoScale=1 
 Text="Skype"  
 X=r
 Y=120r

 ; _________________

[meterBarSteam]
 Meter=STRING
 MouseOverAction=!Execute [PLAY Button Sound Effect 1.wav][!SetOption MeterBarSteam FontColor 255,255,255,255][!SetOption MeterBarSteam StringStyle Bold]
 LeftMouseUpAction=!Execute ["C:/Program Files (x86)/Steam/Steam.exe"]
 LeftMouseDownAction=!Execute [PLAY Button Sound Effect 2.wav]
 MouseLeaveAction=!Execute [!SetOption MeterBarSteam FontColor #fontColor#][!SetOption MeterBarSteam StringStyle Bold]
 StringStyle=Bold
 StringAlign=CENTER
 sTRINGeFFECT=Shadow
 FontFace=#fontType#
 FontSize=10 
 FontColor=#fontColor#
 AntiAlias=1 
 AutoScale=1 
 Text="Steam"  
 X=r
 Y=120r

 ; _________________

[meterBarTorrent]
 Meter=STRING
 MouseOverAction=!Execute [PLAY Button Sound Effect 1.wav][!SetOption MeterBarTorrent FontColor 255,255,255,255][!SetOption MeterBarTorrent StringStyle Bold]
 LeftMouseUpAction=!Execute ["C:/Program Files (x86)/uTorrent/uTorrent.exe"]
 LeftMouseDownAction=!Execute [PLAY Button Sound Effect 2.wav]
 MouseLeaveAction=!Execute [!SetOption MeterBarTorrent FontColor #fontColor#][!SetOption MeterBarTorrent StringStyle Bold]
 StringStyle=Bold
 StringAlign=CENTER
 sTRINGeFFECT=Shadow
 FontFace=#fontType#
 FontSize=10 
 FontColor=#fontColor#
 AntiAlias=1 
 AutoScale=1 
 Text="Torrent"  
 X=r
 Y=120r

 ; _________________

[meterBarFacebook]
 Meter=STRING
 MouseOverAction=!Execute [PLAY Button Sound Effect 1.wav][!SetOption MeterBarFacebook FontColor 255,255,255,255][!SetOption MeterBarFacebook StringStyle Bold]
 LeftMouseUpAction=!Execute ["www.facebook.com"]
 LeftMouseDownAction=!Execute [PLAY Button Sound Effect 2.wav]
 MouseLeaveAction=!Execute [!SetOption MeterBarFacebook FontColor #fontColor#][!SetOption MeterBarFacebook StringStyle Bold]
 StringStyle=Bold
 StringAlign=CENTER
 sTRINGeFFECT=Shadow
 FontFace=#fontType#
 FontSize=12 
 FontColor=#fontColor#
 AntiAlias=1 
 AutoScale=1 
 Text="Facebook"  
 X=#PosA#
 Y=155
DynamicVariables=1

; _________________

[meterBarDeviantArt]
 Meter=STRING
 MouseOverAction=!Execute [PLAY Button Sound Effect 1.wav][!SetOption MeterBarDeviantArt FontColor 255,255,255,255][!SetOption MeterBarDeviantArt StringStyle Bold]
 LeftMouseUpAction=!Execute ["www.deviantart.com"]
 LeftMouseDownAction=!Execute [PLAY Button Sound Effect 2.wav]
 MouseLeaveAction=!Execute [!SetOption MeterBarDeviantArt FontColor #fontColor#][!SetOption MeterBarDeviantArt StringStyle Bold]
 StringStyle=Bold
 StringAlign=CENTER
 sTRINGeFFECT=Shadow
 FontFace=#fontType#
 FontSize=12 
 FontColor=#fontColor#
 AntiAlias=1 
 AutoScale=1 
 Text="DeviantArt"  
 X=r
 Y=120r

; _________________

[meterBarYoutube]
 Meter=STRING
 MouseOverAction=!Execute [PLAY Button Sound Effect 1.wav][!SetOption MeterBarYoutube FontColor 255,255,255,255][!SetOption MeterBarYoutube StringStyle Bold]
 LeftMouseUpAction=!Execute ["www.youtube.com"]
 LeftMouseDownAction=!Execute [PLAY Button Sound Effect 2.wav]
 MouseLeaveAction=!Execute [!SetOption MeterBarYoutube FontColor #fontColor#][!SetOption MeterBarYoutube StringStyle Bold]
 StringStyle=Bold
 StringAlign=CENTER
 sTRINGeFFECT=Shadow
 FontFace=#fontType#
 FontSize=12 
 FontColor=#fontColor#
 AntiAlias=1 
 AutoScale=1 
 Text="Youtube"  
 X=r
 Y=120r
 
 [MeterToggleLeft]
 Meter=Image
 W=1
 H=#ScreenAreaHeight#
 SolidColor=0,0,0,1
 MouseOverAction=[!CommandMeasure mSidePanelLeft "Execute 1"]
 
Edit: added 1 additional action to each action list to complete the positioning
Last edited by eclectic-tech on July 3rd, 2015, 12:36 am, edited 1 time in total.
Ao Nuu Shin
Posts: 128
Joined: May 2nd, 2015, 9:13 am

Re: Create a "hotspot" to hide/show your skins

Ao Nuu Shin » July 1st, 2015, 4:30 pm

Thanks a lot for all the help and the detail!! I appreciate it, you guys are the best!! I'll try to work on this more!!
Ao Nuu Shin
Posts: 128
Joined: May 2nd, 2015, 9:13 am

Re: Create a "hotspot" to hide/show your skins

Ao Nuu Shin » July 1st, 2015, 5:01 pm

Sorry, I tried your way, but I have a problem, either one of the bars are working or they both not. I don't know what happened, at first it worked like a charm, i tried creating a right toggle with the same code you provided me with, and changing just the lefts to rights, nothing works, i deleted it, and now i'm using only the left - the original you gave me - and everytime i poin on the left side of the screen one of the two bars are showing....am i screwed? XD

Ok, I deleted everything and re-paste it, it seems to work, but when I unload the toggleleftSB.ini file, they start to get confused, when I load it again, they just doing the same thing I mentioned above, like either one of them shows/stays hidden, I really don't know what to do.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3575
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Create a "hotspot" to hide/show your skins

eclectic-tech » July 1st, 2015, 8:08 pm

Ao Nuu Shin wrote:Sorry, I tried your way, but I have a problem, either one of the bars are working or they both not. I don't know what happened, at first it worked like a charm, i tried creating a right toggle with the same code you provided me with, and changing just the lefts to rights, nothing works, i deleted it, and now i'm using only the left - the original you gave me - and everytime i poin on the left side of the screen one of the two bars are showing....am i screwed? XD

Ok, I deleted everything and re-paste it, it seems to work, but when I unload the toggleleftSB.ini file, they start to get confused, when I load it again, they just doing the same thing I mentioned above, like either one of them shows/stays hidden, I really don't know what to do.
You need to do more than just "changing just the lefts to rights", you need to position the toggles skins at the screen left\right edges, and add Group=RightSidebar for those skins, and change the action to toggle that group.

Make simple changes to the code, save, but don't close your editor. Refresh to see the change, if it doesn't work, undo those changes (most editors can undo multiple changes if not closed), and try a different way.

Toggling skins is fairly straightforward. I don't know what else to say that might help...
Ao Nuu Shin
Posts: 128
Joined: May 2nd, 2015, 9:13 am

Re: Create a "hotspot" to hide/show your skins

Ao Nuu Shin » July 2nd, 2015, 2:01 am

I'm sorry, I don't think I understand. You may be right, but it's difficult for me to understand it, so far I did almost anything I could do and I'm still making it worse. Anyway...thank you for your time, I don't think I'll be able to make it work.