It is currently March 28th, 2024, 10:55 pm

Bang ins't being executed when I change the installation path of an app.

Report bugs with the Rainmeter application and suggest features.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Bang ins't being executed when I change the installation path of an app.

Post by kyriakos876 »

I have a dock that one of it's button is to open Photoshop. Everything was working fine until I reinstalled Photoshop on my other Hard-drive. So, I install it and change the code from

Code: Select all

LeftMouseUpAction="C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Photoshop.exe"

Code: Select all

LeftMouseUpAction="E:\Installed Programs\Adobe\Adobe Photoshop CS6 (64 Bit)\Photoshop.exe"
I, then, changed the installation path of another app to see if I missed something in my code, but it seems that whatever I installed on the E: Hard-drive simply wouldn't open. Any suggestions ? Thanks.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Bang ins't being executed when I change the installation path of an app.

Post by jsmorley »

Go find the executable for Photoshop in Windows Explorer.

Hold down Shift and right click the file.

Select "Copy as path" from the context menu.

Paste the result here.
"C:\Program Files\Adobe\Adobe Photoshop CC 2015\Photoshop.exe"
Do NOT manually type it in, or put what you THINK it is... ;-)
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Bang ins't being executed when I change the installation path of an app.

Post by kyriakos876 »

jsmorley wrote:Go find the executable for Photoshop in Windows Explorer.

Hold down Shift and right click the file.

Select "Copy as path" from the context menu.

Paste the result here.



Do NOT manually type it in, or put what you THINK it is... ;-)
Oh no, I've had many bad experiences by manually typing paths in general.. I always copy and paste since then. This doesn't seem to be the case here :/ It's the correct path, yet it won't work.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Bang ins't being executed when I change the installation path of an app.

Post by jsmorley »

I see the problem...

You MUST enclose executable commands in square brackets [] in a mouse action.

LeftMouseUpAction=["C:\Program Files\Adobe\Adobe Photoshop CC 2015\Photoshop.exe"]

Not

LeftMouseUpAction="C:\Program Files\Adobe\Adobe Photoshop CC 2015\Photoshop.exe"

If you don't, then Rainmeter will throw away the starting and ending "quotes", and the spaces in the command line will then cause Windows to not be able to find the file.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Bang ins't being executed when I change the installation path of an app.

Post by kyriakos876 »

jsmorley wrote:I see the problem...

You MUST enclose executable commands in square brackets [] in a mouse action.

LeftMouseUpAction=["C:\Program Files\Adobe\Adobe Photoshop CC 2015\Photoshop.exe"]

Not

LeftMouseUpAction="C:\Program Files\Adobe\Adobe Photoshop CC 2015\Photoshop.exe"
Oh.... well that was easy... I find it weird how I didn't need the brackets when the programs are installed in the main Hard-drive. Thanks ^_^
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Bang ins't being executed when I change the installation path of an app.

Post by jsmorley »

kyriakos876 wrote:Oh.... well that was easy... I find it weird how I didn't need the brackets when the programs are installed in the main Hard-drive. Thanks ^_^
Sure thing. I resist that it worked without the [] on your C: drive, as it doesn't for me. But in any case you ALWAYS want to enclose bangs in [square brackets]. While there are times things will work without them, it's just a good habit to get into.

No... Even though it works:
LeftMouseUpAction=!Refresh

Yes...
LeftMouseUpAction=[!Refresh]
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Bang ins't being executed when I change the installation path of an app.

Post by kyriakos876 »

jsmorley wrote:Sure thing. I resist that it worked without the [] on your C: drive, as it doesn't for me. But in any case you ALWAYS want to enclose bangs in [square brackets]. While there are times things will work without them, it's just a good habit to get into.

No... Even though it works:
LeftMouseUpAction=!Refresh

Yes...
LeftMouseUpAction=[!Refresh]
I'm gonna do that from now on :)