It is currently May 6th, 2024, 2:58 pm

Nesting square brackets in actions

Get help with creating, editing & fixing problems with skins
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: Nesting square brackets in actions

Post by Honimoura »

That is my code for this picture:

Code: Select all

[Image01]
Meter=Image
MeasureName=#Raccourci1#
MeasureName2=EXT1
ImageName="C:\Users\Honimoura\Documents\Rainmeter\Skins\Honimoura\@Resources\Jaquettes\%1%2"
x=0r
y=0r
h=150
w=400
LeftMouseUpAction=["[#Dossier][#Raccourci1][#LNK]"]
DynamicVariables = 1
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: Nesting square brackets in actions

Post by Honimoura »

Ho my god !
So sorry, it's me ...
#Raccourci# dont give me the name but the extension too ...

I'm so sorry, your code is good.
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: Nesting square brackets in actions

Post by Honimoura »

Thx for your help, and really, excuse me ...
User avatar
balala
Rainmeter Sage
Posts: 16201
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Nesting square brackets in actions

Post by balala »

Honimoura wrote:That is my code for this picture:
Take care to refer to the @Resources folder of the current config, not with its whole path, but with the #@# variable.
Replace the ImageName="C:\Users\Honimoura\Documents\Rainmeter\Skins\Honimoura\@Resources\Jaquettes\%1%2" option with: ImageName=#@#Jaquettes\%1%2. I also removed the not needed quotations (however using the %1 and %2 signs in such circumstance is weird).
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: Nesting square brackets in actions

Post by Honimoura »

Yes I tested with the full path to avoid bugs errors and yet I did not escape ^^

For the : "%1%2"

It is to be able to create several icons of the same kind later in the same .ini and thus only to change the "measure" of references without having to change the names for each images
And if i change the folder's pictures, dont need to change the code
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: Nesting square brackets in actions

Post by Honimoura »

To fully understand this is what I actually do :


Shortcut.ini

Code: Select all

[Variables]
Raccourci1=LNK1
Raccourci2=LNK2
Raccourci3=LNK3

[MeasureFolderLNK]
Measure=Plugin
Plugin=FileView1
Path="C:\Users\Honimoura\Documents\Raccourcis\Games"
ShowDotDot=0
ShowFolder=0
Count=14
HideExtensions=1

[LNK1]
Measure=Plugin
Plugin=FileView1
Path=[MeasureFolderLNK]
Type=FileName
Index=1

[LNK2]
Measure=Plugin
Plugin=FileView1
Path=[MeasureFolderLNK]
Type=FileName
Index=2

[LNK3]
Measure=Plugin
Plugin=FileView1
Path=[MeasureFolderLNK]
Type=FileName
Index=3
Menu.ini

Code: Select all

[Rainmeter]
Update=1000
AccurateText = 1

[Variables]
@include=ScanLNK.ini
@include2=ScanIMG.ini

Dossier="C:\Users\Honimoura\Documents\Raccourcis\Games\"
LNK=.lnk

Image1=IMG1
Image2=IMG2
Image3=IMG3

---------------------------------------------

[MeasureFolderIMG]
Measure=Plugin
Plugin=FileView2
Path="C:\Users\Honimoura\Documents\Rainmeter\Skins\Honimoura\@Resources\Jaquettes"
ShowDotDot=0
ShowFolder=0
Count=14
HideExtensions=1

[IMG1]
Measure=Plugin
Plugin=FileView2
Path=[MeasureFolderIMG]
Type=FileName
Index=1

[IMG2]
Measure=Plugin
Plugin=FileView2
Path=[MeasureFolderIMG]
Type=FileName
Index=2

[IMG3]
Measure=Plugin
Plugin=FileView2
Path=[MeasureFolderIMG]
Type=FileName
Index=3

----------------------------------------------------------

[MeasureFolderEXTIMG]
Measure=Plugin
Plugin=FileView3
Path="C:\Users\Honimoura\Documents\Rainmeter\Skins\Honimoura\@Resources\Jaquettes"
ShowDotDot=0
ShowFolder=0
Count=14


[CalculeLNKtoEXTIMG1]
Measure=Plugin
Plugin=FileView3
Path=[MeasureFolderEXTIMG]
Type=FileName
Index=1
IfMatch=.*jpg.*
IfMatchAction=[!SetOption EXT1 String ".jpg"]
IfMatch2=.*jpeg.*
IfMatchAction2=[!SetOption EXT1 String ".jpeg"]
IfMatch3=.*png.*
IfMatchAction3=[!SetOption EXT1 String ".png"]
IfMatchMode=1
DynamicVariables=1

[CalculeLNKtoEXTIMG2]
Measure=Plugin
Plugin=FileView3
Path=[MeasureFolderEXTIMG]
Type=FileName
Index=2
IfMatch=.*jpg.*
IfMatchAction=[!SetOption EXT2 String ".jpg"]
IfMatch2=.*jpeg.*
IfMatchAction2=[!SetOption EXT2 String ".jpeg"]
IfMatch3=.*png.*
IfMatchAction3=[!SetOption EXT2 String ".png"]
IfMatchMode=1
DynamicVariables=1

[CalculeLNKtoEXTIMG3]
Measure=Plugin
Plugin=FileView3
Path=[MeasureFolderEXTIMG]
Type=FileName
Index=3
IfMatch=.*jpg.*
IfMatchAction=[!SetOption EXT3 String ".jpg"]
IfMatch2=.*jpeg.*
IfMatchAction2=[!SetOption EXT3 String ".jpeg"]
IfMatch3=.*png.*
IfMatchAction3=[!SetOption EXT3 String ".png"]

--------------------------------------------------------------------

[EXT1]
Measure=String

[EXT2]
Measure=String

[EXT3]
Measure=String

------------------------------------------------------------------------

[Test]
Meter=Image
MeasureName=IMG1
ImageName=[[#Dossier]%1[EXT1]]
x=0
y=50
h=150
w=400
/LeftMouseUpAction=["[#Dossier]%1[#lnk]"]


Of course it is not very clean, I still have to store each "fileview" in an .ini file, include them in the menu.ini and then it will be better to refine the code. ^^

I also know that it is possible to do more simple with the "substitutes" but I do not understand anything: s

So I'm doing this with my knowledge, once I got there I could try something more sharp
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: Nesting square brackets in actions

Post by Honimoura »

But i think : Image=IMG is rong, it's Image=[IMG] or some else ...

but I have not yet tried with the variable call of another file ...
Once I have managed to make everything work in one file I could tidy up and refine all that.
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: Nesting square brackets in actions

Post by Honimoura »

In fact I make a button that, once clicked, opens a menu with the list, in the form of images, all my games that once clicked launches the game in question.
In the idea not very complicated but once started the problems accumulate
User avatar
balala
Rainmeter Sage
Posts: 16201
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Nesting square brackets in actions

Post by balala »

Ok, please pack the whole root config (the first folder under the Skins folder), which contains the skin(s) and upload it. Would be much easier to check.
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: Nesting square brackets in actions

Post by Honimoura »

ho no no thx, i want to try this. it was just to explain the purpose. But thanks for the intention.