It is currently May 1st, 2024, 11:38 pm

Toggle Hidden Files?

Get help with creating, editing & fixing problems with skins
User avatar
maminscris
Posts: 509
Joined: April 24th, 2009, 3:17 pm
Location: Bucharest, Romania Lat 44,43° Lon 26,1°

Re: Toggle Hidden Files?

Post by maminscris »

jsmorley wrote: Correct.

did that but still nothing, refresh, reopen folder
Zero at programing, zero at writing codes, so far 2 at making images
But I'm good at copy/paste, and I not always like this
Image
User avatar
balala
Rainmeter Sage
Posts: 16194
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Toggle Hidden Files?

Post by balala »

jsmorley wrote:Sure.

Here is an example skin:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,1

[MeasureSuperHidden]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
RegValue=ShowSuperHidden

[MeterSuperHidden]
Meter=String
MeasureName=MeasureSuperHidden
FontColor=255,255,255,255
FontSize=13
Text="Show Protected = %1"
LeftMouseUpAction=!Execute ["#ADDONSPATH#ToggleShowProtected\ToggleShowProtected.vbs"]
Save the below code as C:\Program Files\Rainmeter\Addons\ToggleShowProtected\ToggleShowProtected.vbs

Code: Select all

' Script to toggle Windows Explorer display of proteced system files

Option Explicit
Dim dblHiddenData, strSuperHiddenKey
Dim strKey, WshShell
On Error Resume Next

strKey = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
strSuperHiddenKey = strKey & "\ShowSuperHidden"

Set WshShell = WScript.CreateObject("WScript.Shell")
dblHiddenData = WshShell.RegRead(strSuperHiddenKey)

If dblHiddenData = 0 Then
	WshShell.RegWrite strSuperHiddenKey, 1, "REG_DWORD"

Else
	WshShell.RegWrite strSuperHiddenKey, 0, "REG_DWORD"

End If
Click on the meter to toggle.

Thank you, but what I have to do, if the registry value is not a DWORD, but a REG_SZ? I tried more possibilites, but didn't worked.

Thank you.
User avatar
Alex2539
Rainmeter Sage
Posts: 642
Joined: July 19th, 2009, 5:59 am
Location: Montreal, QC, Canada

Re: Toggle Hidden Files?

Post by Alex2539 »

If it the value is of type REG_SZ, then you need to pass it through a Calc measure first to convert the string into a number. Then you can use it however you like. Example:

Code: Select all

[MeasureRegistry]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SomePlace\InThe\Registry
RegValue=SomeRegSzValue

[ConvertREGSZ]
Measure=Calc
Formula=[MeasureRegistry]
DynamicVariables=1
[ConvertREGSSZ] is the measure you would then work with.
ImageImageImageImage
User avatar
balala
Rainmeter Sage
Posts: 16194
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Toggle Hidden Files?

Post by balala »

Alex2539 wrote:If it the value is of type REG_SZ, then you need to pass it through a Calc measure first to convert the string into a number. Then you can use it however you like. Example:

Code: Select all

[MeasureRegistry]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SomePlace\InThe\Registry
RegValue=SomeRegSzValue

[ConvertREGSZ]
Measure=Calc
Formula=[MeasureRegistry]
DynamicVariables=1
[ConvertREGSSZ] is the measure you would then work with.
Thank you, it really helped.
User avatar
balala
Rainmeter Sage
Posts: 16194
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Toggle Hidden Files?

Post by balala »

balala wrote: Thank you, it really helped.
OK, so another problem: the skin is working in Rainbar 4.6, but a friend of mine is using Rainbar 4.5 and he don't want to update. But in that version, the skin is not working. I studied the problem and I'd like to know how can be done the conversion of a string to a number in a skin in Rainbar 4.5?
Thank you
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Toggle Hidden Files?

Post by poiru »

He needs to update. Tell him to copy all his skins, then remove Rainbar, install Rainmeter 1.3 and copy skins back.
User avatar
balala
Rainmeter Sage
Posts: 16194
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Toggle Hidden Files?

Post by balala »

poiru wrote:He needs to update. Tell him to copy all his skins, then remove Rainbar, install Rainmeter 1.3 and copy skins back.

Thank you
Last edited by dragonmage on October 31st, 2010, 11:42 pm, edited 1 time in total.
Reason: Removed empty [spoiler][/spoiler].