It is currently March 28th, 2024, 3:57 pm

how to make my script hide/show when there is or isnot pendrive or other drive

Discuss the use of Lua in Script measures.
Post Reply
kkmks

how to make my script hide/show when there is or isnot pendrive or other drive

Post by kkmks »

How to make my code shows or hides skin dependence on htere is or is not plugged disc hdd or pendrive.

Second things is , when i put pen with a long name my skin change it name but sometimes i need to refresh skin by ppm to reveal long names


My code:

Code: Select all

[Variables]
fontcolor=255, 255, 255, 255
FontFace=Tahoma
FontFace2=Calibri
FontHeight=10
AntiAlias=1
drive="D:"


;############## CODE ##############################################

[DriveFree]
Measure=FreeDiskSpace
Drive=#drive#
IgnoreRemovable=0

[DriveLabel]
Drive=#drive#
Measure=FreeDiskSpace
Label=1
IgnoreRemovable=0

[HDDimage]
Meter=IMAGE
X=0
Y=0
ImageName=hdd.png
LeftMouseUpAction=!Execute ["#drive#\"]

[label]
MeasureName=DriveLabel
Meter=string
X=56r
Y=10r
FontColor=#FontColor#
FontSize=#FontHeight#
StringAlign=LEFT
FontFace=#FontFace#
Text="%1 (#drive#)"
StringStyle=BOLD
AntiAlias=1
AutoScale=1


[leftText]
MeasureName=DriveFree
Meter=STRING
X=0r
Y=15r
FontColor=#FontColor#
FontSize=#FontHeight#
StringAlign=LEFT
FontFace=#FontFace2#
Text="Free:  %1B"
Percentual=0
AntiAlias=1
AutoScale=1

Post Reply