It is currently August 19th, 2019, 2:25 am

Hiding an image when a drive is disconnected

Help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 8534
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hiding an image when a drive is disconnected

balala » August 7th, 2019, 6:24 pm

sl23 wrote:
August 7th, 2019, 4:46 pm
I don't suppose as an extension of this, that it's possible to have this shortcut work even if the drive letter changes?
I probably would add a variable, something like Disk=E:. Then I'd use this variable anytime when the drive must be used, adding to every measure / meter the DynamicVariables=1 option as well.
Then finally when a new drive is detected, I'd set the associated drive letter as the Disk variable.
This is a general method I'd try to use. I suppose it'll work, but I'm not entirely sure. Try it out and if you can't get it to properly work, pack and upload the config.
User avatar
sl23
Posts: 346
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Hiding an image when a drive is disconnected

sl23 » August 7th, 2019, 8:31 pm

balala wrote:
August 7th, 2019, 6:18 pm
Ok, good this way, too.
Did you get it working now as expected?
Yes, it seems ok, thanks :thumbup:
Live for an ideal and leave no place in the mind for anything else
- MuLab - SoundCloud -
User avatar
sl23
Posts: 346
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Hiding an image when a drive is disconnected

sl23 » August 7th, 2019, 8:43 pm

Sorry, I'm not sure what you mean about the Variable! How would I use it and where?

I could upload the skin, but it is huge! Well in terms of RM code. There's a lot going on in a small space. I don't expect you'd have trouble with it, but it would take time for you to become familiar. If you are ok with that, then sure here it is. Without the icons for Recycle Bin, SyMenu and Shutdown/Restart/etc.

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
MouseOverAction=[!ShowMeterGroup Hover] [!UpdateMeterGroup *] [!SetOption VolLabel Y "10R"] [!SetOption "Track" Y ""] [!SetOption Time FontColor "128,255,0"] [!UpdateMeter *] [!Redraw]
MouseLeaveAction=[!HideMeterGroup Hover] [!UpdateMeterGroup *] [!SetOption VolLabel Y ""] [!SetOption "Track" Y "-15R"] [!SetOption Time FontColor "175,175,175"] [!UpdateMeter *] [!Redraw]
AccurateText=1

[Metadata]
Author=sl23 (with help from JSMorley and many at the RM forum)
Description=Desktop version of the Compact SideBar

[Variables]
Player=CAD
UDX=-1
UD1=1
UD2=2
CE=\SyMenu\ProgramFiles\SPSSuite\SyMenuSuite\CubicExplorer_sps\CubicExplorer.exe
f2k=\SyMenu\ProgramFiles\SPSSuite\SyMenuSuite\foobar2000_sps\foobar2000.exe
ESy=E:\SyMenu\SyMenu.exe

========================================
; STYLES
========================================
[sAllText]
FontFace=Corbel
StringStyle=Bold
FontSize=12
FontColor=175,175,175
AntiAlias=1
InlineSetting=Size | 8
InlinePattern=%
X=15
Y=4R

[sDriveLabel]
Hidden=1
Percentual=1
;ToolTipIcon=Info
ToolTipText="Total: %2B"
;#CRLF##CRLF#L ~ Open#CRLF#M ~ Eject"

[sDriveValue]
StringAlign=Right
NumOfDecimals=1
AutoScale=1
Text="%1B"
InlineSetting=Size | 8
InlinePattern=^.* (.*)$
Hidden=1
X=150r
Y=r

[sHighlight]
MouseOverAction=[!SetOption #CURRENTSECTION# FontColor "128,255,0"] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# FontColor ""] [!UpdateMeter #CURRENTSECTION#] [!Redraw]

[sBar]
BarColor=235,170,0,255
BarOrientation=Horizontal
SolidColor=255,255,255,60
X=15
Y=R
W=150
H=1

[sRoundBar1]
LineLength=30
LineStart=24
LineColor=128,255,0,70
StartAngle=-1.570796325
RotationAngle=6.2831853
Antialias=1
Solid=1

[sRoundBar2]
LineLength=28
LineStart=26
LineColor=128,255,0

========================================
; TITLE
========================================
[mOSVersion]
Measure=Plugin
Plugin=SysInfo
SysInfoType=OS_Version
Substitute="Windows":"Win"
UpdateDivider=#UDX#

[mOSbits]
Measure=Plugin
Plugin=SysInfo
SysInfoType=OS_Bits
UpdateDivider=#UDX#

[mScreenSize]
Measure=Plugin
Plugin=SysInfo
SysInfoType=Screen_Size
SysInfoData=1
UpdateDivider=#UDX#

[bRefresh]
Meter=Image
ImageName=#@#Refresh.png
LeftMouseUpAction=[!Refresh]
RightMouseUpAction=[!ToggleConfig "RM\ScreenSaver" "ScreenSaver.ini"]
ToolTipText="L ~ Refresh#CRLF#M ~ ScreenSaver#CRLF#R ~ Toggle  SS-Bg"
UpdateDivider=#UDX#
X=153
Y=8
W=20
H=20

[bSystem]
Meter=Image
MeasureName=mCLabel
MeasureName2=mCFree
MeasureName3=mCTotal
MeasureName4=mDLabel
MeasureName5=mDFree
MeasureName6=mDTotal
MeasureName7=mOSbits
ToolTipTitle="[mOSVersion] - x%7 / [mScreenSize]"
ToolTipIcon=Info
ToolTipText="C:/%1 ~ %2B / %3B#CRLF#D:/%4 ~ %5B / %6B#CRLF#L ~ Task Manager#CRLF#M ~ Device Manager"
LeftMouseUpAction="taskmgr.exe"
MiddleMouseUpAction="devmgmt.msc"
MouseOverAction=[!SetOption bSystem SolidColor "255,255,255,70"] [!UpdateMeter *] [!Redraw]
MouseLeaveAction=[!SetOption bSystem SolidColor ""] [!UpdateMeter *] [!Redraw]
X=3r
Y=8R
W=14
H=14

========================================
; TIME
========================================
[mTime]
Measure=Time
Format=%#I:%M

[Time]
Meter=String
MeasureName=mTime
MeterStyle=sAllText
StringAlign=Center
StringStyle=Normal
FontSize=24
Text=%1
AntiAlias=1
X=90
Y=-5

[mTimeDate]
Measure=Time
Format=%a  %#d  %b

[TimeDate]
Meter=String
MeasureName=mTimeDate
MeterStyle=sAllText
StringAlign=Center
FontSize=16
Text=%1
X=r
Y=R

[mSecond]
Measure=Time
Format=%S
MinValue=0
MaxValue=60

[Second]
Meter=Bar
MeasureName=mSecond
MeterStyle=sBar
Y=3R
W=150
H=1

========================================
; INTERNET
========================================
[mConnection]
Measure=Plugin
Plugin=SysInfo
SysInfoType=INTERNET_CONNECTIVITY
IfCondition=mConnection = -1
IfTrueAction=[!SetOptionGroup "Net" Y "r"] [!HideMeterGroup "Net"] [!UpdateMeter *] [!Redraw]
IfFalseAction=[!SetOptionGroup "Net" Y ""] [!ShowMeterGroup "Net"] [!SetOption DownValue Y "r"] [!UpdateMeter *] [!Redraw]

[sNet]
NumOfDecimals=0
AutoScale=1
Group=Net
LeftMouseUpAction=[!ToggleMeterGroup "Net"] [!UpdateMeter *] [!Redraw]
Hidden=1

[mSSID]
Measure=Plugin
Plugin=WiFiStatus
WiFiInfoType=SSID
WiFiIntfID=0
Substitute="-1":"NO WIFI"
UpdateDivider=#UD2#

[SSID]
Meter=String
MeterStyle=sAllText | sHighlight | sNet
MeasureName=mSSID
FontSize=10
StringAlign=Center
Text="%1"
X=90
Y=5R

[mUp]
Measure=NetOut
NetOutSpeed=#maxUpload#
Substitute=".0":""

[UpValue]
Meter=String
MeterStyle=sAllText | sHighlight | sNet
MeasureName=mUp
Text=U %1
Y=R

[mDown]
Measure=NetIn
MaxValue=#NetworkMaxDownload#
Substitute=".0":""

[DownValue]
Meter=String
MeterStyle=sAllText | sHighlight | sNet
StringAlign=Right
MeasureName=mDown
Text=D %1
X=150r
Y=r
UseBit=1

========================================
; E:SYMENU
========================================

[SyMenu]
Meter=Image
ImageName=#@#Launchers\SyMenu.png
LeftMouseUpAction=["#ESy#"]
ToolTipText="E: SyMenu"
X=15
Y=25R
W=35
H=35

========================================
; RECYCLE BIN
========================================
[mBinCount]
Measure=Plugin
Plugin=RecycleManager
RecycleType=Count
IfCondition=mBinCount = 0
IfTrueAction=[!SetVariable ItemPostfix "s"] [!SetOption BinText Text "Empty"] [!SetOption BinImage ImageName "BinEmptyOrg.png"] [!SetOption Background ToolTipHidden "1"]
IfCondition2=mBinCount = 1
IfTrueAction2=[!SetVariable ItemPostfix ""] [!SetOption BinText Text "[mBinCount] item"] [!SetOption BinImage ImageName "BinFullOrg.png"] [!SetOption Background ToolTipHidden "0"]
IfCondition3=mBinCount > 1
IfTrueAction3=[!SetVariable ItemPostfix "s"] [!SetOption BinText Text "[mBinCount] items"] [!SetOption BinImage ImageName "BinFullOrg.png"] [!SetOption Background ToolTipHidden "0"]
IfConditionMode=1
UpdateDivider=#UD2#

[mBinSize]
Measure=Plugin
Plugin=RecycleManager
RecycleType=Size
IfCondition=mBinSize < 1024
IfTrueAction=[!SetOption mScaledSize Formula "[mBinSize]"] [!SetVariable ScaleFactor "B"]
IfCondition2=(mBinSize >= 1024) && (mBinSize < 1024**2)
IfTrueAction2=[!SetOption mScaledSize Formula "Round([mBinSize]/1024,1)"] [!SetVariable ScaleFactor "kB"]
IfCondition3=(mBinSize >= 1024**2) && (mBinSize < 1024**3)
IfTrueAction3=[!SetOption mScaledSize Formula "Round([mBinSize]/(1024**2),1)"] [!SetVariable ScaleFactor "MB"]
IfCondition4=(mBinSize >= 1024**3) && (mBinSize < 1024**4)
IfTrueAction4=[!SetOption mScaledSize Formula "Round([mBinSize]/(1024**3),1)"] [!SetVariable ScaleFactor "GB"]
IfCondition5=mBinSize >= 1024**4
IfTrueAction5=[!SetOption mScaledSize Formula "Round([mBinSize]/(1024**4),1)"] [!SetVariable ScaleFactor "TB"]
IfConditionMode=1
UpdateDivider=#UD2#

[mScaledSize]
Measure=Calc
Formula=0
UpdateDivider=#UD2#

[BinImage]
Meter=Image
ImagePath=#@#Launchers\
ImageName=BinEmptyOrg.png
LeftMouseUpAction=[!CommandMeasure mBinCount "OpenBin"]
RightMouseUpAction=[!CommandMeasure mBinCount "EmptyBin"]
ToolTipIcon=Info
ToolTipTitle=Recycle Bin
ToolTipText=[mBinCount] item#ItemPostfix##CRLF#[mScaledSize] #ScaleFactor##CRLF##CRLF#L ~ Open#CRLF#R ~ Empty
X=70
Y=-12r
W=45
H=45

;-------------------------------------------------------------- FOOTER
[Footer1]
Meter=Image
UpdateDivider=#UDX#
SolidColor=255,255,255,1
Y=10R
W=178
H=1

========================================
; DISK - C:/
========================================
[mCLabel]
Measure=FreeDiskSpace
Drive=C:
UpdateDivider=#UDX#
Label=1

[mCFree]
Measure=FreeDiskSpace
Drive=C:
UpdateDivider=#UD2#

[mCTotal]
Measure=FreeDiskSpace
Drive=C:
Total=1
UpdateDivider=#UDX#

========================================
; DISK - D:/
========================================
[sD]
Group=Disk-D

[mDLabel]
Measure=FreeDiskSpace
Drive=D:
UpdateDivider=#UDX#
Label=1

[mDFree]
Measure=FreeDiskSpace
Drive=D:
UpdateDivider=#UD2#
Substitute=".0":""

[mDTotal]
Measure=FreeDiskSpace
Drive=D:
Total=1
UpdateDivider=#UDX#
Substitute=".0":""
IfCondition=mDTotal = 0
IfTrueAction=[!SetOptionGroup "Disk-D" Y "0R"] [!HideMeterGroup "Disk-D"] [!UpdateMeter *] [!Redraw]
IfFalseAction=[!SetOptionGroup "Disk-D" Y ""] [!ShowMeterGroup "Disk-D"] [!UpdateMeter *] [!Redraw]
DynamicVariables=1

[DLabel]
Meter=String
MeterStyle=sAllText | sDriveLabel | sHighlight | sD
MeasureName=mDUsed
MeasureName2=mDTotal
Text="D:/ %1 %"
LeftMouseUpAction=["#CE#" "D:\"]
;MiddleMouseUpAction=["#@#\Addons\USBDiskEjector\USB_Disk_Eject.exe """/SHOWEJECT /REMOVELETTER E""""]
ToolTipTitle="D:/ [mDLabel]"

[DFree]
Meter=String
MeterStyle=sAllText | sDriveValue | sD
MeasureName=mDFree

[mDUsed]
Measure=FreeDiskSpace
Drive=D:
IgnoreRemovable=0
UpdateDivider=#UD2#
InvertMeasure=1

[DBar]
Meter=Bar
MeterStyle=sBar | sD
MeasureName=mDUsed

========================================
; DISK - E:/
========================================
[sE]
Group=Disk-E

[mELabel]
Measure=FreeDiskSpace
Drive=E:
IgnoreRemovable=0
UpdateDivider=#UD2#
Label=1

[mEFree]
Measure=FreeDiskSpace
Drive=E:
IgnoreRemovable=0
UpdateDivider=#UD2#
Substitute=".0":""

[mETotal]
Measure=FreeDiskSpace
Drive=E:
Total=1
IgnoreRemovable=0
UpdateDivider=#UD2#
Substitute=".0":""
IfCondition=mETotal = 0
IfTrueAction=[!SetOptionGroup "Disk-E" Y "0R"] [!HideMeter "SyMenu"] [!HideMeterGroup "Disk-E"] [!UpdateMeter *] [!Redraw]
IfFalseAction=[!SetOptionGroup "Disk-E" Y ""] [!ShowMeter "SyMenu"] [!ShowMeterGroup "Disk-E"] [!UpdateMeter *] [!Redraw]
DynamicVariables=1

[ELabel]
Meter=String
MeterStyle=sAllText | sDriveLabel | sHighlight | sE
MeasureName=mEUsed
MeasureName2=mETotal
Text="E:/ %1 %"
LeftMouseUpAction=["#CE#" "E:\"]
MiddleMouseUpAction=["#@#\Addons\USBDiskEjector\USB_Disk_Eject.exe """/SHOWEJECT /REMOVELETTER E""""]
ToolTipTitle="E:/ [mELabel]"

[EFree]
Meter=String
MeterStyle=sAllText | sDriveValue | sE
MeasureName=mEFree

[mEUsed]
Measure=FreeDiskSpace
Drive=E:
IgnoreRemovable=0
UpdateDivider=#UD2#
InvertMeasure=1

[EBar]
Meter=Bar
MeterStyle=sBar | sE
MeasureName=mEUsed

========================================
; DISK - F:/
========================================
[sF]
Group=Disk-F

[mFLabel]
Measure=FreeDiskSpace
Drive=F:
IgnoreRemovable=0
UpdateDivider=#UD2#
Label=1

[mFFree]
Measure=FreeDiskSpace
Drive=F:
IgnoreRemovable=0
UpdateDivider=#UD2#
Substitute=".0":""

[mFTotal]
Measure=FreeDiskSpace
Drive=F:
Total=1
IgnoreRemovable=0
UpdateDivider=#UD2#
Substitute=".0":""
IfCondition=mFTotal = 0
IfTrueAction=[!SetOptionGroup "Disk-F" Y "0R"] [!HideMeterGroup "Disk-F"] [!UpdateMeter *] [!Redraw]
IfFalseAction=[!SetOptionGroup "Disk-F" Y ""] [!ShowMeterGroup "Disk-F"] [!UpdateMeter *] [!Redraw]
DynamicVariables=1

[FLabel]
Meter=String
MeterStyle=sAllText | sDriveLabel | sHighlight | sF
MeasureName=mFUsed
MeasureName2=mFTotal
Text="F:/ %1 %"
LeftMouseUpAction=["#CE#" "F:\"]
MiddleMouseUpAction=["#@#\Addons\USBDiskEjector\USB_Disk_Eject.exe """/SHOWEJECT /REMOVELETTER F""""]
ToolTipTitle="F:/ [mFLabel]"

[FFree]
Meter=String
MeterStyle=sAllText | sDriveValue | sF
MeasureName=mFFree

[mFUsed]
Measure=FreeDiskSpace
Drive=F:
IgnoreRemovable=0
UpdateDivider=#UD2#
InvertMeasure=1

[FBar]
Meter=Bar
MeterStyle=sBar | sF
MeasureName=mFUsed

========================================
; DISK - G:/
========================================
[sG]
Group=Disk-G

[mGLabel]
Measure=FreeDiskSpace
Drive=G:
IgnoreRemovable=0
UpdateDivider=#UD2#
Label=1

[mGFree]
Measure=FreeDiskSpace
Drive=G:
IgnoreRemovable=0
UpdateDivider=#UD2#
Substitute=".0":""

[mGTotal]
Measure=FreeDiskSpace
Drive=G:
Total=1
IgnoreRemovable=0
UpdateDivider=#UD2#
Substitute=".0":""
IfCondition=mGTotal = 0
IfTrueAction=[!SetOptionGroup "Disk-G" Y "0R"] [!HideMeterGroup "Disk-G"] [!UpdateMeter *] [!Redraw]
IfFalseAction=[!SetOptionGroup "Disk-G" Y ""] [!ShowMeterGroup "Disk-G"] [!UpdateMeter *] [!Redraw]
DynamicVariables=1

[GLabel]
Meter=String
MeterStyle=sAllText | sDriveLabel | sHighlight | sG
MeasureName=mGUsed
MeasureName2=mGTotal
Text="G:/ %1 %"
LeftMouseUpAction=["#CE#" "G:\"]
MiddleMouseUpAction=["#@#\Addons\USBDiskEjector\USB_Disk_Eject.exe """/SHOWEJECT /REMOVELETTER G""""]
ToolTipTitle="G:/ [mGLabel]"

[GFree]
Meter=String
MeterStyle=sAllText | sDriveValue | sG
MeasureName=mGFree

[mGUsed]
Measure=FreeDiskSpace
Drive=G:
IgnoreRemovable=0
UpdateDivider=#UD2#
InvertMeasure=1

[GBar]
Meter=Bar
MeterStyle=sBar | sG
MeasureName=mGUsed

========================================
; DISK - H:/
========================================
[sH]
Group=Disk-H

[mHLabel]
Measure=FreeDiskSpace
Drive=H:
IgnoreRemovable=0
UpdateDivider=#UD2#
Label=1

[mHFree]
Measure=FreeDiskSpace
Drive=H:
IgnoreRemovable=0
UpdateDivider=#UD2#
Substitute=".0":""

[mHTotal]
Measure=FreeDiskSpace
Drive=H:
Total=1
IgnoreRemovable=0
UpdateDivider=#UD2#
Substitute=".0":""
IfCondition=mHTotal = 0
IfTrueAction=[!SetOptionGroup "Disk-H" Y "0R"] [!HideMeterGroup "Disk-H"] [!UpdateMeter *] [!Redraw]
IfFalseAction=[!SetOptionGroup "Disk-H" Y ""] [!ShowMeterGroup "Disk-H"] [!UpdateMeter *] [!Redraw]
DynamicVariables=1

[HLabel]
Meter=String
MeterStyle=sAllText | sDriveLabel | sHighlight | sH
MeasureName=mHUsed
MeasureName2=mHTotal
Text="H:/ %1 %"
LeftMouseUpAction=["#CE#" "H:\"]
MiddleMouseUpAction=["#@#\Addons\USBDiskEjector\USB_Disk_Eject.exe """/SHOWEJECT /REMOVELETTER H""""]
ToolTipTitle="H:/ [mHLabel]"

[HFree]
Meter=String
MeterStyle=sAllText | sDriveValue | sH
MeasureName=mHFree

[mHUsed]
Measure=FreeDiskSpace
Drive=H:
IgnoreRemovable=0
UpdateDivider=#UD2#
InvertMeasure=1

[HBar]
Meter=Bar
MeterStyle=sBar | sH
MeasureName=mHUsed

========================================
; DISK - I:/
========================================
[sI]
Group=Disk-I

[mILabel]
Measure=FreeDiskSpace
Drive=I:
IgnoreRemovable=0
UpdateDivider=#UD2#
Label=1

[mIFree]
Measure=FreeDiskSpace
Drive=I:
IgnoreRemovable=0
UpdateDivider=#UD2#
Substitute=".0":""

[mITotal]
Measure=FreeDiskSpace
Drive=I:
Total=1
IgnoreRemovable=0
UpdateDivider=#UD2#
Substitute=".0":""
IfCondition=mITotal = 0
IfTrueAction=[!SetOptionGroup "Disk-I" Y "0R"] [!HideMeterGroup "Disk-I"] [!UpdateMeter *] [!Redraw]
IfFalseAction=[!SetOptionGroup "Disk-I" Y ""] [!ShowMeterGroup "Disk-I"] [!UpdateMeter *] [!Redraw]
DynamicVariables=1

[ILabel]
Meter=String
MeterStyle=sAllText | sDriveLabel | sHighlight | sI
MeasureName=mIUsed
MeasureName2=mITotal
Text="I:/ %1 %"
LeftMouseUpAction=["#CE#" "I:\"]
MiddleMouseUpAction=["#@#\Addons\USBDiskEjector\USB_Disk_Eject.exe """/SHOWEJECT /REMOVELETTER I""""]
ToolTipTitle="I:/ [mILabel]"

[IFree]
Meter=String
MeterStyle=sAllText | sDriveValue | sI
MeasureName=mIFree

[mIUsed]
Measure=FreeDiskSpace
Drive=I:
IgnoreRemovable=0
UpdateDivider=#UD2#
InvertMeasure=1

[IBar]
Meter=Bar
MeterStyle=sBar | sI
MeasureName=mIUsed

========================================
; DISK - J:/
========================================
[sJ]
Group=Disk-J

[mJLabel]
Measure=FreeDiskSpace
Drive=J:
IgnoreRemovable=0
UpdateDivider=#UD2#
Label=1

[mJFree]
Measure=FreeDiskSpace
Drive=J:
IgnoreRemovable=0
UpdateDivider=#UD2#
Substitute=".0":""

[mJTotal]
Measure=FreeDiskSpace
Drive=J:
Total=1
IgnoreRemovable=0
UpdateDivider=#UD2#
Substitute=".0":""
IfCondition=mJTotal = 0
IfTrueAction=[!SetOptionGroup "Disk-J" Y "0R"] [!HideMeterGroup "Disk-J"] [!UpdateMeter *] [!Redraw]
IfFalseAction=[!SetOptionGroup "Disk-J" Y ""] [!ShowMeterGroup "Disk-J"] [!UpdateMeter *] [!Redraw]
DynamicVariables=1

[JLabel]
Meter=String
MeterStyle=sAllText | sDriveLabel | sHighlight | sJ
MeasureName=mJUsed
MeasureName2=mJTotal
Text="J:/ %1 %"
LeftMouseUpAction=["#CE#" "J:\"]
MiddleMouseUpAction=["#@#\Addons\USBDiskEjector\USB_Disk_Eject.exe """/SHOWEJECT /REMOVELETTER J""""]
ToolTipTitle="J:/ [mJLabel]"

[JFree]
Meter=String
MeterStyle=sAllText | sDriveValue | sJ
MeasureName=mJFree

[mJUsed]
Measure=FreeDiskSpace
Drive=J:
IgnoreRemovable=0
UpdateDivider=#UD2#
InvertMeasure=1

[JBar]
Meter=Bar
MeterStyle=sBar | sJ
MeasureName=mJUsed

========================================
; DISK - K:/
========================================
[sK]
Group=Disk-K

[mKLabel]
Measure=FreeDiskSpace
Drive=K:
IgnoreRemovable=0
UpdateDivider=#UD2#
Label=1

[mKFree]
Measure=FreeDiskSpace
Drive=K:
IgnoreRemovable=0
UpdateDivider=#UD2#
Substitute=".0":""

[mKTotal]
Measure=FreeDiskSpace
Drive=K:
Total=1
IgnoreRemovable=0
UpdateDivider=#UD2#
Substitute=".0":""
IfCondition=mKTotal = 0
IfTrueAction=[!SetOptionGroup "Disk-K" Y "0R"] [!HideMeterGroup "Disk-K"] [!UpdateMeter *] [!Redraw]
IfFalseAction=[!SetOptionGroup "Disk-K" Y ""] [!ShowMeterGroup "Disk-K"] [!UpdateMeter *] [!Redraw]
DynamicVariables=1

[KLabel]
Meter=String
MeterStyle=sAllText | sDriveLabel | sHighlight | sK
MeasureName=mKUsed
MeasureName2=mKTotal
Text="K:/ %1 %"
LeftMouseUpAction=["#CE#" "K:\"]
MiddleMouseUpAction=["#@#\Addons\USBDiskEjector\USB_Disk_Eject.exe """/SHOWEJECT /REMOVELETTER K""""]
ToolTipTitle="K:/ [mKLabel]"

[KFree]
Meter=String
MeterStyle=sAllText | sDriveValue | sK
MeasureName=mKFree

[mKUsed]
Measure=FreeDiskSpace
Drive=K:
IgnoreRemovable=0
UpdateDivider=#UD2#
InvertMeasure=1

[KBar]
Meter=Bar
MeterStyle=sBar | sK
MeasureName=mKUsed

========================================
; DISK - Z:/
========================================
[sZ]
Group=Disk-Z

[mZLabel]
Measure=FreeDiskSpace
Drive=Z:
IgnoreRemovable=0
UpdateDivider=#UD2#
Label=1

[mZFree]
Measure=FreeDiskSpace
Drive=Z:
IgnoreRemovable=0
UpdateDivider=#UD2#
Substitute=".0":""

[mZTotal]
Measure=FreeDiskSpace
Drive=Z:
Total=1
IgnoreRemovable=0
UpdateDivider=#UD2#
Substitute=".0":""
IfCondition=mZTotal = 0
IfTrueAction=[!SetOptionGroup "Disk-Z" Y "0R"] [!HideMeterGroup "Disk-Z"] [!UpdateMeter *] [!Redraw]
IfFalseAction=[!SetOptionGroup "Disk-Z" Y ""] [!ShowMeterGroup "Disk-Z"] [!UpdateMeter *] [!Redraw]
DynamicVariables=1

[ZLabel]
Meter=String
MeterStyle=sAllText | sDriveLabel | sHighlight | sZ
MeasureName=mZUsed
MeasureName2=mZTotal
Text="Z:/ %1 %"
LeftMouseUpAction=["#CE#" "Z:\"]
MiddleMouseUpAction=["#@#\Addons\USBDiskEjector\USB_Disk_Eject.exe """/SHOWEJECT /REMOVELETTER Z""""]
ToolTipTitle="Z:/ [mZLabel]"

[ZFree]
Meter=String
MeterStyle=sAllText | sDriveValue | sZ
MeasureName=mZFree

[mZUsed]
Measure=FreeDiskSpace
Drive=Z:
IgnoreRemovable=0
UpdateDivider=#UD2#
InvertMeasure=1

[ZBar]
Meter=Bar
MeterStyle=sBar | sZ
MeasureName=mZUsed

========================================
; SHUTDOWN
========================================
[sShut]
Hidden=1
Group=Hover
UpdateDivider=-1
X=39r
Y=0r
W=22
H=22

[Shutdown]
Meter=Image
MeterStyle=sShut
ImageName=#@#Launchers\Shutdown.png
LeftMouseUpAction=shutdown.exe -s -t 00 -f
ToolTipText="Shutdown"
X=5r
Y=10R

[Restart]
Meter=Image
MeterStyle=sShut
ImageName=#@#Launchers\Restart.png
LeftMouseUpAction=shutdown.exe -r -t 0
ToolTipText="Restart"

[Sleep]
Meter=Image
MeterStyle=sShut
ImageName=#@#Launchers\Sleep.png
LeftMouseUpAction=rundll32.exe powrprof.dll,SetSuspendState
ToolTipText="Sleep"

[Lock]
Meter=Image
MeterStyle=sShut
ImageName=#@#Launchers\Lock.png
LeftMouseUpAction=rundll32.exe user32.dll, LockWorkStation
ToolTipText="Lock"

========================================
; VOLUME
========================================
[sVol]
Group=Hover
Hidden=1

[mWin7Vol]
Measure=Plugin
Plugin=Win7AudioPlugin

[mVolume]
Measure=Calc
Formula=mWin7Vol
Substitute="^(.*)$":"\1 %","-1":"Muted","Muted %":"Muted"
RegExpSubstitute=1

[VolLabel]
Meter=String
MeterStyle=sAllText | sHighlight | sVol
Text=Vol
LeftMouseUpAction=[!CommandMeasure "mWin7Vol" "SetVolume 20"] [!UpdateMeasure mWin7Vol] [!UpdateMeter VolBar2] [!UpdateMeasure mVolume] [!UpdateMeter *] [!Redraw]
Y=5R

[VolLevel]
Meter=String
MeterStyle=sAllText | sHighlight | sVol
StringAlign=Right
Text=[mWin7Vol:]
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "mWin7Vol" "SetVolume 100"] [!UpdateMeasure mWin7Vol] [!UpdateMeter VolBar2] [!UpdateMeasure mVolume] [!UpdateMeter *] [!Redraw]
X=150r
Y=r

[VolBar]
Meter=Bar
MeasureName=mWin7Vol
MeterStyle=sBar | sVol
BarColor=235,170,0,100
SolidColor=50,50,50,100
LeftMouseUpAction=[!SetOption mVolume Formula "($MouseX:%$)"] [!UpdateMeasure mVolume] [!CommandMeasure "mWin7Vol" "SetVolume [mVolume]"] [!UpdateMeasure mWin7Vol] [!UpdateMeter *] [!Redraw]
MouseScrollUpAction=[!CommandMeasure "mWin7Vol" "ChangeVolume 2"] [!UpdateMeasure mWin7Vol] [!UpdateMeter VolBar] [!UpdateMeasure mVolume] [!UpdateMeter *] [!Redraw]
MouseScrollDownAction=[!CommandMeasure "mWin7Vol" "ChangeVolume -2"] [!UpdateMeasure mWin7Vol] [!UpdateMeter VolBar] [!UpdateMeasure mVolume] [!UpdateMeter *] [!Redraw]
MiddleMouseDownAction=[!CommandMeasure "mWin7Vol" "ToggleMute"] [!UpdateMeasure mWin7Vol] [!UpdateMeter VolBar] [!UpdateMeasure mVolume] [!UpdateMeter *] [!Redraw]
MouseOverAction=[!SetOption #CURRENTSECTION# BarColor "235,170,0,255"] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# BarColor "235,170,0,100"] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
DynamicVariables=1
H=4

[VolBar2]
Meter=Bar
MeasureName=mWin7Vol
MeterStyle=sBar | sVol
X=r
Y=1r
H=2

;-------------------------------------------------------------- FOOTER
[Footer2]
Meter=Image
UpdateDivider=#UDX#
SolidColor=255,255,255,1
Y=10R
W=178
H=1
:rofl: :rofl: :rofl:
I warned you!
It's quite basic aesthetically, but functional, for me at least. :D
Last edited by balala on August 8th, 2019, 7:58 am, edited 1 time in total.
Reason: Please use <Code> tags not <Spoiler>, whenever are you posting code snippets.
Live for an ideal and leave no place in the mind for anything else
- MuLab - SoundCloud -
User avatar
sl23
Posts: 346
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Hiding an image when a drive is disconnected

sl23 » August 8th, 2019, 8:19 am

Apologies. I used spoiler to reduce the size of the post. It probably would've taken a whole page :oops:
Live for an ideal and leave no place in the mind for anything else
- MuLab - SoundCloud -
User avatar
balala
Rainmeter Sage
Posts: 8534
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hiding an image when a drive is disconnected

balala » August 8th, 2019, 8:38 am

sl23 wrote:
August 8th, 2019, 8:19 am
Apologies. I used spoiler to reduce the size of the post. It probably would've taken a whole page :oops:
Ok, doesn't matter but especially on longer codes it is much easier if has been using the <Code> tags.
Will try to post a small modification of your last code, to see what I had been talking about.
User avatar
balala
Rainmeter Sage
Posts: 8534
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hiding an image when a drive is disconnected

balala » August 8th, 2019, 7:15 pm

sl23 wrote:
August 7th, 2019, 4:46 pm
it's possible to have this shortcut work even if the drive letter changes?
Thinking a little bit deeper, I don't think a such task would be needed. Finally there are measures / meters for each drive letter from C: to K:. So if the drive letter changes, new, previously not used measures and meters are gonna be used.
User avatar
sl23
Posts: 346
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Hiding an image when a drive is disconnected

sl23 » August 8th, 2019, 7:34 pm

Er, sorry but you've completely lost me with that last comment! :oops:

By "such a task" I assume you mean about your previous comment on Variables that I queried?

As for the last two sentences, I don't get what you're trying to say.
Live for an ideal and leave no place in the mind for anything else
- MuLab - SoundCloud -
User avatar
balala
Rainmeter Sage
Posts: 8534
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hiding an image when a drive is disconnected

balala » August 8th, 2019, 7:45 pm

sl23 wrote:
August 8th, 2019, 7:34 pm
Er, sorry but you've completely lost me with that last comment! :oops:

By "such a task" I assume you mean about your previous comment on Variables that I queried?

As for the last two sentences, I don't get what you're trying to say.
You asked this:
sl23 wrote:
August 7th, 2019, 4:46 pm
I don't suppose as an extension of this, that it's possible to have this shortcut work even if the drive letter changes?
Sort of like the autorun.inf can show an icon for a drive.
But instead this one would be clickable on a skin and open SyMenu.
I supposed you're talking about the left click over the shown drive letters, which runs the \SyMenu\ProgramFiles\SPSSuite\SyMenuSuite\CubicExplorer_sps\CubicExplorer.exe program (set up through the CE variable).
And I said that if the drive letter changes, the meters belonging to the old letter are hidden and those belonging to the new one are shown. But in a such case the action related to the left click also changes to the new drive, so it'll work.
Have I misunderstood your want to achieve?
User avatar
sl23
Posts: 346
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Hiding an image when a drive is disconnected

sl23 » August 8th, 2019, 8:01 pm

It took me awhile but I think I understand and yes that's right.
So the LeftMouseUpAction needs to change to relate to the connected drive SyMenu is on.

I just had a thought, could those Variables used for the Launcher be used or adapted? I'm going to have a think about that and maybe I can adapt the current code to make it easier to edit and using this method. Dunno, will think, tired, hungry, need food! So later...
:thumbup:
Live for an ideal and leave no place in the mind for anything else
- MuLab - SoundCloud -
User avatar
balala
Rainmeter Sage
Posts: 8534
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hiding an image when a drive is disconnected

balala » August 8th, 2019, 8:17 pm

sl23 wrote:
August 8th, 2019, 8:01 pm
It took me awhile but I think I understand and yes that's right.
So the LeftMouseUpAction needs to change to relate to the connected drive SyMenu is on.
I still believe that since on different meters where the program is used ([DLabel] - [KLabel], respectively [ZLabel]) the LeftMouseUpActions are different, on each meter related to the appropriate drive, there is nothing to change. The appropriate meter(s) is/are shown, each of them with the appropriate LeftMouseUpAction, related to the appropriate drive letter.
sl23 wrote:
August 8th, 2019, 8:01 pm
Dunno, will think, tired, hungry, need food! So later...
:thumbup: