It is currently May 7th, 2021, 1:00 pm

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

General topics related to Rainmeter.
User avatar
balala
Rainmeter Sage
Posts: 12636
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

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

Post by balala »

And here is the code I've promised. Create an ini file into the HDDstatus config (near the @Resources folder), paste the posted code and remove the HDD-c - Hdd-l folders. Don't forget to refresh all. Then load the new ini file.
The skin will also show the optical drives (CD, DVD). How it works?
The [DriveLabelX] (where X is between 1 and 10) will determine the label of the drives. If that's not empty, it'll set the appropriate LabelX variable to 1, otherwise to 0. This variable will be used on the [MeasureDriveX] measures.
[DriveTypeX] returns the type of the drive. Finally the [MeasureDriveX] will return a number, according to the drive type and the label. I had to take into account the label, because the FreeDiskSpace measures return 0 as the total space of a CD (or DVD). So in case of such drives, I had to check another way if the disk is present. I supposed that a not empty CD, has a label. If the disk is not empty, but its label is, the skin will fail. But I think that's not a too common situation. According to the value returned by the [MeasureDriveX], the appropriate meter group will be shown or hidden.
What you think?

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[Variables]
fontcolor=255, 255, 255, 255
FontFace=Tahoma
FontFace2=Calibri
FontHeight=10
AntiAlias=1
Drive1=C:
Drive2=D:
Drive3=E:
Drive4=F:
Drive5=G:
Drive6=H:
Drive7=I:
Drive8=J:
Drive9=K:
Drive10=L:

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

[DriveFree1]
Measure=FreeDiskSpace
Drive=#Drive1#
IgnoreRemovable=0

[DriveLabel1]
Drive=#Drive1#
Measure=FreeDiskSpace
Label=1
IgnoreRemovable=0
IfMatch=^$
IfMatchAction=[!SetVariable Label1 "0"]
IfNotMatchAction=[!SetVariable Label1 "1"]

[DriveTotal1]
Measure=FreeDiskSpace
Drive=#Drive1#
Total=1
IgnoreRemovable=0

[DriveType1]
Measure=FreeDiskSpace
Drive=#Drive1#
IgnoreRemovable=0
Type=1

[MeasureDrive1]
Measure=Calc
Formula=((( DriveType1 = 3 ) || ( DriveType1 = 4 )) ? ( DriveTotal1 > 0 ) : (( DriveType1 = 6 ) ? #Label1# : 0 ))
IfCondition=(MeasureDrive1=1)
IfTrueAction=[!ShowMeterGroup "Drive1"]
IfFalseAction=[!HideMeterGroup "Drive1"]
DynamicVariables=1

[DriveFree2]
Measure=FreeDiskSpace
Drive=#Drive2#
IgnoreRemovable=0

[DriveLabel2]
Drive=#Drive2#
Measure=FreeDiskSpace
Label=1
IgnoreRemovable=0
IfMatch=^$
IfMatchAction=[!SetVariable Label2 "0"]
IfNotMatchAction=[!SetVariable Label2 "1"]

[DriveTotal2]
Measure=FreeDiskSpace
Drive=#Drive2#
Total=1
IgnoreRemovable=0

[DriveType2]
Measure=FreeDiskSpace
Drive=#Drive2#
IgnoreRemovable=0
Type=1

[MeasureDrive2]
Measure=Calc
Formula=((( DriveType2 = 3 ) || ( DriveType2 = 4 )) ? ( DriveTotal2 > 0 ) : (( DriveType2 = 6 ) ? #Label2# : 0 ))
IfCondition=(MeasureDrive2=1)
IfTrueAction=[!ShowMeterGroup "Drive2"]
IfFalseAction=[!HideMeterGroup "Drive2"]
DynamicVariables=1

[DriveFree3]
Measure=FreeDiskSpace
Drive=#Drive3#
IgnoreRemovable=0

[DriveLabel3]
Drive=#Drive3#
Measure=FreeDiskSpace
Label=1
IgnoreRemovable=0
IfMatch=^$
IfMatchAction=[!SetVariable Label3 "0"]
IfNotMatchAction=[!SetVariable Label3 "1"]

[DriveTotal3]
Measure=FreeDiskSpace
Drive=#Drive3#
Total=1
IgnoreRemovable=0

[DriveType3]
Measure=FreeDiskSpace
Drive=#Drive3#
IgnoreRemovable=0
Type=1

[MeasureDrive3]
Measure=Calc
Formula=((( DriveType3 = 3 ) || ( DriveType3 = 4 )) ? ( DriveTotal3 > 0 ) : (( DriveType3 = 6 ) ? #Label3# : 0 ))
IfCondition=(MeasureDrive3=1)
IfTrueAction=[!ShowMeterGroup "Drive3"]
IfFalseAction=[!HideMeterGroup "Drive3"]
DynamicVariables=1

[DriveFree4]
Measure=FreeDiskSpace
Drive=#Drive4#
IgnoreRemovable=0

[DriveLabel4]
Drive=#Drive4#
Measure=FreeDiskSpace
Label=1
IgnoreRemovable=0
IfMatch=^$
IfMatchAction=[!SetVariable Label4 "0"]
IfNotMatchAction=[!SetVariable Label4 "1"]

[DriveTotal4]
Measure=FreeDiskSpace
Drive=#Drive4#
Total=1
IgnoreRemovable=0

[DriveType4]
Measure=FreeDiskSpace
Drive=#Drive4#
IgnoreRemovable=0
Type=1

[MeasureDrive4]
Measure=Calc
Formula=((( DriveType4 = 3 ) || ( DriveType4 = 4 )) ? ( DriveTotal4 > 0 ) : (( DriveType4 = 6 ) ? #Label4# : 0 ))
IfCondition=(MeasureDrive4=1)
IfTrueAction=[!ShowMeterGroup "Drive4"]
IfFalseAction=[!HideMeterGroup "Drive4"]
DynamicVariables=1

[DriveFree5]
Measure=FreeDiskSpace
Drive=#Drive5#
IgnoreRemovable=0

[DriveLabel5]
Drive=#Drive5#
Measure=FreeDiskSpace
Label=1
IgnoreRemovable=0
IfMatch=^$
IfMatchAction=[!SetVariable Label5 "0"]
IfNotMatchAction=[!SetVariable Label5 "1"]

[DriveTotal5]
Measure=FreeDiskSpace
Drive=#Drive5#
Total=1
IgnoreRemovable=0

[DriveType5]
Measure=FreeDiskSpace
Drive=#Drive5#
IgnoreRemovable=0
Type=1

[MeasureDrive5]
Measure=Calc
Formula=((( DriveType5 = 3 ) || ( DriveType5 = 4 )) ? ( DriveTotal5 > 0 ) : (( DriveType5 = 6 ) ? #Label5# : 0 ))
IfCondition=(MeasureDrive5=1)
IfTrueAction=[!ShowMeterGroup "Drive5"]
IfFalseAction=[!HideMeterGroup "Drive5"]
DynamicVariables=1

[DriveFree6]
Measure=FreeDiskSpace
Drive=#Drive6#
IgnoreRemovable=0

[DriveLabel6]
Drive=#Drive6#
Measure=FreeDiskSpace
Label=1
IgnoreRemovable=0
IfMatch=^$
IfMatchAction=[!SetVariable Label6 "0"]
IfNotMatchAction=[!SetVariable Label6 "1"]

[DriveTotal6]
Measure=FreeDiskSpace
Drive=#Drive6#
Total=1
IgnoreRemovable=0

[DriveType6]
Measure=FreeDiskSpace
Drive=#Drive6#
IgnoreRemovable=0
Type=1

[MeasureDrive6]
Measure=Calc
Formula=((( DriveType6 = 3 ) || ( DriveType6 = 4 )) ? ( DriveTotal6 > 0 ) : (( DriveType6 = 6 ) ? #Label6# : 0 ))
IfCondition=(MeasureDrive6=1)
IfTrueAction=[!ShowMeterGroup "Drive6"]
IfFalseAction=[!HideMeterGroup "Drive6"]
DynamicVariables=1

[DriveFree7]
Measure=FreeDiskSpace
Drive=#Drive7#
IgnoreRemovable=0

[DriveLabel7]
Drive=#Drive7#
Measure=FreeDiskSpace
Label=1
IgnoreRemovable=0
IfMatch=^$
IfMatchAction=[!SetVariable Label7 "0"]
IfNotMatchAction=[!SetVariable Label7 "1"]

[DriveTotal7]
Measure=FreeDiskSpace
Drive=#Drive7#
Total=1
IgnoreRemovable=0

[DriveType7]
Measure=FreeDiskSpace
Drive=#Drive7#
IgnoreRemovable=0
Type=1

[MeasureDrive7]
Measure=Calc
Formula=((( DriveType7 = 3 ) || ( DriveType7 = 4 )) ? ( DriveTotal7 > 0 ) : (( DriveType7 = 6 ) ? #Label7# : 0 ))
IfCondition=(MeasureDrive7=1)
IfTrueAction=[!ShowMeterGroup "Drive7"]
IfFalseAction=[!HideMeterGroup "Drive7"]
DynamicVariables=1

[DriveFree8]
Measure=FreeDiskSpace
Drive=#Drive8#
IgnoreRemovable=0

[DriveLabel8]
Drive=#Drive8#
Measure=FreeDiskSpace
Label=1
IgnoreRemovable=0
IfMatch=^$
IfMatchAction=[!SetVariable Label8 "0"]
IfNotMatchAction=[!SetVariable Label8 "1"]

[DriveTotal8]
Measure=FreeDiskSpace
Drive=#Drive8#
Total=1
IgnoreRemovable=0

[DriveType8]
Measure=FreeDiskSpace
Drive=#Drive8#
IgnoreRemovable=0
Type=1

[MeasureDrive8]
Measure=Calc
Formula=((( DriveType8 = 3 ) || ( DriveType8 = 4 )) ? ( DriveTotal8 > 0 ) : (( DriveType8 = 6 ) ? #Label8# : 0 ))
IfCondition=(MeasureDrive8=1)
IfTrueAction=[!ShowMeterGroup "Drive8"]
IfFalseAction=[!HideMeterGroup "Drive8"]
DynamicVariables=1

[DriveFree9]
Measure=FreeDiskSpace
Drive=#Drive9#
IgnoreRemovable=0

[DriveLabel9]
Drive=#Drive9#
Measure=FreeDiskSpace
Label=1
IgnoreRemovable=0
IfMatch=^$
IfMatchAction=[!SetVariable Label9 "0"]
IfNotMatchAction=[!SetVariable Label9 "1"]

[DriveTotal9]
Measure=FreeDiskSpace
Drive=#Drive9#
Total=1
IgnoreRemovable=0

[DriveType9]
Measure=FreeDiskSpace
Drive=#Drive9#
IgnoreRemovable=0
Type=1

[MeasureDrive9]
Measure=Calc
Formula=((( DriveType9 = 3 ) || ( DriveType9 = 4 )) ? ( DriveTotal9 > 0 ) : (( DriveType9 = 6 ) ? #Label9# : 0 ))
IfCondition=(MeasureDrive9=1)
IfTrueAction=[!ShowMeterGroup "Drive9"]
IfFalseAction=[!HideMeterGroup "Drive9"]
DynamicVariables=1

[DriveFree10]
Measure=FreeDiskSpace
Drive=#Drive10#
IgnoreRemovable=0

[DriveLabel10]
Drive=#Drive10#
Measure=FreeDiskSpace
Label=1
IgnoreRemovable=0
IfMatch=^$
IfMatchAction=[!SetVariable Label10 "0"]
IfNotMatchAction=[!SetVariable Label10 "1"]

[DriveTotal10]
Measure=FreeDiskSpace
Drive=#Drive10#
Total=1
IgnoreRemovable=0

[DriveType10]
Measure=FreeDiskSpace
Drive=#Drive10#
IgnoreRemovable=0
Type=1

[MeasureDrive10]
Measure=Calc
Formula=((( DriveType10 = 3 ) || ( DriveType10 = 4 )) ? ( DriveTotal10 > 0 ) : (( DriveType10 = 6 ) ? #Label10# : 0 ))
IfCondition=(MeasureDrive10=1)
IfTrueAction=[!ShowMeterGroup "Drive10"]
IfFalseAction=[!HideMeterGroup "Drive10"]
DynamicVariables=1

[HDDimage1]
Meter=IMAGE
X=0
Y=0
ImageName=#@#hdd.png
LeftMouseUpAction=["#Drive1#\"]
Group=Drive1

[HDDimage2]
Meter=IMAGE
X=0r
Y=0R
ImageName=#@#hdd.png
LeftMouseUpAction=["#Drive2#\"]
Group=Drive2

[HDDimage3]
Meter=IMAGE
X=0r
Y=0R
ImageName=#@#hdd.png
LeftMouseUpAction=["#Drive3#\"]
Group=Drive3

[HDDimage4]
Meter=IMAGE
X=0r
Y=0R
ImageName=#@#hdd.png
LeftMouseUpAction=["#Drive4#\"]
Group=Drive4

[HDDimage5]
Meter=IMAGE
X=0r
Y=0R
ImageName=#@#hdd.png
LeftMouseUpAction=["#Drive5#\"]
Group=Drive5

[HDDimage6]
Meter=IMAGE
X=0r
Y=0R
ImageName=#@#hdd.png
LeftMouseUpAction=["#Drive6#\"]
Group=Drive6

[HDDimage7]
Meter=IMAGE
X=0r
Y=0R
ImageName=#@#hdd.png
LeftMouseUpAction=["#Drive7#\"]
Group=Drive7

[HDDimage8]
Meter=IMAGE
X=0r
Y=0R
ImageName=#@#hdd.png
LeftMouseUpAction=["#Drive8#\"]
Group=Drive8

[HDDimage9]
Meter=IMAGE
X=0r
Y=0R
ImageName=#@#hdd.png
LeftMouseUpAction=["#Drive9#\"]
Group=Drive9

[HDDimage10]
Meter=IMAGE
X=0r
Y=0R
ImageName=#@#hdd.png
LeftMouseUpAction=["#Drive10#\"]
Group=Drive10

[Label1]
MeasureName=DriveLabel1
Meter=string
X=56
Y=([HDDimage1:Y]+10)
FontColor=#FontColor#
FontSize=#FontHeight#
StringAlign=LEFT
FontFace=#FontFace#
Text=%1 (#Drive1#)
StringStyle=BOLD
AntiAlias=1
AutoScale=1
DynamicVariables=1
Group=Drive1

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

[Label2]
MeasureName=DriveLabel2
Meter=string
X=56
Y=([HDDimage2:Y]+10)
FontColor=#FontColor#
FontSize=#FontHeight#
StringAlign=LEFT
FontFace=#FontFace#
Text=%1 (#Drive2#)
StringStyle=BOLD
AntiAlias=1
AutoScale=1
DynamicVariables=1
Group=Drive2

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

[Label3]
MeasureName=DriveLabel3
Meter=string
X=56
Y=([HDDimage3:Y]+10)
FontColor=#FontColor#
FontSize=#FontHeight#
StringAlign=LEFT
FontFace=#FontFace#
Text=%1 (#Drive3#)
StringStyle=BOLD
AntiAlias=1
AutoScale=1
DynamicVariables=1
Group=Drive3

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

[Label4]
MeasureName=DriveLabel4
Meter=string
X=56
Y=([HDDimage4:Y]+10)
FontColor=#FontColor#
FontSize=#FontHeight#
StringAlign=LEFT
FontFace=#FontFace#
Text=%1 (#Drive4#)
StringStyle=BOLD
AntiAlias=1
AutoScale=1
DynamicVariables=1
Group=Drive4

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

[Label5]
MeasureName=DriveLabel5
Meter=string
X=56
Y=([HDDimage5:Y]+10)
FontColor=#FontColor#
FontSize=#FontHeight#
StringAlign=LEFT
FontFace=#FontFace#
Text=%1 (#Drive5#)
StringStyle=BOLD
AntiAlias=1
AutoScale=1
DynamicVariables=1
Group=Drive5

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

[Label6]
MeasureName=DriveLabel6
Meter=string
X=56
Y=([HDDimage6:Y]+10)
FontColor=#FontColor#
FontSize=#FontHeight#
StringAlign=LEFT
FontFace=#FontFace#
Text=%1 (#Drive6#)
StringStyle=BOLD
AntiAlias=1
AutoScale=1
DynamicVariables=1
Group=Drive6

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

[Label7]
MeasureName=DriveLabel7
Meter=string
X=56
Y=([HDDimage7:Y]+10)
FontColor=#FontColor#
FontSize=#FontHeight#
StringAlign=LEFT
FontFace=#FontFace#
Text=%1 (#Drive7#)
StringStyle=BOLD
AntiAlias=1
AutoScale=1
DynamicVariables=1
Group=Drive7

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

[Label8]
MeasureName=DriveLabel8
Meter=string
X=56
Y=([HDDimage8:Y]+10)
FontColor=#FontColor#
FontSize=#FontHeight#
StringAlign=LEFT
FontFace=#FontFace#
Text=%1 (#Drive8#)
StringStyle=BOLD
AntiAlias=1
AutoScale=1
DynamicVariables=1
Group=Drive8

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

[Label9]
MeasureName=DriveLabel9
Meter=string
X=56
Y=([HDDimage9:Y]+10)
FontColor=#FontColor#
FontSize=#FontHeight#
StringAlign=LEFT
FontFace=#FontFace#
Text=%1 (#Drive9#)
StringStyle=BOLD
AntiAlias=1
AutoScale=1
DynamicVariables=1
Group=Drive9

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

[Label10]
MeasureName=DriveLabel10
Meter=string
X=56
Y=([HDDimage10:Y]+10)
FontColor=#FontColor#
FontSize=#FontHeight#
StringAlign=LEFT
FontFace=#FontFace#
Text=%1 (#Drive10#)
StringStyle=BOLD
AntiAlias=1
AutoScale=1
DynamicVariables=1
Group=Drive10

[LeftText10]
MeasureName=DriveFree10
Meter=STRING
X=0r
Y=15r
FontColor=#FontColor#
FontSize=#FontHeight#
StringAlign=LEFT
FontFace=#FontFace2#
Text=Free:  %1B
Percentual=0
AntiAlias=1
AutoScale=1
Group=Drive10
kkmks
Posts: 11
Joined: October 1st, 2016, 4:33 pm

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

Post by kkmks »

1. in directory with my skin create @Resources dir
2. copy there hdd image ;)

Distance between entities (letssay like that) is dependent on image -> no image or too small image itll go one on other, but it may be edited on code few lines under

Its not possible to move only one volume (by mouse ofc), but its not needed 4 me -> cost of unifying ;-)
all the rest is great ;)


thx 4 help mych appreciate

:thumbup: :thumbup: :thumbup: :thumbup: :thumbup: :thumbup:
User avatar
balala
Rainmeter Sage
Posts: 12636
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

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

Post by balala »

I'm not very sure I entirely understood everything, but:
kkmks wrote:1. in directory with my skin create @Resources dir
2. copy there hdd image ;)
You should have the following file structure: HDD.ini file (or whatever is its name) and @Resources folder (with the HDD.png image inside) in the HDDstatus folder.
kkmks wrote:Distance between entities (letssay like that) is dependent on image -> no image or too small image itll go one on other, but it may be edited on code few lines under
A very important thing here is to have set the following Y option on [HDDimage2] - [HDDimage10] meters: Y=0R. This will ensure that a hidden drive doesn't take up space. Using any other Y option will make that the distance between two consecutively shown drives to depend on the appropriate drive meters position into the ini file.
kkmks wrote:Its not possible to move only one volume (by mouse ofc), but its not needed 4 me -> cost of unifying ;-)
all the rest is great ;)
If you would want to move the section of each drive independently, then yes, the unified skin wouldn't be not exactly what you would need. But if not, loading one single skin, instead of ten (from which many aren't even visible) is a much better idea.
kkmks
Posts: 11
Joined: October 1st, 2016, 4:33 pm

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

Post by kkmks »

my listing was made to someone who would looking for knowledge in the future ;)

thx
User avatar
balala
Rainmeter Sage
Posts: 12636
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

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

Post by balala »

Another improvement of the code: it can easily be made to indicate the type of each drive. For this, download the attached two images, copy them into the @Resources folder and rename the existing HDD.png to Fixed.png. Then modify the ImageName options of the [HDDimage1] - [HDDimage10] meters as it follows and add to each of the same meters, a DynamicVariables=1 option:

Code: Select all

[HDDimageX]
...
ImageName=#@#[DriveTypeX].png
...
DynamicVariables=1
with X between 1 and 10.
Obviously you can look for other images, these are just some examples. Just be careful if you want to use some other images, resize them to 55x55 pixels (or alternatively you can add to the [HDDimage1] - [HDDimage10] meters the H=55 and PreserveAspectRatio=1 options).
You do not have the required permissions to view the files attached to this post.
kkmks
Posts: 11
Joined: October 1st, 2016, 4:33 pm

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

Post by kkmks »

Hey, im back to the topic ;) I ve used your images.

Is it possible to read/try to read image from cd/pendrive if its called properlly -> most common types

eg:
usually its something like icon.ico in main folder of entered cd/stick -> for good performence onlu image should propably reload on some trigger like on device state change -> is there something like that to hook lin rainmeter ?
i think it ll be good if i could declare in ini table/array with names to check in devices, cuz no always itll be icon.ini


Perfect solution itll be read autorun.ini of drive if exist and read line with Icon=xxx.ico and then try to load resource from that drive , letter for path we have from code + Icon location. Problem will be if the icon will be stored in dll or exe file. But i think it ll be too much waste of time to get such solution, so ...
User avatar
balala
Rainmeter Sage
Posts: 12636
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

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

Post by balala »

kkmks wrote: January 30th, 2021, 11:06 pm Is it possible to read/try to read image from cd/pendrive if its called properlly -> most common types
It is, as long as both the CD and the pendrive has identifier letter. However even if possible, it's probably not too much recommended, because in some cases, the drive might not be availabla. However from the point of view of Rainmeter, it definitely is possible.