It is currently April 25th, 2024, 10:44 am

[Solved] Any way to retrieve Rainmeter's selected editor's path?

Get help with creating, editing & fixing problems with skins
User avatar
MetalTxus
Posts: 46
Joined: October 19th, 2016, 9:03 pm
Location: Spain

[Solved] Any way to retrieve Rainmeter's selected editor's path?

Post by MetalTxus »

I'm currently using

Code: Select all

!Execute [%windir%\system32\notepad.exe "#FILEPATH#"]
...in context menus to open text files but Window's default editor is quite limitted on features.
I'd rather use Rainmeter's selected editor but I'm not sure that's a possibility so I'd like to know if anyone knows a way to do this.
Last edited by MetalTxus on April 28th, 2018, 3:12 pm, edited 1 time in total.
Image
• GitHub | • DeviantArt
OS: W10 x64 / GPU: GTX 1050 Ti / CPU: i3-4160 / RAM: 8GB
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Any way to retrieve Rainmeter's selected editor's path?

Post by jsmorley »

MetalTxus wrote:I'm currently using

Code: Select all

!Execute [%windir%\system32\notepad.exe "#FILEPATH#"]
...in context menus to open text files but Window's default editor is quite limitted on features.
I'd rather use Rainmeter's selected editor but I'm not sure that's a possibility so I'd like to know if anyone knows a way to do this.
https://docs.rainmeter.net/manual/variables/built-in-variables/#CONFIGEDITOR

LeftMouseUpAction=["#CONFIGEDITOR#" "#FilePath#"]

P.S. don't use !Execute, it is deprecated and not needed.

https://docs.rainmeter.net/manual/bangs/#Deprecated
User avatar
MetalTxus
Posts: 46
Joined: October 19th, 2016, 9:03 pm
Location: Spain

Re: Any way to retrieve Rainmeter's selected editor's path?

Post by MetalTxus »

jsmorley wrote:https://docs.rainmeter.net/manual/variables/built-in-variables/#CONFIGEDITOR

LeftMouseUpAction=["#CONFIGEDITOR#" "#FilePath#"]

P.S. don't use !Execute, it is deprecated and not needed.

https://docs.rainmeter.net/manual/bangs/#Deprecated
I've tried that but I can't seem to get it working. The editor is properly set up, as it opens when using the program's "Edit skin" context menu option. It doesn't trigger anything or throw any output to the log when used on a skin, though.

Code: Select all

[Rainmeter]
Update = -1
ContextTitle = Setup Games
ContextAction = ["#CONFIGEDITOR#" "#CURRENTPATH#\gamePaths.inc"]
ContextTitle2 = ----
ContextTitle3 = Refresh skin
ContextAction3 = !Refresh
ContextTitle4 = ----
ContextTitle5 = Skin settings
ContextAction5 = [!SkinMenu]
RightMouseUpAction = [!SkinCustomMenu]
P.S. Noted and removed.

Edit: This is my editor's path, in case it matters:
Z:\Software\_development\Sublime Text 3\sublime_text.exe
Image
• GitHub | • DeviantArt
OS: W10 x64 / GPU: GTX 1050 Ti / CPU: i3-4160 / RAM: 8GB
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Any way to retrieve Rainmeter's selected editor's path?

Post by jsmorley »

If you use "Edit settings" from the Rainmeter context menu, what do you have as ConfigEditor in Rainmeter.ini?
1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
MetalTxus
Posts: 46
Joined: October 19th, 2016, 9:03 pm
Location: Spain

Re: Any way to retrieve Rainmeter's selected editor's path?

Post by MetalTxus »

Code: Select all

[Rainmeter]
Language=1033
Logging=0
ConfigEditor=Z:\Software\_development\Sublime Text 3\sublime_text.exe
UseD2D=1
DisableDragging=0
Image
• GitHub | • DeviantArt
OS: W10 x64 / GPU: GTX 1050 Ti / CPU: i3-4160 / RAM: 8GB
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Any way to retrieve Rainmeter's selected editor's path?

Post by jsmorley »

MetalTxus wrote:

Code: Select all

[Rainmeter]
Language=1033
Logging=0
ConfigEditor=Z:\Software\_development\Sublime Text 3\sublime_text.exe
UseD2D=1
DisableDragging=0
Well it all looks right. I don't know Sublime Text 3 really, are you quite sure that

"Z:\Software\_development\Sublime Text 3\sublime_text.exe" "C:\SomeFolder\SomeFile.txt"

Works with it from the cmd.exe command line?
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Any way to retrieve Rainmeter's selected editor's path?

Post by jsmorley »

Yeah, it does...

I'm not sure. This is working fine for me..

Rainmeter.ini:

Code: Select all

[Rainmeter]
SkinPath=C:\Users\Jeffrey\Documents\Rainmeter\Skins\
;ConfigEditor=C:\Program Files (x86)\Notepad++\Notepad++.exe
ConfigEditor=C:\Program Files\Sublime Text 3\sublime_text.exe
DisableVersionCheck=0
Logging=0
Debug=0
DisableDragging=0
Language=1033
Skin:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
ContextTitle=Setup Games
ContextAction=["#CONFIGEDITOR#" "#CURRENTPATH##CURRENTFILE#"]

[MeterOne]
Meter=String
W=100
H=100
SolidColor=0,0,0,255
While you have an extra "\" in your "#CURRENTPATH#\gamePaths.inc" string, that shouldn't matter. Even though #CURRENTPATH# already has the trailing "\" on it, Rainmeter should ignore that.

So I'm kinda stumped...
User avatar
MetalTxus
Posts: 46
Joined: October 19th, 2016, 9:03 pm
Location: Spain

Re: Any way to retrieve Rainmeter's selected editor's path?

Post by MetalTxus »

I can't use #CURRENTPATH##CURRENTFILE# as the file to edit is not the same as the one triggering the event. I tried it anyway and it wasn't working either.
I also tried removing the extra backslash but nothing changed.

Edit: Everything works as it should replacing #CURRENTPATH# with notepad.exe so my guess remains that something's wrong with my editor's path.

Edit2: I've tried your skin and I'm getting the same issue, even after moving my editor to a location without weird characters.
Last edited by MetalTxus on April 28th, 2018, 3:32 pm, edited 2 times in total.
Image
• GitHub | • DeviantArt
OS: W10 x64 / GPU: GTX 1050 Ti / CPU: i3-4160 / RAM: 8GB
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Any way to retrieve Rainmeter's selected editor's path?

Post by jsmorley »

MetalTxus wrote:Here's my whole skin. The context menu logic is located at
"\PC\Games list\gamesListCore.inc"

I can't use #CURRENTPATH##CURRENTFILE# as the file to edit is not the same as the one triggering the event. I tried it anyway and it wasn't working either.
I also tried removing the extra backslash but nothing changed.

Edit: Everything works as it should replacing #CURRENTPATH# with notepad.exe so my guess remains that something's wrong with my editor's path.
Yeah, I would check to see that Sublime Text 3 is not set to run "As administrator" or something.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Any way to retrieve Rainmeter's selected editor's path?

Post by jsmorley »

What version of Rainmeter are you on?