It is currently April 19th, 2024, 10:42 am

Add some new string...

Get help with creating, editing & fixing problems with skins
User avatar
CyborgTJB
Posts: 56
Joined: August 22nd, 2016, 4:20 am
Location: 26°26'29.14" N, 90°2'2.96" E

Add some new string...

Post by CyborgTJB »

I know you guys can do it. So, here is a question...

How to add
1. HDD Uses in %
2. HDD Read/Write speed per second separately (Left site Read, Right side Write)
3. HDD Partition type (I know it's NTFS but it will be cool to see it.)
4. HDD is SATA or ATA or USB

Just have to add with the HDD code. You can kick out current code for USB drives.
I can't upload the skin here so this is other place (deviantart.com) I upload it.
http://fav.me/dak9j23

Thank you in advance...
Last edited by CyborgTJB on August 26th, 2017, 11:26 am, edited 1 time in total.
CyborG, I love and like to collect and join. :sly:
Bekarfel
Posts: 217
Joined: May 16th, 2012, 5:38 am

Re: Add some new string...

Post by Bekarfel »

1: dividing free disk space by total disk space will give you %free disk space
2: you will need to use the PerfMon plugin with LogicalDisk (instructions beyond this are beyond my ability to offer. Explore perfmon.exe for heaps of options and a little technical explanation)
3: and 4: are beyond the ability of rainmeter's suite of DLLs. A third party DLL could be made to perform the functions
moshi wrote:there are many Rainmeter skins that aren't really useful, so let's add another one.
jsmorley wrote:I have good news and bad news.
First the bad news. [...] We would be happy to have this happen and would love to work with anyone who is feeling ambitious.
Now the good news.
I lied, there isn't any good news...
User avatar
CyborgTJB
Posts: 56
Joined: August 22nd, 2016, 4:20 am
Location: 26°26'29.14" N, 90°2'2.96" E

Re: Add some new string...

Post by CyborgTJB »

Thank you buddy but I didn't understand your language. It was like
Lets think A=B
Proved that A=B.
Sorry man.
You provably need to download my rearrange skin at "http://fav.me/dak9j23"
Then you will know Why I want it.
In simple answer I want it because its not there.
CyborG, I love and like to collect and join. :sly:
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: Add some new string...

Post by CyberTheWorm »

Try having a look at this it should help you out https://docs.rainmeter.net/manual-beta/plugins/perfmon/
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Add some new string...

Post by balala »

CyborgTJB wrote:How to add
1. HDD Uses in %
As Bekarfel said above, if you divide the used disk space by the total disk space, you'll get the percentage of the used disk space (well, he talked about the free space, but the idea is the same). For this you need a Calc measure. In the following code, the [MeasureTotalDiskSpace] and the [MeasureUsedDiskSpace] measures get the total and respectively the used disk space, while the [MeasureUsedDiskSpacePercentage] measure calculates the needed percentage. It returns a number between 0 (which means 0%) and 1 (100%). The [MeterDisk] meter will show this result as a percentage (between 0% and 100%, due to its Percentual=1 option):

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
Drive=C:

[MeasureTotalDiskSpace]
Measure=FreeDiskSpace
Drive=#Drive#
Total=1

[MeasureUsedDiskSpace]
Measure=FreeDiskSpace
Drive=#Drive#
InvertMeasure=1

[MeasureUsedDiskSpacePercentage] 
Measure=Calc
Formula=( MeasureUsedDiskSpace / MeasureTotalDiskSpace )

[MeterDisk]
Meter=String
MeasureName=MeasureUsedDiskSpacePercentage
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=%1%
Percentual=1
CyborgTJB wrote:How to add
2. HDD Read/Write speed per second separately (Left site Read, Right side Write)
Take a look to the following code: https://forum.rainmeter.net/viewtopic.php?p=124254#p124254
A little below on the same thread, eclectic-tech has posted a .rmskin with almost the same code.
The basic idea is the following (also see the following short code): the [MeasureDiskRead] and [MeasureDiskWrite] measures, using the PerfMon plugin, get the read and write speed, on the specified drive. The [MeterDisk] meter shows these values, scaling them (due to the AutoScale=1 option):

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
Drive=C:

[MeasureDiskRead]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter=Disk Read Bytes/sec
PerfMonInstance=#Drive#

[MeasureDiskWrite]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter=Disk Write Bytes/sec
PerfMonInstance=#Drive#

[MeterDisk]
Meter=String
MeasureName=MeasureDiskRead
MeasureName2=MeasureDiskWrite
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Read: %1B#CRLF#Write: %2B
AutoScale=1
CyborgTJB wrote:How to add
3. HDD Partition type (I know it's NTFS but it will be cool to see it.)
4. HDD is SATA or ATA or USB
Here I have to agree with Bekarfel:
Bekarfel wrote:3: and 4: are beyond the ability of rainmeter's suite of DLLs. A third party DLL could be made to perform the functions
I don't think it would be possible with native Rainmeter. As he also said, maybe just with a third party app. But can't recommand one right now.
User avatar
CyborgTJB
Posts: 56
Joined: August 22nd, 2016, 4:20 am
Location: 26°26'29.14" N, 90°2'2.96" E

Re: Add some new string...

Post by CyborgTJB »

Thanks a lot Balala for the code with a the explanation.
Bekarfel wrote: 3: and 4: are beyond the ability of rainmeter's suite of DLLs. A third party DLL could be made to perform the functions
I really don't know how but this one did it
You do not have the required permissions to view the files attached to this post.
CyborG, I love and like to collect and join. :sly:
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Add some new string...

Post by balala »

CyborgTJB wrote:I really don't know how but this one did it
Where? I'm not sure I could find. I attach the image of the C: drive. Where are those information?
You do not have the required permissions to view the files attached to this post.
User avatar
CyborgTJB
Posts: 56
Joined: August 22nd, 2016, 4:20 am
Location: 26°26'29.14" N, 90°2'2.96" E

Re: Add some new string...

Post by CyborgTJB »

Here is my screenshot...
You do not have the required permissions to view the files attached to this post.
CyborG, I love and like to collect and join. :sly:
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Add some new string...

Post by balala »

CyborgTJB wrote:Here is my screenshot...
Yeah, you're right. Those actions are done by the Drives.exe utility, provided into the @Resources folder, through the IfTrueAction options of the [MeasureFireActionC] - [MeasureFireActionZ] measures.
But here you can see that Bekarfel had right: these tasks are done by a third party app (Drive.exe).
User avatar
Brian
Developer
Posts: 2679
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Add some new string...

Post by Brian »

One way to get the filesystem type is to use the RunCommand plugin.
wmic volume where DriveLetter="C:" get FileSystem

You will probably need to do some substitutions, but it should show you what type of filesystem the drive/partition is.

-Brian