It is currently March 28th, 2024, 9:02 pm

Strange issue in path

Get help with creating, editing & fixing problems with skins
User avatar
rbriddickk84
Rainmeter Sage
Posts: 276
Joined: February 17th, 2014, 12:39 pm
Location: Hungary

Strange issue in path

Post by rbriddickk84 »

Greetings!

I am experiencing some strange issue with code. I try to use Shortcut to launch programs, and i downloaded a skin from DevianArt. (Icon Dock)
I just wanted to start building faster, that's why i was started from an existing skin. And when i was editing the Mouse Actions, i saw that there is an extra " in the code:

LeftMouseUpAction="#@#\Shortcuts\#Sc01#.lnk

So i removed it, and nothing works after that. So i decided to add one in the beginning, and also to the end to look like this:

LeftMouseUpAction="#@#\Shortcuts\#Sc02#.lnk"

Still not works! So i started to wandering about this phenomenon. After i putted back one " in the beginning, it started to work again. I cannot understand how and why is this happening!


On the other hand, i tried to make another small skin, which would launch only one program through a shortcut. But in that second skin don't want to execute the shortcut, no matter what. I tried so many ways!

Here is my code:

Code: Select all


[Rainmeter]
Update=1000
AccurateText=1

[MeterBack]
Meter=Shape
Shape=Rectangle 0,0,30,30 | Fill Color 30,30,255,145
X=0
Y=0
LeftMouseDownAction=#@#\Shortcut\Convert.lnk
UpdateDivider=-1

User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Strange issue in path

Post by jsmorley »

Always put command execution bangs in [square brackets].

LeftMouseUpAction=["#@#\Shortcuts\#Sc01#.lnk"]

The quotes are needed in case there are spaces in the folder defined by #@# or in the shortcut file name in #Sc01#. However, without the square brackets, since any starting and end quotes on options are thrown away by Rainmeter, it won't work right.
User avatar
rbriddickk84
Rainmeter Sage
Posts: 276
Joined: February 17th, 2014, 12:39 pm
Location: Hungary

Re: Strange issue in path

Post by rbriddickk84 »

jsmorley wrote:Always put command execution bangs in [square brackets].

LeftMouseUpAction=["#@#\Shortcuts\#Sc01#.lnk"]

The quotes are needed in case there are spaces in the folder defined by #@# or in the shortcut file name in #Sc01#. However, without the square brackets, since any starting and end quotes on options are thrown away by Rainmeter, it won't work right.
Thank you very much for your help! :)

In the first case it's worked! But in the single program launcher it's not working.
I changed the code to

LeftMouseUpAction=["#@#\Shortcut\Convert.lnk"]

No effect. The shortcut is in:

\@Resources\Shortcut\Convert.lnk

Do i missing something?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Strange issue in path

Post by jsmorley »

rbriddickk84 wrote:Thank you very much for your help! :)

In the first case it's worked! But in the single program launcher it's not working.
I changed the code to

LeftMouseUpAction=["#@#\Shortcut\Convert.lnk"]

No effect. The shortcut is in:

\@Resources\Shortcut\Convert.lnk

Do i missing something?
Don't see anything. What do you get in About / Log if you use:

LeftMouseUpAction=[!Log "#@#\Shortcut\Convert.lnk"]["#@#\Shortcut\Convert.lnk"]

Make SURE that where you have Convert.lnk is really where Rainmeter thinks the root config folder and the @Resources subfolder is...
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Strange issue in path

Post by jsmorley »

jsmorley wrote:Don't see anything. What do you get in About / Log if you use:

LeftMouseUpAction=[!Log "#@#\Shortcut\Convert.lnk"]["#@#\Shortcut\Convert.lnk"]

Make SURE that where you have Convert.lnk is really where Rainmeter thinks the root config folder and the @Resources subfolder is...
One thing you might correct. #@# already has a trailing "\" on it. Don't put a second one...

Bad:
LeftMouseUpAction=["#@#\Shortcut\Convert.lnk"]

Good:
LeftMouseUpAction=["#@#Shortcut\Convert.lnk"]

While Rainmeter is fine with extra "\" chars, Windows is likely not as forgiving...

So "Rainmeter Says":

1) Always enclose command bangs in [square brackets]
2) ANY built-in path variable defined in Rainmeter will include a trailing "\"
User avatar
rbriddickk84
Rainmeter Sage
Posts: 276
Joined: February 17th, 2014, 12:39 pm
Location: Hungary

Re: Strange issue in path

Post by rbriddickk84 »

jsmorley wrote:Don't see anything. What do you get in About / Log if you use:

LeftMouseUpAction=[!Log "#@#\Shortcut\Convert.lnk"]["#@#\Shortcut\Convert.lnk"]

Make SURE that where you have Convert.lnk is really where Rainmeter thinks the root config folder and the @Resources subfolder is...
Ah yes :)
I forgot about logging :)
Also just had the thought about this, because i my skin structure is this:

Main Skin Folder/SubFolder1/SubFolder2/Launcher Skin.ini
so i made a @Resources folder in the SubFolder2, because i thought that the #@# will linking to that! :handtohead:

Thank you so much for your help!!!! :)
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Strange issue in path

Post by jsmorley »

rbriddickk84 wrote:Ah yes :)
I forgot about logging :)
Also just had the thought about this, because i my skin structure is this:

Main Skin Folder/SubFolder1/SubFolder2/Launcher Skin.ini
so i made a @Resources folder in the SubFolder2, because i thought that the #@# will linking to that! :handtohead:

Thank you so much for your help!!!! :)
Ok, so...

So "Rainmeter Says":

1) Always enclose command bangs in [square brackets]
2) ANY built-in path variable defined in Rainmeter will include a trailing "\"
3) Understand the meaning of "root config", it's important!

;-)
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Strange issue in path

Post by jsmorley »

BTW, not to harp on this but...

Just get in the habit of ALWAYS enclosing bangs in [square brackets]. While if you have only one bang in a particular "action" option, and there are no spaces in what you are doing, you don't strictly need them, it just doesn't make sense to have to worry about whether they are needed or not. Just use them. They are free...

Bad habit:
LeftMouseUpAction=!Refresh

Good habit:
LeftMouseUpAction=[!Refresh]
User avatar
rbriddickk84
Rainmeter Sage
Posts: 276
Joined: February 17th, 2014, 12:39 pm
Location: Hungary

Re: Strange issue in path

Post by rbriddickk84 »

jsmorley wrote:Ok, so...

So "Rainmeter Says":

1) Always enclose command bangs in [square brackets]
2) ANY built-in path variable defined in Rainmeter will include a trailing "\"
3) Understand the meaning of "root config", it's important!

;-)
Okay :) Thanks ;)

Well, i modified my code to this:

LeftMouseUpAction=[!Log "#CURRENTCONFIG#Shortcut\Convert.lnk"]

and i've got this in the log: AstroTech4\Raingame\DockLauncherShortcut\Convert.lnk

so i saw that it doesn't have an extra \, i changed the code to this:

LeftMouseUpAction=[!Log "#CURRENTCONFIG#\Shortcut\Convert.lnk"]

After this modification i've got the correct route to the shortcut, so i removed the "!Log" from the code.

Still not working. Triple checked everything.

LeftMouseUpAction=["#CURRENTCONFIG#Shortcut\Convert.lnk"]


(Okay, i am using always sbrackets, just saw it in that skin i downloaded, it gave me wrong ideas :D )
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Strange issue in path

Post by jsmorley »

rbriddickk84 wrote:Okay :) Thanks ;)

Well, i modified my code to this:

LeftMouseUpAction=[!Log "#CURRENTCONFIG#Shortcut\Convert.lnk"]

and i've got this in the log: AstroTech4\Raingame\DockLauncherShortcut\Convert.lnk

so i saw that it doesn't have an extra \, i changed the code to this:

LeftMouseUpAction=[!Log "#CURRENTCONFIG#\Shortcut\Convert.lnk"]

After this modification i've got the correct route to the shortcut, so i removed the "!Log" from the code.

Still not working. Triple checked everything.

LeftMouseUpAction=["#CURRENTCONFIG#Shortcut\Convert.lnk"]


(Okay, i am using always sbrackets, just saw it in that skin i downloaded, it gave me wrong ideas :D )
No, #CURRENTCONFIG# is NOT a "path", relative or otherwise. It's the name of the config.

https://docs.rainmeter.net/manual/variables/built-in-variables/#SkinVariables