It is currently April 18th, 2024, 8:09 am

New Fileview Context / Properties functions

Changes made during the Rainmeter 3.1 beta cycle.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

New Fileview Context / Properties functions

Post by jsmorley »

We have added new functions to the FileView plugin, to allow opening a file or folder object's Windows right-click "context menu" or Windows "properties" dialog. The context menu will be opened at the current mouse position if the mouse is located within the skin boundaries when the action is fired - otherwise, the menu will be located at the upper-left corner of the skin.

!CommandMeasure "MeasureName" "ContextMenu"

!CommandMeasure "MeasureName" "Properties"

FileView - Other Commands

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

[MeasureFolder]
Measure=Plugin
Plugin=FileView
Path=#CURRENTPATH#
ShowDotDot=0
ShowFolder=0
Extensions="ini"
Count=1

[MeasureIcon1]
Measure=Plugin
Plugin=FileView
Path=[MeasureFolder]
Type=Icon
Index=1

[MeasureName1]
Measure=Plugin
Plugin=FileView
Path=[MeasureFolder]
Type=FileName
Index=1

[MeterIcon1]
Meter=Image
MeasureName=MeasureIcon1
SolidColor=47,47,47,255
Padding=5,5,5,5

[MeterName1]
Meter=String
MeasureName=MeasureName1
X=0R
Y=0r
FontSize=12
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,13,10,12
AntiAlias=1
LeftMouseUpAction=[!CommandMeasure "MeasureName1" "Open"]
MiddleMouseUpAction=[!CommandMeasure "MeasureName1" "Properties"]
RightMouseUpAction=[!CommandMeasure "MeasureName1" "ContextMenu"]
01.jpg
02.jpg
Note: Parent measures also have the ability to manually open a user-defined file/folder for both the context menu and properties dialog. Just manually place the path next to a command and enclose both with quotes. Don't worry about placing extra quotes around paths that contain spaces.

For example: [!CommandMeasure "ParentMeasureName" "ContextMenu C:\Some Path\To A File\File.extension"]
You do not have the required permissions to view the files attached to this post.
User avatar
exper1mental
Posts: 269
Joined: January 9th, 2013, 7:52 pm
Location: Clemson University

Re: New Fileview Context / Properties functions

Post by exper1mental »

Nice, will it be possible to customize the context menu or its entry list?
Image
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New Fileview Context / Properties functions

Post by jsmorley »

No, it's just opening the Windows context menu for an object (file or folder) that we don't "own", not a menu we create out of thin air. You can already do a "custom" context menu for a skin (which we do "own") with Rainmeter, but personally I don't think we need to get in the business of writing to the Windows Registry with skins. It makes Rainmeter break every rule of "portability" and has a lot of risks I would not be very happy about.