It is currently July 7th, 2022, 4:19 am

Windows Shortcuts

Skins to open folders and launch applications and websites
User avatar
balala
Rainmeter Sage
Posts: 14347
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Windows Shortcuts

Post by balala »

Judian81 wrote: December 3rd, 2021, 3:53 pm i hide the extensions and make a list of shortcuts. and when i click on any icon it will open a lnk file.
but the url file to some website it just does nothing.

so i created a duplicate so it will open url file or any other files. is this normal?! because i find it strange. when i have a hidden extention it will open lnk files automaticly.
This is caused by the fact that, as you intuited, in the [mNameChildX] FileView plugin measures you've removed the .lnk extensions (by the Substitute=".lnk":"" option), then have added them back in the LeftMouseUpAction options of the [MeterPictureX] and [MeterNameX] meters (LeftMouseUpAction=["#vPath#\[&mNameChild1].lnk"]). If the file returned by the measure is a .lnk file, this cause no trouble, however if it is a .url file it does, because nothing is substituted by the Substitute options of the [mNameChildX] measures (the extension not being .lnk), but the .lnk extension is added to the name which already has a .url extension.
The solution is pretty simple: remove the Substitute=".lnk":"" options of the [mNameChildX] measures AND the .lnk extensions from the LeftMouseUpAction=["#vPath#\[&mNameChildX].lnk"] options of the [MeterPictureX] and [MeterNameX] meters:

Code: Select all

[mNameChild1]
Measure=Plugin
Plugin=FileView
Path=[mFolderParent]
Type=FileName
Index=1
;Substitute=".lnk":""
Group=Children
DynamicVariables=1

...

[MeterPicture1]
Meter=Image
MeasureName=mIconChild1
X=12
Y=40
W=30
H=30
LeftMouseUpAction=["#vPath#\[&mNameChild1]"]

...

[MeterName1]
Meter=String
MeterStyle=styleLeftText
MeasureName=mNameChild1
X=50
Y=40
W=(#vWidth#-5)
H=30
LeftMouseUpAction=["#vPath#\[&mNameChild1]"]
DynamicVariables=1
Obviously here is just an example for the first index. Follow the same rule for all eight measures and meter pairs.
User avatar
Judian81
Posts: 148
Joined: May 6th, 2021, 2:57 pm

Re: Windows Shortcuts

Post by Judian81 »

balala wrote: December 3rd, 2021, 6:30 pm This is caused by the fact that, as you intuited, in the [mNameChildX] FileView plugin measures you've removed the .lnk extensions
thank you very much. in future i will post code before i ask questions.

Code: Select all

removed the code because it is not important anymore. updated version is in main post.
i had changed the code already to something like this.
but the question remains. when i just click on mName1 the program will be started if it is a lnk file. but not if it is a url.

Code: Select all

removed the code because it is not important anymore. updated version is in main post.
this thing is the first way is to not show an extention at all. and the second is to use every extention in background.
Last edited by Judian81 on December 4th, 2021, 11:23 pm, edited 1 time in total.
windows 10
User avatar
balala
Rainmeter Sage
Posts: 14347
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Windows Shortcuts

Post by balala »

Judian81 wrote: December 3rd, 2021, 8:43 pm thank you very much. in future i will post code before i ask questions.
I'm sorry, but can't follow. None of the above posted [mFolder], [mFolderExtension], [mNameExtension1] or [mName1] measures, or nor the [tName1] meter doesn't exist in the code which I have. I suppose you've modified a lot of thing in your code, so probably you should upload a new package, or at least post the whole code, not just parts of it.
User avatar
Judian81
Posts: 148
Joined: May 6th, 2021, 2:57 pm

Re: Windows Shortcuts

Post by Judian81 »

balala wrote: December 3rd, 2021, 9:55 pmso probably you should upload a new package, or at least post the whole code, not just parts of it.
thanks. i have done it. creating a new package.
windows 10