It is currently April 18th, 2024, 2:22 am

Open first File in Folder?

Get help with creating, editing & fixing problems with skins
milt
Posts: 13
Joined: October 23rd, 2022, 2:34 am

Re: Open first File in Folder?

Post by milt »

Hello Again,

Now that that is working perfect.

Can a differ launcher delete the same two files?

And can launcher buttons be added?

Thanks for any help.
User avatar
tass_co
Posts: 511
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: Open first File in Folder?

Post by tass_co »

milt wrote: October 23rd, 2022, 8:11 pm Hello Again,

Now that that is working perfect.

Can a differ launcher delete the same two files?

And can launcher buttons be added?

Thanks for any help.
I created a LuaScript for you.
This script; It reads the string values of MeaChild1 and MeaChild2 and creates a batch file to delete these files!
Download and install the skin file and replace the Path variable with the folder you want.
When you right-click with the mouse, the script starts executing...

BE CAREFUL!!!
The files have NO CHANCE TO BE RECOVERED as they will be deleted from the DOS environment!

Code: Select all

[Rainmeter]
Update=1000

[Variables]
Path="C:\1"

[MeaLuaScript]
Measure=Script
ScriptFile=#@#DeleteFiles.lua

[MeaMP4]
Measure=Plugin
Plugin=FileView
Path=#Path#
ShowDotDot=0
ShowFolder=0
SortType=Name
;SortDateType=Created
SortAscending=1
Extensions="mp4;srt"
Count=2
DynamicVariables=1
UpdateDivider=60

[MeaChild1]
Measure=Plugin
Plugin=FileView
Path=[MeaMP4]
Type=FilePath
Index=1
DynamicVariables=1
UpdateDivider=60

[MeaChild2]
Measure=Plugin
Plugin=FileView
Path=[MeaMP4]
Type=FilePath
Index=2
DynamicVariables=1
UpdateDivider=60

[MeaChild11]
Measure=Plugin
Plugin=FileView
Path=[MeaMP4]
Type=FileName
Index=1
DynamicVariables=1
UpdateDivider=60

[MeaChild21]
Measure=Plugin
Plugin=FileView
Path=[MeaMP4]
Type=FileName
Index=2
DynamicVariables=1
UpdateDivider=60

[MtrFileNames]
Meter=String
MeasureName=MeaChild11
MeasureName2=MeaChild21
X=0
Y=0
W=300
H=60
StringStyle=Normal
StringAlign=Left
FontSize=10
FontColor=255,255,255
ClipString=1
AntiAlias=1
Text=%1#CRLF#%2
DynamicVariables=1

[BtnRefresh]
Meter=String
X=28
Y=32
W=60
H=20
SolidColor=0,0,0
FontColor=255,255,255,255
FontFace=Seqoe UI
FontSize=10
StringAlign=Center
StringStyle=Bold
Text=OPEN
LeftMouseUpAction=["[MeaChild1]"]["[MeaChild2]"]
AntiAlias=1

[BtnDelete]
Meter=String
X=28
Y=56
W=60
H=20
SolidColor=0,0,0
FontColor=255,255,255,255
FontFace=Seqoe UI
FontSize=10
StringAlign=Center
StringStyle=Bold
Text=DELETE!
LeftMouseUpAction=[!CommandMeasure MeaLuaScript "DeleteFiles()"][!Delay 2000]["#@#DeleteFiles.bat"][!Delay 1000][!Refresh]
AntiAlias=1
LUA

Code: Select all

function Initialize()

end

function DeleteFiles()
	MeaGetData1 = SKIN:GetMeasure('MeaChild1')
	local text1 = MeaGetData1:GetStringValue()
	MeaGetData2 = SKIN:GetMeasure('MeaChild2')
	local text2 = MeaGetData2:GetStringValue()
	local FileName = SKIN:MakePathAbsolute('@Resources\\DeleteFiles.bat')

	local CreateFile = io.open(FileName, 'w')

	if not CreateFile then
		print ('could not open ' .. FileName)
	else
		-- write the line
		CreateFile:write('del "', text1, '"\n', 'del "', text2, '"\n')
		-- close the file
		CreateFile:close()
	end
end
2 Buttons Added!
SampleSkin_2.0.rmskin
You do not have the required permissions to view the files attached to this post.
Last edited by tass_co on October 23rd, 2022, 11:43 pm, edited 1 time in total.
I don't know where i going from here, but i promise it won't be boring... :great:
milt
Posts: 13
Joined: October 23rd, 2022, 2:34 am

Re: Open first File in Folder?

Post by milt »

tass_co thanks again works great. I have back-up copies of the files.
User avatar
tass_co
Posts: 511
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: Open first File in Folder?

Post by tass_co »

milt wrote: October 23rd, 2022, 11:37 pm tass_co thanks again works great. I have back-up copies of the files.
I added 2 simple buttons. (I used String Meter) and I removed Path(only shows Filenames)
It's up to you to improve the skin's appearance.
Button Meter
Image Meter

The file is in the previous post :thumbup:
I don't know where i going from here, but i promise it won't be boring... :great:
milt
Posts: 13
Joined: October 23rd, 2022, 2:34 am

Re: Open first File in Folder?

Post by milt »

tass_co,

The delete button is not working.
User avatar
tass_co
Posts: 511
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: Open first File in Folder?

Post by tass_co »

milt wrote: October 24th, 2022, 1:24 am tass_co,

The delete button is not working.
Skin works fine for me.
Have you looked at the Path variable? Is the path correct?
I don't know where i going from here, but i promise it won't be boring... :great:
milt
Posts: 13
Joined: October 23rd, 2022, 2:34 am

Re: Open first File in Folder?

Post by milt »

tass_co,

Not sure what was wrong, but it is working perfect today.

I want to Thank You so much for all you help in making my life a litter bit easier.

Now I will take a shout at making the buttons.

Thank You again.
User avatar
tass_co
Posts: 511
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: Open first File in Folder?

Post by tass_co »

milt wrote: October 24th, 2022, 11:05 am tass_co,

Not sure what was wrong, but it is working perfect today.

I want to Thank You so much for all you help in making my life a litter bit easier.

Now I will take a shout at making the buttons.

Thank You again.
I'm glad I could help :great:
If you run into problems again, we'll help you here :thumbup:
I don't know where i going from here, but i promise it won't be boring... :great:
milt
Posts: 13
Joined: October 23rd, 2022, 2:34 am

Re: Open first File in Folder?

Post by milt »

Hello tass_co,

I had to turn-up the font size because of my vision and I now have 10 of the skins so far on my Surface Pro 7. I tried to Hide/Show (See text in Red) But it's not working.

Code: Select all

[BtnRefresh]
Meter=String
X=65
Y=40
W=60
H=20

FontColor=31, 81, 255
FontFace=Seqoe UI
FontSize=20
StringAlign=Center
StringStyle=Bold
Text=Revelation
[color=#FF0000]HideOnMouseOver=2
FadeDuration=0
AlphaValue=1[/color]
LeftMouseUpAction=["[MeaChild1]"]["[MeaChild2]"]
AntiAlias=1

[BtnDelete]
Meter=String
X=50
Y=70
W=80
H=50

FontColor=255, 0, 0
FontFace=Seqoe UI
FontSize=20
StringAlign=Center
StringStyle=Bold
Text=DELETE!
[color=#FF0000]HideOnMouseOver=2
FadeDuration=0
AlphaValue=1[/color]
LeftMouseUpAction=[!CommandMeasure MeaLuaScript "DeleteFiles()"][!Delay 2000]["#@#DeleteFiles.bat"][!Delay 1000][!Refresh]
AntiAlias=1
Thank You for any help.
Last edited by balala on October 26th, 2022, 5:30 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are posting codes. It's the </> button.
User avatar
tass_co
Posts: 511
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: Open first File in Folder?

Post by tass_co »

milt wrote: October 26th, 2022, 1:33 pm Hello tass_co,

I had to turn-up the font size because of my vision and I now have 10 of the skins so far on my Surface Pro 7. I tried to Hide/Show (See text in Red) But it's not working.

Thank You for any help.
First of all, we would be glad if you share your code with the Code Display button in the message section :thumbup:

I guess you want to Show/Hide String Meter on mouse hover. For this you should use the following mouse bangs.

Code: Select all

[MtrFileNames]
.
.
MouseOverAction=[!ShowMeter BtnRefresh][!ShowMeter BtnDelete]


[BtnRefresh]
.
.
LeftMouseUpAction=["[MeaChild1]"]["[MeaChild2]"][!HideMeter BtnRefresh][!HideMeter BtnDelete]
Hidden=1

[BtnDelete]
.
.
Hidden=1

Last edited by tass_co on October 26th, 2022, 8:16 pm, edited 1 time in total.
I don't know where i going from here, but i promise it won't be boring... :great: