It is currently March 28th, 2024, 2:00 pm

File check with multiple files in 1 ini

Get help with creating, editing & fixing problems with skins
Leeroi
Posts: 11
Joined: August 8th, 2018, 12:43 pm

File check with multiple files in 1 ini

Post by Leeroi »

Hey I have been wondering if that is possible to file check a multiple file and if one of them is detected in rainmeter it will show that this one is active. i'm modifying the illustro skin so everything looks the same

like this is the rainmeter visual

____________________________________
| Activated account |
| 6 accounts > 1st account|
|__________________________________|

so the 6 account it will check a file destination on how many files was there
the 1st account will only read a specific file name like
"C:\files\data\red.txt" then in the visual the "1st account" will change into Red then if I right click it
"C:\files\data\blue.txt" then in the visual the "red" will change into blue
but it has a order of it like red blue green yellow pink black
so every click or right it will go right and every click of left it will go left
so like the [meterRightSide] the text will change every time you click

the other code that was not here is already done the visual is all I need to finish it I hope you can help me with this project of mine


lua

Code: Select all

function file_exists(name)
	local f=io.open(name,"r")
	if f~=nil then
		io.close(f)
		return 1
	else
		return 0
	end
end
ini file

Code: Select all

[Variables]
OnText=On
OffText=Off
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
FileToCheck=

[Rainmeter]
Update=1000
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14

[MeasureLuaScript]
Measure=Script
ScriptFile=#@#MyLua.lua
Disabled=1

[MeasureCheck]
Measure=Calc
Formula=[&MeasureLuaScript:file_exists('#FileToCheck#')]
IfCondition=(#CURRENTSECTION#>=1)
IfTrueAction=[!SetOption meterRightSide Text " this is where my named files will be on and there's like  files "][!UpdateMeter "meterRightSide"][!Redraw]
IfFalseAction=[!SetOption meterRightSide Text " this is where my named files will be on and there's like  files "][!UpdateMeter "meterRightSide"][!Redraw]
DynamicVariables=1

; ----------------------------------
; File Check and Change.
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
X=100
Y=12
W=190
H=18
Text=Check
LeftMouseUpAction=["preview account"]
RightMouseUpAction=["Next accound"]

[meterLeftSide]
Meter=String
MeterStyle=styleLeftText
MeasureName=measureBinItems
X=10
Y=40
W=190
H=14
Text=Account Activated

[meterRightSide]
Meter=String
MeterStyle=styleRightText
MeasureName=measureBinSize
X=200
Y=0r
W=190
H=14
Text=

[meterSeperator]
Meter=Image
MeterStyle=styleSeperator
X=10
Y=52
W=190
H=1
[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleSeperator]
SolidColor=255,255,255,15
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm
Contact:

Re: File check with multiple files in 1 ini

Post by death.crafter »

Leeroi wrote: August 9th, 2021, 9:09 am Hey I have been wondering if that is possible to file check a multiple file and if one of them is detected in rainmeter it will show that this one is active. i'm modifying the illustro skin so everything looks the same

like this is the rainmeter visual

____________________________________
| Activated account |
| 6 accounts > 1st account|
|__________________________________|

so the 6 account it will check a file destination on how many files was there
the 1st account will only read a specific file name like
"C:\files\data\red.txt" then in the visual the "1st account" will change into Red then if I right click it
"C:\files\data\blue.txt" then in the visual the "red" will change into blue
but it has a order of it like red blue green yellow pink black
so every click or right it will go right and every click of left it will go left
so like the [meterRightSide] the text will change every time you click

the other code that was not here is already done the visual is all I need to finish it I hope you can help me with this project of mine


lua

Code: Select all

function file_exists(name)
	local f=io.open(name,"r")
	if f~=nil then
		io.close(f)
		return 1
	else
		return 0
	end
end
ini file

Code: Select all

[Variables]
OnText=On
OffText=Off
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
FileToCheck=

[Rainmeter]
Update=1000
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14

[MeasureLuaScript]
Measure=Script
ScriptFile=#@#MyLua.lua
Disabled=1

[MeasureCheck]
Measure=Calc
Formula=[&MeasureLuaScript:file_exists('#FileToCheck#')]
IfCondition=(#CURRENTSECTION#>=1)
IfTrueAction=[!SetOption meterRightSide Text " this is where my named files will be on and there's like  files "][!UpdateMeter "meterRightSide"][!Redraw]
IfFalseAction=[!SetOption meterRightSide Text " this is where my named files will be on and there's like  files "][!UpdateMeter "meterRightSide"][!Redraw]
DynamicVariables=1

; ----------------------------------
; File Check and Change.
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
X=100
Y=12
W=190
H=18
Text=Check
LeftMouseUpAction=["preview account"]
RightMouseUpAction=["Next accound"]

[meterLeftSide]
Meter=String
MeterStyle=styleLeftText
MeasureName=measureBinItems
X=10
Y=40
W=190
H=14
Text=Account Activated

[meterRightSide]
Meter=String
MeterStyle=styleRightText
MeasureName=measureBinSize
X=200
Y=0r
W=190
H=14
Text=

[meterSeperator]
Meter=Image
MeterStyle=styleSeperator
X=10
Y=52
W=190
H=1
[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleSeperator]
SolidColor=255,255,255,15
What you need is:

https://docs.rainmeter.net/manual-beta/plugins/fileview/

Code: Select all

[FileView]
Measure=Plugin
Plugin=FileView
Path=path\to\folder
Count=6
ShowFolder=0
Extensions="txt"
HideExtensions=1

[FileViewChild]
Measure=Plugin
Plugin=FileView
Path=[FileView]
Index=#Index#
Type=FileName
You can change the index with left right mouse actions to show all the files.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: File check with multiple files in 1 ini

Post by balala »

Leeroi wrote: August 9th, 2021, 9:09 am like this is the rainmeter visual

____________________________________
| Activated account |
| 6 accounts > 1st account|
|__________________________________|

so the 6 account it will check a file destination on how many files was there
the 1st account will only read a specific file name like
"C:\files\data\red.txt" then in the visual the "1st account" will change into Red then if I right click it
"C:\files\data\blue.txt" then in the visual the "red" will change into blue
but it has a order of it like red blue green yellow pink black
so every click or right it will go right and every click of left it will go left
so like the [meterRightSide] the text will change every time you click

the other code that was not here is already done the visual is all I need to finish it I hope you can help me with this project of mine
Not sure at all I can follow you. What is with those accounts? On first you're talking about some files, then suddenly you're switching to accounts. What is the relation between those files and the accounts? And what kind of accounts are those?
Please come back with some details.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5380
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: File check with multiple files in 1 ini

Post by eclectic-tech »

Leeroi wrote: August 9th, 2021, 9:09 am ...
so the 6 account it will check a file destination on how many files was there
the 1st account will only read a specific file name like
"C:\files\data\red.txt" then in the visual the "1st account" will change into Red then if I right click it
"C:\files\data\blue.txt" then in the visual the "red" will change into blue
but it has a order of it like red blue green yellow pink black
so every click or right it will go right and every click of left it will go left
so like the [meterRightSide] the text will change every time you click
...
Following up on death.crafter's suggestion, here is an expanded example that does most of what you described (if I understood it ;-) ).

Notes:
I created a folder under the illustro root folder with this file in it, and created a sub-folder in there named 'TestFolder' that had several text files: red.txt, green.txt, etc.
The FileView plugin reads the contents of the 'illustro\{yourfolder}\TextFolder' folder in this example. To work with a different folder simply change the PATH=value in the [FileView] section.

Feel free to modify or ask any questions.

Code: Select all

[Variables]
OnText=On
OffText=Off
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
FileIndex=1
FileToCheck1=red
FileToCheck2=blue
FileToCheck3=green
FileToCheck4=yellow
FileToCheck5=pink
FileToCheck6=black

[Rainmeter]
Update=1000
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14

[FileView]
Measure=Plugin
Plugin=FileView
Path="#CurrentPath#TestFolder"
Count=6
ShowDotDot=0
ShowFolder=0
Extensions="txt"
HideExtensions=1

[FileViewCount]
Measure=Plugin
Plugin=FileView
Path=[FileView]
Type=FileCount
IfCondition=FileViewCount>1
IfTrueAction=[!SetOption meterLeftSide Text "%1 Accounts | Activated"]
IfFalseAction=[!SetOption meterLeftSide Text "%1 Account | Activated"]

[FileViewChild]
Measure=Plugin
Plugin=FileView
Path=[FileView]
Index=#FileIndex#
Type=FileName
IfMatch=(?i)#FileToCheck1#
IfMatchAction=[!SetOption meterRightSide FontColor "255,0,0"][!SetOption meterRightSide Text "#FileToCheck1#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch2=(?i)#FileToCheck2#
IfMatchAction2=[!SetOption meterRightSide FontColor "0,0,255"][!SetOption meterRightSide Text "#FileToCheck2#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch3=(?i)#FileToCheck3#
IfMatchAction3=[!SetOption meterRightSide FontColor "0,255,0"][!SetOption meterRightSide Text "#FileToCheck3#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch4=(?i)#FileToCheck4#
IfMatchAction4=[!SetOption meterRightSide FontColor "255,255,0"][!SetOption meterRightSide Text "#FileToCheck4#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch5=(?i)#FileToCheck5#
IfMatchAction5=[!SetOption meterRightSide FontColor "255,105,180"][!SetOption meterRightSide Text "#FileToCheck5#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch6=(?i)#FileToCheck6#
IfMatchAction6=[!SetOption meterRightSide FontColor "0,0,0"][!SetOption meterRightSide Text "#FileToCheck6#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch7=^$
IfMatchAction7=[!SetOption meterRightSide FontColor "#colorText#"][!SetOption meterRightSide Text "None"][!UpdateMeter MeterRightSide][!UpdateMeter MeterRightSide][!Redraw]
DynamicVariables=1

; ----------------------------------
; File Check and Change.
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
X=100
Y=12
W=190
H=18
Text=Check #FileIndex#
LeftMouseUpAction=[!SetVariable FileIndex (Clamp(#FileIndex#-1,1,6))]
RightMouseUpAction=[!SetVariable FileIndex (Clamp(#FileIndex#+1,1,6))]
DynamicVariables=1

[meterLeftSide]
Meter=String
MeterStyle=styleLeftText
MeasureName=FileViewCount
X=10
Y=40
W=190
H=14
Text=%1 Account | Activated
DynamicVariables=1

[meterRightSide]
Meter=String
MeterStyle=styleRightText
X=200
Y=0r
W=190
H=14
Text=
DynamicVariables=1

[meterSeperator]
Meter=Image
MeterStyle=styleSeperator
X=10
Y=52
W=190
H=1

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Border
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleSeperator]
SolidColor=255,255,255,15
colortest.gif
Leeroi
Posts: 11
Joined: August 8th, 2018, 12:43 pm

Re: File check with multiple files in 1 ini

Post by Leeroi »

balala wrote: August 9th, 2021, 6:19 pm Not sure at all I can follow you. What is with those accounts? On first you're talking about some files, then suddenly you're switching to accounts. What is the relation between those files and the accounts? And what kind of accounts are those?
Please come back with some details.
I actually Use rainmeter to make everything easier the account I was talking about for example you can use this in valorant no need to login simply with this by saving the account cred you can open up your multiple account without logging in it works in steam,facebook messenger in desktop and etc well rainmeter is just the visual and I used a programing language to make it possible that only thing I need is this visual
Leeroi
Posts: 11
Joined: August 8th, 2018, 12:43 pm

Re: File check with multiple files in 1 ini

Post by Leeroi »

eclectic-tech wrote: August 10th, 2021, 4:05 am Following up on death.crafter's suggestion, here is an expanded example that does most of what you described (if I understood it ;-) ).

Notes:
I created a folder under the illustro root folder with this file in it, and created a sub-folder in there named 'TestFolder' that had several text files: red.txt, green.txt, etc.
The FileView plugin reads the contents of the 'illustro\{yourfolder}\TextFolder' folder in this example. To work with a different folder simply change the PATH=value in the [FileView] section.

Feel free to modify or ask any questions.

Code: Select all

[Variables]
OnText=On
OffText=Off
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
FileIndex=1
FileToCheck1=red
FileToCheck2=blue
FileToCheck3=green
FileToCheck4=yellow
FileToCheck5=pink
FileToCheck6=black

[Rainmeter]
Update=1000
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14

[FileView]
Measure=Plugin
Plugin=FileView
Path="#CurrentPath#TestFolder"
Count=6
ShowDotDot=0
ShowFolder=0
Extensions="txt"
HideExtensions=1

[FileViewCount]
Measure=Plugin
Plugin=FileView
Path=[FileView]
Type=FileCount
IfCondition=FileViewCount>1
IfTrueAction=[!SetOption meterLeftSide Text "%1 Accounts | Activated"]
IfFalseAction=[!SetOption meterLeftSide Text "%1 Account | Activated"]

[FileViewChild]
Measure=Plugin
Plugin=FileView
Path=[FileView]
Index=#FileIndex#
Type=FileName
IfMatch=(?i)#FileToCheck1#
IfMatchAction=[!SetOption meterRightSide FontColor "255,0,0"][!SetOption meterRightSide Text "#FileToCheck1#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch2=(?i)#FileToCheck2#
IfMatchAction2=[!SetOption meterRightSide FontColor "0,0,255"][!SetOption meterRightSide Text "#FileToCheck2#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch3=(?i)#FileToCheck3#
IfMatchAction3=[!SetOption meterRightSide FontColor "0,255,0"][!SetOption meterRightSide Text "#FileToCheck3#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch4=(?i)#FileToCheck4#
IfMatchAction4=[!SetOption meterRightSide FontColor "255,255,0"][!SetOption meterRightSide Text "#FileToCheck4#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch5=(?i)#FileToCheck5#
IfMatchAction5=[!SetOption meterRightSide FontColor "255,105,180"][!SetOption meterRightSide Text "#FileToCheck5#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch6=(?i)#FileToCheck6#
IfMatchAction6=[!SetOption meterRightSide FontColor "0,0,0"][!SetOption meterRightSide Text "#FileToCheck6#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch7=^$
IfMatchAction7=[!SetOption meterRightSide FontColor "#colorText#"][!SetOption meterRightSide Text "None"][!UpdateMeter MeterRightSide][!UpdateMeter MeterRightSide][!Redraw]
DynamicVariables=1

; ----------------------------------
; File Check and Change.
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
X=100
Y=12
W=190
H=18
Text=Check #FileIndex#
LeftMouseUpAction=[!SetVariable FileIndex (Clamp(#FileIndex#-1,1,6))]
RightMouseUpAction=[!SetVariable FileIndex (Clamp(#FileIndex#+1,1,6))]
DynamicVariables=1

[meterLeftSide]
Meter=String
MeterStyle=styleLeftText
MeasureName=FileViewCount
X=10
Y=40
W=190
H=14
Text=%1 Account | Activated
DynamicVariables=1

[meterRightSide]
Meter=String
MeterStyle=styleRightText
X=200
Y=0r
W=190
H=14
Text=
DynamicVariables=1

[meterSeperator]
Meter=Image
MeterStyle=styleSeperator
X=10
Y=52
W=190
H=1

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Border
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleSeperator]
SolidColor=255,255,255,15
colortest.gif
Wow you guys are really cool thank you for helping me about this project of mine I can use this in many different ways

I was planning to like make a multiple ini and chain them all together. but this thank you
Leeroi
Posts: 11
Joined: August 8th, 2018, 12:43 pm

Re: File check with multiple files in 1 ini

Post by Leeroi »

eclectic-tech wrote: August 10th, 2021, 4:05 am Following up on death.crafter's suggestion, here is an expanded example that does most of what you described (if I understood it ;-) ).

Notes:
I created a folder under the illustro root folder with this file in it, and created a sub-folder in there named 'TestFolder' that had several text files: red.txt, green.txt, etc.
The FileView plugin reads the contents of the 'illustro\{yourfolder}\TextFolder' folder in this example. To work with a different folder simply change the PATH=value in the [FileView] section.

Feel free to modify or ask any questions.

Code: Select all

[Variables]
OnText=On
OffText=Off
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
FileIndex=1
FileToCheck1=red
FileToCheck2=blue
FileToCheck3=green
FileToCheck4=yellow
FileToCheck5=pink
FileToCheck6=black

[Rainmeter]
Update=1000
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14

[FileView]
Measure=Plugin
Plugin=FileView
Path="#CurrentPath#TestFolder"
Count=6
ShowDotDot=0
ShowFolder=0
Extensions="txt"
HideExtensions=1

[FileViewCount]
Measure=Plugin
Plugin=FileView
Path=[FileView]
Type=FileCount
IfCondition=FileViewCount>1
IfTrueAction=[!SetOption meterLeftSide Text "%1 Accounts | Activated"]
IfFalseAction=[!SetOption meterLeftSide Text "%1 Account | Activated"]

[FileViewChild]
Measure=Plugin
Plugin=FileView
Path=[FileView]
Index=#FileIndex#
Type=FileName
IfMatch=(?i)#FileToCheck1#
IfMatchAction=[!SetOption meterRightSide FontColor "255,0,0"][!SetOption meterRightSide Text "#FileToCheck1#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch2=(?i)#FileToCheck2#
IfMatchAction2=[!SetOption meterRightSide FontColor "0,0,255"][!SetOption meterRightSide Text "#FileToCheck2#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch3=(?i)#FileToCheck3#
IfMatchAction3=[!SetOption meterRightSide FontColor "0,255,0"][!SetOption meterRightSide Text "#FileToCheck3#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch4=(?i)#FileToCheck4#
IfMatchAction4=[!SetOption meterRightSide FontColor "255,255,0"][!SetOption meterRightSide Text "#FileToCheck4#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch5=(?i)#FileToCheck5#
IfMatchAction5=[!SetOption meterRightSide FontColor "255,105,180"][!SetOption meterRightSide Text "#FileToCheck5#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch6=(?i)#FileToCheck6#
IfMatchAction6=[!SetOption meterRightSide FontColor "0,0,0"][!SetOption meterRightSide Text "#FileToCheck6#"][!UpdateMeter MeterRightSide][!Redraw]
IfMatch7=^$
IfMatchAction7=[!SetOption meterRightSide FontColor "#colorText#"][!SetOption meterRightSide Text "None"][!UpdateMeter MeterRightSide][!UpdateMeter MeterRightSide][!Redraw]
DynamicVariables=1

; ----------------------------------
; File Check and Change.
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
X=100
Y=12
W=190
H=18
Text=Check #FileIndex#
LeftMouseUpAction=[!SetVariable FileIndex (Clamp(#FileIndex#-1,1,6))]
RightMouseUpAction=[!SetVariable FileIndex (Clamp(#FileIndex#+1,1,6))]
DynamicVariables=1

[meterLeftSide]
Meter=String
MeterStyle=styleLeftText
MeasureName=FileViewCount
X=10
Y=40
W=190
H=14
Text=%1 Account | Activated
DynamicVariables=1

[meterRightSide]
Meter=String
MeterStyle=styleRightText
X=200
Y=0r
W=190
H=14
Text=
DynamicVariables=1

[meterSeperator]
Meter=Image
MeterStyle=styleSeperator
X=10
Y=52
W=190
H=1

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Border
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleSeperator]
SolidColor=255,255,255,15
colortest.gif
is there a way to execute a exe file like
if #meterRightSide# Text = red
execute "D:\desktop apps\code\red.exe"

if #meterRightSide# Text = blue
execute "D:\desktop apps\code\blue.exe"

or
if #meterRightSide# Text = blue
middleupaction execute "D:\desktop apps\code\blue.exe"
Last edited by Leeroi on August 10th, 2021, 7:14 am, edited 1 time in total.
User avatar
David8192
Posts: 246
Joined: July 8th, 2021, 11:30 pm
Location: The King's Avenue, Golden Kingdom
Contact:

Re: File check with multiple files in 1 ini

Post by David8192 »

Just add the file path to the command
E.g.
LeftMouseUpAction=C:\Program Files\Notepad++\Notepad++.exe
Leeroi
Posts: 11
Joined: August 8th, 2018, 12:43 pm

Re: File check with multiple files in 1 ini

Post by Leeroi »

David8192 wrote: August 10th, 2021, 7:07 am Just add the file path to the command
E.g.
LeftMouseUpAction=C:\Program Files\Notepad++\Notepad++.exe
well if you read the code that eclectro sent exactly where you gonna put it? even though you inserted it right it will run a specific command in the right account? like red will execute red and blue will execute blue
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm
Contact:

Re: File check with multiple files in 1 ini

Post by death.crafter »

Leeroi wrote: August 10th, 2021, 6:49 am is there a way to execute a exe file like
if #meterRightSide# Text = red
execute "D:\desktop apps\code\red.exe"

if #meterRightSide# Text = blue
execute "D:\desktop apps\code\blue.exe"

I don't know how to but this in rainmeter language sorry for inconvenience
Yes.

Add these to IfMatchActions

Code: Select all

["path\to\#FileToCheckN#.exe"]
E.g.:

Code: Select all

IfMatch2=(?i)#FileToCheck2#
IfMatchAction2=[!SetOption meterRightSide FontColor "0,0,255"][!SetOption meterRightSide Text "#FileToCheck2#"][!UpdateMeter MeterRightSide][!Redraw]["D:\desktop apps\code\#FileToCheck2#.exe"]
Post Reply