It is currently May 3rd, 2024, 3:04 am

Nesting square brackets in actions

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Nesting square brackets in actions

Post by jsmorley »

balala wrote:jsmorley miswrote the section name in the !WriteKeyValue bang. That bang correctly is [!WriteKeyValue Variable[color=#FF0000]s[/color] RCI "[LNK1]"], as the appropriate section name is [Variables], not [Variable].
This happens sometimes to all of us, I think. Otherwise what he said, is all right.
Yes, I just copy / pasted what he had, and didn't catch that until a post later... ;-)
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: Nesting square brackets in actions

Post by Honimoura »

I do not understand why it does not work ....
I tried it:

Code: Select all

[Rainmeter]
Update=1000
AccurateText = 1

[Variables]



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

[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
OnUpdateAction=[!SetVariable RCI "[LNK1]"]
Dont work.

I thought the problem may be that [LNK1] does not return a result. So I did:

Code: Select all

[Rainmeter]
Update=1000
AccurateText = 1

[Variables]



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

[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
OnUpdateAction=[!SetVariable RCI "blabla"]
But dont work too

[Variales] stay empty, sorry
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Nesting square brackets in actions

Post by jsmorley »

No, it doesn't...

The problem you are having is the difference between "setting" a variable in memory, !SetVariable, and "writing" a variable physically to the skin .ini file, !WriteKeyValue.

Trust me, the variable is being created and can be used in your skin while it is running. It just won't be "saved" if you refresh or unload the skin, but you don't need that, it's created every time anyway.

You can see the variable when it is just created in memory by looking at About / Skins.
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: Nesting square brackets in actions

Post by Honimoura »

wait ... RCI Variable is created but not in this file ... :17what
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Nesting square brackets in actions

Post by jsmorley »

Honimoura wrote:wait ... RCI Variable is created but not in this file ... :17what
You don't need it to be physically written to the file.
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: Nesting square brackets in actions

Post by Honimoura »

This file.ini is @include in another, and !writekey have create the RCI Variable in another ...
User avatar
balala
Rainmeter Sage
Posts: 16195
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Nesting square brackets in actions

Post by balala »

Honimoura wrote:wait ... RCI Variable is created but not in this file ... :17what
But where? Because as jsmorley said, the !SetVariable bang doesn't write the variable nowhere, just sets it dynamically.
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: Nesting square brackets in actions

Post by Honimoura »

with [!WriteKeyValue] i think, before.
But if it's doesn't write the variable ... how do i know if it works?
I cant have :

[Variables]
RCI=Blabla

Like that in another .ini i can do

Text=#RCI#
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: Nesting square brackets in actions

Post by Honimoura »

Infect what I'm trying to do is in:

ScanLNK.ini

Code: Select all

[Rainmeter]
Update=1000
AccurateText = 1

[Variables]
RCI=blabla


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

[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
OnUpdateAction=[!SetVariable RCI "blabla" ]
Menu.ini

Code: Select all

[Rainmeter]
Update=1000
AccurateText = 1

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

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

[MeterTest]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=[#Dossier][#RCI][#LNK]

As ScanLNK.ini does the scan and save the result (s) in variables.
Then Menu.ini retrieves these results in the variables to display the result
(I'm really trying to use these variables to find out how it works)
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: Nesting square brackets in actions

Post by Honimoura »

And if I use anyway! Writekeyvalue but giving him at the end the famous # currentpath # (if it's good to tell him to write in this file) it's good or ?