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.
It is currently April 18th, 2024, 2:22 am
Open first File in Folder?
-
- Posts: 13
- Joined: October 23rd, 2022, 2:34 am
-
- Posts: 511
- Joined: May 4th, 2020, 3:01 pm
- Location: Ankara, TURKEY
Re: Open first File in Folder?
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
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
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...
-
- Posts: 13
- Joined: October 23rd, 2022, 2:34 am
Re: Open first File in Folder?
tass_co thanks again works great. I have back-up copies of the files.
-
- Posts: 511
- Joined: May 4th, 2020, 3:01 pm
- Location: Ankara, TURKEY
Re: Open first File in Folder?
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
I don't know where i going from here, but i promise it won't be boring...
-
- Posts: 13
- Joined: October 23rd, 2022, 2:34 am
Re: Open first File in Folder?
tass_co,
The delete button is not working.
The delete button is not working.
-
- Posts: 511
- Joined: May 4th, 2020, 3:01 pm
- Location: Ankara, TURKEY
Re: Open first File in Folder?
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...
-
- Posts: 13
- Joined: October 23rd, 2022, 2:34 am
Re: Open first File in Folder?
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.
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.
-
- Posts: 511
- Joined: May 4th, 2020, 3:01 pm
- Location: Ankara, TURKEY
Re: Open first File in Folder?
I'm glad I could help
If you run into problems again, we'll help you here
I don't know where i going from here, but i promise it won't be boring...
-
- Posts: 13
- Joined: October 23rd, 2022, 2:34 am
Re: Open first File in Folder?
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.
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
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.
Reason: Please use <code> tags whenever are posting codes. It's the </> button.
-
- Posts: 511
- Joined: May 4th, 2020, 3:01 pm
- Location: Ankara, TURKEY
Re: Open first File in Folder?
First of all, we would be glad if you share your code with the Code Display button in the message section
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...