It is currently March 29th, 2024, 12:04 pm
How to make the ContextAction open a file (or an .ini) in a text editor
-
- Posts: 114
- Joined: November 15th, 2021, 1:47 am
- Location: Brazil
How to make the ContextAction open a file (or an .ini) in a text editor
I was making my skin with a custom context menu, and I wanted to add some options like editing the skin or it opening a .ini but I didn't find any way to do it is there any way to do that?
;===========================================Rafamear=================================================
;========================= ========== My DeviantArt ========== ==============================
;========================= ========== My DeviantArt ========== ==============================
-
- Posts: 109
- Joined: February 23rd, 2018, 3:12 am
- Location: United States
Re: How to make the ContextAction open a file (or an .ini) in a text editor
Hi Rafamear,
My context menu looks like this: Code is here:
---- More Actions ---- opens the regular context menu
My context menu looks like this: Code is here:
Code: Select all
RightMouseUpAction=[!SkinCustomMenu]
ContextTitle=Drop Top Settings Menu
ContextAction=[!ActivateConfig "#ROOTCONFIG#" "Settings.ini"]
ContextTitle2=----
ContextAction2=[]
ContextTitle3=Edit Global Variables
ContextAction3=["#@#\IncludeFiles\GlobalVariables.inc"]
ContextTitle4=Edit #CURRENTFILE#
ContextAction4=["#CONFIGEDITOR#" "#CURRENTPATH##CURRENTFILE#"]
ContextTitle5=----
ContextAction5=[]
ContextTitle6=Open @Resources Folder
ContextAction6=["#@#"]
ContextTitle7=Open Include Files Folder
ContextAction7=["#@#\IncludeFiles"]
ContextTitle8=----
ContextAction8=[]
ContextTitle9=Manage "#CURRENTFILE#"
ContextAction9=[!Manage Skins "#CURRENTCONFIG#" "#CURRENTFILE#"]
ContextTitle10=Refresh Skin
ContextAction10=[!Refresh]
ContextTitle11=---
ContextAction11=[]
ContextTitle12=- - - - More actions - - - -
ContextAction12=[!SkinMenu]
ContextTitle13=---
ContextAction13=[]
You do not have the required permissions to view the files attached to this post.
Never underestimate the power of stupid!
-
- Posts: 1363
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: How to make the ContextAction open a file (or an .ini) in a text editor
There is also a way to have a skin specific file associated with the context menu.
Courtesy of Active Colors:
It goes in the meter associated with a skin area, such as a clickable area image etc.
I use it like shown in a transparent overlay for the whole skin. Not a universal type of menu - it is skin specific. You can set the ContextTitle'x' and ContextAction'x' to fit either at the beginning or end of a context menu - not sure if it works in the middle.
Hope that provides some additional info you might like to use sometime.
This is good if your settings are different for skins in a suite, for example.
Courtesy of Active Colors:
Code: Select all
MouseOverAction=[!SetOption Rainmeter ContextTitle2 "Open Weather Settings"][!SetOption Rainmeter ContextAction2 """["#CURRENTPATH#Weather Wizard.inc"]"""]
I use it like shown in a transparent overlay for the whole skin. Not a universal type of menu - it is skin specific. You can set the ContextTitle'x' and ContextAction'x' to fit either at the beginning or end of a context menu - not sure if it works in the middle.
Hope that provides some additional info you might like to use sometime.
This is good if your settings are different for skins in a suite, for example.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to make the ContextAction open a file (or an .ini) in a text editor
Just to be extremely precise and because you didn1t specify this, note that these options have to be added to the [Rainmeter] section:
Code: Select all
[Rainmeter]
...
RightMouseUpAction=[!SkinCustomMenu]
ContextTitle=Drop Top Settings Menu
ContextAction=[!ActivateConfig "#ROOTCONFIG#" "Settings.ini"]
ContextTitle2=----
ContextAction2=[]
ContextTitle3=Edit Global Variables
ContextAction3=["#@#\IncludeFiles\GlobalVariables.inc"]
ContextTitle4=Edit #CURRENTFILE#
ContextAction4=["#CONFIGEDITOR#" "#CURRENTPATH##CURRENTFILE#"]
ContextTitle5=----
ContextAction5=[]
ContextTitle6=Open @Resources Folder
ContextAction6=["#@#"]
ContextTitle7=Open Include Files Folder
ContextAction7=["#@#\IncludeFiles"]
ContextTitle8=----
ContextAction8=[]
ContextTitle9=Manage "#CURRENTFILE#"
ContextAction9=[!Manage Skins "#CURRENTCONFIG#" "#CURRENTFILE#"]
ContextTitle10=Refresh Skin
ContextAction10=[!Refresh]
ContextTitle11=---
ContextAction11=[]
ContextTitle12=- - - - More actions - - - -
ContextAction12=[!SkinMenu]
ContextTitle13=---
ContextAction13=[]
-
- Posts: 1363
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: How to make the ContextAction open a file (or an .ini) in a text editor
Wow. That is cool - using the built-in variables like that. Ill save this stuff to my tricks and tips file.balala wrote: ↑May 7th, 2022, 7:36 pm Just to be extremely precise and because you didn1t specify this, note that these options have to be added to the [Rainmeter] section:This detail might be extremely important for a beginner (which OP I believe is).Code: Select all
[Rainmeter] ... RightMouseUpAction=[!SkinCustomMenu] ContextTitle=Drop Top Settings Menu ContextAction=[!ActivateConfig "#ROOTCONFIG#" "Settings.ini"] ContextTitle2=---- ContextAction2=[] ContextTitle3=Edit Global Variables ContextAction3=["#@#\IncludeFiles\GlobalVariables.inc"] ContextTitle4=Edit #CURRENTFILE# ContextAction4=["#CONFIGEDITOR#" "#CURRENTPATH##CURRENTFILE#"] ContextTitle5=---- ContextAction5=[] ContextTitle6=Open @Resources Folder ContextAction6=["#@#"] ContextTitle7=Open Include Files Folder ContextAction7=["#@#\IncludeFiles"] ContextTitle8=---- ContextAction8=[] ContextTitle9=Manage "#CURRENTFILE#" ContextAction9=[!Manage Skins "#CURRENTCONFIG#" "#CURRENTFILE#"] ContextTitle10=Refresh Skin ContextAction10=[!Refresh] ContextTitle11=--- ContextAction11=[] ContextTitle12=- - - - More actions - - - - ContextAction12=[!SkinMenu] ContextTitle13=--- ContextAction13=[]
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to make the ContextAction open a file (or an .ini) in a text editor
That's not my code at all. I just reposted DanDaBear's above code, adding the [Rainmeter] section name, to let OP knows where to put the options. So credits are going to him...
-
- Posts: 1363
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: How to make the ContextAction open a file (or an .ini) in a text editor
Apologies DanDaBear. I totally missed your part in that, scrolling to the end before reading the former.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Posts: 109
- Joined: February 23rd, 2018, 3:12 am
- Location: United States
Re: How to make the ContextAction open a file (or an .ini) in a text editor
No problem CodeCode. I probably got the idea from somewhere here on the forums.
Never underestimate the power of stupid!