It is currently November 13th, 2019, 6:06 am

Hide/Unhide with a click?

Help with creating, editing & fixing problems with skins
gran172
Posts: 16
Joined: May 16th, 2019, 3:51 am

Hide/Unhide with a click?

gran172 » August 11th, 2019, 11:24 pm

Ok so I've dowlonaded this notes skin: https://www.deviantart.com/tobliug/art/SmartNote-1-0-492161237 and it's great, I really like it, only thing that I think it's missing is a button to hide/unhide the notes themselves, how should I go about doing this? I'd like to click on the "Todo List" text to hide/unhide the notes, as seen here: https://thumbs.gfycat.com/InexperiencedChillyChimpanzee-size_restricted.gif
User avatar
balala
Rainmeter Sage
Posts: 9029
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hide/Unhide with a click?

balala » August 12th, 2019, 10:33 am

gran172 wrote:
August 11th, 2019, 11:24 pm
only thing that I think it's missing is a button to hide/unhide the notes themselves, how should I go about doing this? I'd like to click on the "Todo List" text to hide/unhide the notes,
First add the following measure to your code:

Code: Select all

[MeasureNoteIndex]
Measure=Calc
Formula=#NextNoteIndex#
IfCondition=(#CURRENTSECTION#=1)
IfTrueAction=[!SetVariable HideAction """[!HideMeter "barNotes1"][!HideMeter "barNotes2"][!HideMeter "barNotes3"][!HideMeter "barNotes4"][!HideMeter "barNotes5"][!HideMeter "barNotes6"][!HideMeter "barNotes7"][!HideMeter "barNotes8"][!HideMeter "barNotes9"][!HideMeter "barNotes10"]"""][!UpdateMeter "Title"]
IfCondition2=(#CURRENTSECTION#=2)
IfTrueAction2=[!SetVariable HideAction """[!HideMeter "barNotes2"][!HideMeter "barNotes3"][!HideMeter "barNotes4"][!HideMeter "barNotes5"][!HideMeter "barNotes6"][!HideMeter "barNotes7"][!HideMeter "barNotes8"][!HideMeter "barNotes9"][!HideMeter "barNotes10"]"""][!UpdateMeter "Title"]
IfCondition3=(#CURRENTSECTION#=3)
IfTrueAction3=[!SetVariable HideAction """[!HideMeter "barNotes3"][!HideMeter "barNotes4"][!HideMeter "barNotes5"][!HideMeter "barNotes6"][!HideMeter "barNotes7"][!HideMeter "barNotes8"][!HideMeter "barNotes9"][!HideMeter "barNotes10"]"""][!UpdateMeter "Title"]
IfCondition4=(#CURRENTSECTION#=4)
IfTrueAction4=[!SetVariable HideAction """[!HideMeter "barNotes4"][!HideMeter "barNotes5"][!HideMeter "barNotes6"][!HideMeter "barNotes7"][!HideMeter "barNotes8"][!HideMeter "barNotes9"][!HideMeter "barNotes10"]"""][!UpdateMeter "Title"]
IfCondition5=(#CURRENTSECTION#=5)
IfTrueAction5=[!SetVariable HideAction """[!HideMeter "barNotes5"][!HideMeter "barNotes6"][!HideMeter "barNotes7"][!HideMeter "barNotes8"][!HideMeter "barNotes9"][!HideMeter "barNotes10"]"""][!UpdateMeter "Title"]
IfCondition6=(#CURRENTSECTION#=6)
IfTrueAction6=[!SetVariable HideAction """[!HideMeter "barNotes6"][!HideMeter "barNotes7"][!HideMeter "barNotes8"][!HideMeter "barNotes9"][!HideMeter "barNotes10"]"""][!UpdateMeter "Title"]
IfCondition7=(#CURRENTSECTION#=7)
IfTrueAction7=[!SetVariable HideAction """[!HideMeter "barNotes7"][!HideMeter "barNotes8"][!HideMeter "barNotes9"][!HideMeter "barNotes10"]"""][!UpdateMeter "Title"]
IfCondition8=(#CURRENTSECTION#=8)
IfTrueAction8=[!SetVariable HideAction """[!HideMeter "barNotes8"][!HideMeter "barNotes9"][!HideMeter "barNotes10"]"""][!UpdateMeter "Title"]
IfCondition9=(#CURRENTSECTION#=9)
IfTrueAction9=[!SetVariable HideAction """[!HideMeter "barNotes9"][!HideMeter "barNotes10"]"""][!UpdateMeter "Title"]
IfCondition10=(#CURRENTSECTION#=10)
IfTrueAction10=[!SetVariable HideAction """[!HideMeter "barNotes10"]"""][!UpdateMeter "Title"]
This measure, beased on the current value of the NextNoteIndex variable, sets an appropriate value for a new variable, called HideAction. This variable will be immediately used into the [Title] meter (see below).
Beside the existing options, add the following ones as well to the [Title] meter (don't modify or remove the existing ones, just add these):

Code: Select all

[Title]
...
DynamicVariables=1
LeftMouseUpAction=[!ToggleMeterGroup "gNotes1"][!ToggleMeterGroup "gNotes2"][!ToggleMeterGroup "gNotes3"][!ToggleMeterGroup "gNotes4"][!ToggleMeterGroup "gNotes5"][!ToggleMeterGroup "gNotes6"][!ToggleMeterGroup "gNotes7"][!ToggleMeterGroup "gNotes8"][!ToggleMeterGroup "gNotes9"][!ToggleMeterGroup "gNotes10"][!Redraw]#HideAction#[!Redraw]
gran172
Posts: 16
Joined: May 16th, 2019, 3:51 am

Re: Hide/Unhide with a click?

gran172 » August 12th, 2019, 8:17 pm

That 100% worked, thank you sooooo much dude, I've seen older posts being answered by you that actually end up helping me, you're so helpful to this community, I really appreciate the help :)

One last (unrelated) question if you don't mind since you seem to know your stuff and this is the only remaining issue I have with Rainmeter, how can I add the "Manage rainmeter" to a dock I'm using? I've tried many routes and searched countless threads, I've seen this answer many times but it doesn't seem to work on my end:

"C:\Program Files\Rainmeter\Rainmeter.exe" !Manage
User avatar
balala
Rainmeter Sage
Posts: 9029
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hide/Unhide with a click?

balala » August 12th, 2019, 8:55 pm

gran172 wrote:
August 12th, 2019, 8:17 pm
That 100% worked, thank you sooooo much dude, I've seen older posts being answered by you that actually end up helping me, you're so helpful to this community, I really appreciate the help :)
I'm glad, whenever I can help.
gran172 wrote:
August 12th, 2019, 8:17 pm
One last (unrelated) question if you don't mind since you seem to know your stuff and this is the only remaining issue I have with Rainmeter, how can I add the "Manage rainmeter" to a dock I'm using? I've tried many routes and searched countless threads, I've seen this answer many times but it doesn't seem to work on my end:

"C:\Program Files\Rainmeter\Rainmeter.exe" !Manage
Not sure what you mean by "add the "Manage rainmeter" to a dock". You'd like to open the Manage Rainmeter window from an external doc? If so, the posted command ("C:\Program Files\Rainmeter\Rainmeter.exe" !Manage) does perfectly works.
If on the other hand, you'd like to open the same Manage Rainmeter window from a skin, you have to use the [!Manage] bang. For instance adding the following option to a meter (of any kind), will open the window by a click to the appropriate meter: LeftMouseUpAction=[!Manage].
In both cases if needed, you can add a parameter to the !Manage bang, to open certain tab of the window. Eg using the LeftMouseUpAction=[!Manage "Layouts"] option will open the Layouts tab of the Manage Rainmeter window, and the same one will be open with the "C:\Program Files\Rainmeter\Rainmeter.exe" !Manage Layouts command.
gran172
Posts: 16
Joined: May 16th, 2019, 3:51 am

Re: Hide/Unhide with a click?

gran172 » August 12th, 2019, 11:12 pm

Yep, that's exactly what I meant, I want to make a specific icon on my dock open the "Manage Rainmeter" window (sorry, english isn't my native language :P).

I've tried "C:\Program Files\Rainmeter\Rainmeter.exe" !Manage and also C:\Program Files\Rainmeter\Rainmeter.exe !Manage many many times, whenever I click on the icon that has that route, nothing happens for some reason.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3592
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Hide/Unhide with a click?

eclectic-tech » August 13th, 2019, 1:20 am

gran172 wrote:
August 12th, 2019, 11:12 pm
Yep, that's exactly what I meant, I want to make a specific icon on my dock open the "Manage Rainmeter" window (sorry, english isn't my native language :P).

I've tried "C:\Program Files\Rainmeter\Rainmeter.exe" !Manage and also C:\Program Files\Rainmeter\Rainmeter.exe !Manage many many times, whenever I click on the icon that has that route, nothing happens for some reason.
What "Dock" are you using?

The issue more than likely is th formatting of your command, so knowing which dock software you are using may help find an answer.
gran172
Posts: 16
Joined: May 16th, 2019, 3:51 am

Re: Hide/Unhide with a click?

gran172 » August 13th, 2019, 1:30 am

Interactive Dock with background: https://github.com/callmeEthan/InteractiveDockBackground, the skin has many .ini and .txt files, I can copy paste if needed, everything is at it's default value though.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3592
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Hide/Unhide with a click?

eclectic-tech » August 13th, 2019, 5:19 am

The reason direct entries do not work is because the author uses quotation marks around the bang to launch gamedir# variable values when he auto-generates the dock layout.

To get Rainmeter commands to work in this skin, you will need to create a new shortcut in Windows for the desired command. Creating a shortcut with a properly formatted command lets the skin avoid the issue of quotes not being interpreted correctly in the skin.

From the desktop, right-click and select 'New', then select 'Shortcut'.
In the dialog, type in the 'Location' for the item as:

Code: Select all

"C:\Program Files\Rainmeter\Rainmeter.exe" !Manage
make sure to include the quotation marks. Give the new shortcut a name and finish.

Open your desktop in explorer. Go into edit mode in the dock skin and add an icon. Then drag'n drop the new shortcut from your desktop on to the new icon image. You can edit the icon in the AppList.

Here is a rm.png icon if you haven't already created one.
You do not have the required permissions to view the files attached to this post.
gran172
Posts: 16
Joined: May 16th, 2019, 3:51 am

Re: Hide/Unhide with a click?

gran172 » August 13th, 2019, 7:33 pm

That worked, thanks a lot man! The icon is a very nice extra too :P

Thanks to the both of you actually, this community is great, hope you both have a nice day! :)
User avatar
balala
Rainmeter Sage
Posts: 9029
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hide/Unhide with a click?

balala » August 13th, 2019, 7:38 pm

gran172 wrote:
August 13th, 2019, 7:33 pm
this community is great,
Definitely agree! :thumbup: