Hi there friendly people!
Okay, well i tried many ways to avoid the issue, like:
(When i want to add Winamp for e.g.: C:\Program Files (x86)\Winamp\winamp.exe)
[!WriteKeyValue Variables "PrgPth1" "#AplicNew1#" "Pref.inc"] - Came with error: !WriteKeyValue: Illegal path:C:\Program
[!WriteKeyValue Variables PrgPth1 "#AplicNew1#" "Pref.inc"] - Came with error: !WriteKeyValue: Illegal path:C:\Program
[!WriteKeyValue Variables PrgPth1 #AplicNew1# "Pref.inc"] - Came with error: !WriteKeyValue: File not found: ...Skins\Controllet22\AppLauncher\Files
Yet with the RegExp method what Yincognito suggested worked at that point that it saves everything without an error.
Now i am at work, and on my laptop, so different gear. And strangely without quotes it still saves the path too, but it generates error message in log
Yincognito wrote: ↑July 25th, 2022, 8:41 pm
Well, if you didn't yet go to sleep, here is one way of doing it - change your TextComparator1 and similar measures to something like:
The regex in the substitute will eliminate the square brackets, and the current section use when setting the variable will make sure the just modified measure value is set as the value of the "new" variables, instead of the unmodified #AppN# value. Feel free to adapt this or put it wherever you actually want, because there are a lot of more or less duplicate stuff in your skin, and I'm not gonna decipher which is which now, LOL.
Obviously, make sure that when you load those values back after a refresh or whatever, you use the appropriate number of quotes to deal with spaces, i.e. [blah blah blah "#AplicNew1#"]
and so on. I'm saying this because you claimed you added the required quotes, but your Sorter measure still uses the unquoted #AplicNew1# and such syntax!
So then i tried this as well, it did the trick in some way.
So i keep this in my pocket till i completely understand what causes the problem.
I was thinking if this acts differently here on my laptop, i try my first basic intention with the FileChoose plugin command iteself, like:
Code: Select all
Command1=[!WriteKeyValue Variables PrgPth1 """$[Path]$""" "Pref.inc"][!WriteKeyValue Variables PrgNm1 "$Name$" "Pref.inc"][!WriteKeyValue Variables PrgIco1 "$Icon$" "Pref.inc"][!Refresh]
Super weirdly it is working here without any issues.
This was the ever first way i tried to make the plugin work at home, but it produced the error right away and didn't do today did.
I will bring home this file when i am done here, and trying on my pc. So weird. I don't understand really.
balala wrote: ↑July 25th, 2022, 8:55 pm
This definitely is a missing quotes problem, as previously said. And you don't have the quotes, at least not in the code of the posted package. The !SetVariable: Skin "Files\Rainmeter\Rainmeter.exe]" not found (AppLauncher\AutoL.ini)
error message (which I got when wanted to add Rainmeter, just for a tryout) definitely indicates this. When you're using a path which contains space(s) and have no quotes, Rainmeter thinks the value which has to be set is starting from the beginning, until the first space. What is following the first space should represent the next parameter (in this case the file in which the value should be written). If you add the quotes, you tell Rainmeter that the value is what you have between the quotes. Issue avoided.
So recommend you to add quotes everywhere to the value which has to be set with bangs, to file paths, config names and so on. For instance the first !WriteKeyValue bang of the Command1 option of the [Sorter] InputText plugin measure should be: Command1=[!WriteKeyValue Variables PrgPth1 "#AplicNew1#" "Pref.inc"]
. But you have to do this in every bang of your code.
Generally speaking it would be extremely important to get understanding why those quotes are needed. Using them every time it should have been used, forms a habit of using them, avoiding the possibility of forgetting them. This is the best practice, which always should be used by every user.
I will surely spread quotes where i just can in the feature
I will test this at home, but untill the i thank you guys very much for your great help and time!!!!