The below is an excerpt from another skin. I identified it as the cause of a crash loop. I have no idea why it causes a crash. It seems to affect slower machines more than others. If it does not cause a crash immediately on load, try looking at it its values in the About pane. For some reason viewing its values in the About pane triggers a crash if it doesn't crash on startup.
The RunCommand does not need to be run. The measure just needs to exist in the ini to cause a crash loop.
Cariboudjan wrote: ↑December 3rd, 2020, 4:31 pm
I have no idea why it causes a crash.
Due to the substitution, specifically to the last ("([^\\]*$)":"") substitution.
To be honest I can!t realiye what zour intention with that substitution was, so not sure how to fix it. What did you want to do?
Note: With RegExpSubstitute, a (capture) may not return an empty string. Care should be taken when using * (zero or more) quantifiers or (?(?= (If/Then) lookahead tests, as a capture must either cause the entire regular expression to "fail", or return a value of some kind.
Cariboudjan wrote: ↑December 3rd, 2020, 6:02 pm
Remove everything after the initial line, including line breaks, since the command line gives multiple results.
What about this substitution: Substitute="ExecutablePath=(.*)\n.*":"\1","\n":""?
But adding "(?<=exe)(?s)(.*$)":"" worked to remove everything after the first .exe.
And yeah, "([^\\]*$)":"" was to remove everything after the last backslash. So I can get the folder location of the application (eg. turn C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe into C:\Program Files (x86)\Microsoft\Edge\Application\)
Cariboudjan wrote: ↑December 3rd, 2020, 7:10 pm
Doesn't work. Returns this for msedge.exe
I'm surprised it does return so many strings, because for me it returns only one line, even if I modified the LastFocusedIM variable to LastFocusedIM=msedge.exe (what I guess you mean by "for msedge.exe").
It's alright. I modified it. I have it almost going now. I just need to find a way to remove everything after the last backslash without crashing Rainmeter again.
eg. Change C:\Windows\Explorer.exe to C:\Windows\
I used this before, but this crashes Rainmeter for a reason I still don't fully understand. I assume because when the skin first loads, it contains no value, and therefor there is no "\" to find or anything after it. Still though. Why does this crash Rainmeter? Why doesn't it just fail?
Screenshot 2020-12-03 123130.png
Tried changing it to this. It doesn't crash Rainmeter, but it also doesn't do anything in Rainmeter, even though it works in the regex101 test.
Screenshot 2020-12-03 124409.png
You do not have the required permissions to view the files attached to this post.