It is currently April 18th, 2024, 1:22 am

Turn off Right Click Editing and Settings

Get help with creating, editing & fixing problems with skins
BBALL
Posts: 1
Joined: March 18th, 2019, 11:11 pm

Turn off Right Click Editing and Settings

Post by BBALL »

I am trying to use rainmeter as a desktop widget that has a button linked to a customer support page. I do not want my users to be able to right-click anywhere in the widget. I want the users to be blocked from managing, editing, and changing the skin (it needs to function only as a button and nothing else). Any ideas would be appreciated. Thanks
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Turn off Right Click Editing and Settings

Post by jsmorley »

You can "intercept" other mouse clicks on the skin and just send them to the bit-bucket like this:

Code: Select all

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

[MeterOne]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=I'm a button
LeftMouseUpAction=[!Log "I clicked me a button!"]

However, be aware that a user can hold down CTRL while clicking, and that will override those intercepts of the right mouse. Nothing can be done about that. Rainmeter is not designed to be used in a kiosk environment.
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Turn off Right Click Editing and Settings

Post by balala »

Or a second possibility would be to add the following option to the [Rainmeter] section: OnRefreshAction=[!DisableMouseAction "Rainmeter" "RightMouseUpAction|RightMouseDownAction"].
Anyway even this will be overridden by holding down the CTRL when clicking. See jsmorley's explanation above.
User avatar
Yincognito
Rainmeter Sage
Posts: 7120
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Turn off Right Click Editing and Settings

Post by Yincognito »

BBALL wrote: March 18th, 2019, 11:16 pmI want the users to be blocked from managing, editing, and changing the skin (it needs to function only as a button and nothing else).
That's pointless, really. You can manage skins by clicking Rainmeter's tray icon, you can edit and change them using any text editor (Notepad included), you can reload them by quitting and starting Rainmeter again, and you can do all of this from outside Rainmeter and without a single right click on your skin, so stopping right clicks on your skin won't stop users to do the above, if they really want to. If you want to efficiently achieve what you mentioned, a carefully designed Group Policy on Rainmeter would probably do more than blocking right clicks from within your skin, IMHO. Of course, it's more complicated as well, but my point is that it will be more effective (albeit not a "perfect" solution either).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Turn off Right Click Editing and Settings

Post by jsmorley »

You can turn off the tray icon in Rainmeter, remove the keyboard from the setup and only have a mouse, (or run some utility that disables the keyboard) then intercept any right mouse actions as above, and you are about as close as you can get.

Running a computer as a kiosk has other considerations outside of Rainmeter of course, you need to turn off or restrict mouse access to other things like the Start button, really the Taskbar in general, and have your Rainmeter skin be full-screen so you can stop right clicks anywhere on the desktop, as there is stuff there you don't want them to be able to do as well.

Locks are to keep honest people honest, and that is about as good as it will get with Rainmeter in this mode.

If you leave this setup unattended in a public area, be sure to have a good baseline backup that you just restore a couple of times a day. Otherwise, in a short period of time any mouse movement will just display a new random Goatsee image for your customers...
User avatar
Yincognito
Rainmeter Sage
Posts: 7120
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Turn off Right Click Editing and Settings

Post by Yincognito »

jsmorley wrote: March 19th, 2019, 3:39 pm You can turn off the tray icon in Rainmeter, remove the keyboard from the setup and only have a mouse, then intercept any right mouse actions as above, and you are about as close as you can get.
Indeed. But you can't turn off Task Manager (that can be used to quit Rainmeter as well, aside from the tray icon method), unless you design a proper GPO (and even then, it might not be enough). I'm not saying you can't achieve what the OP wants in Rainmeter, I'm just saying that it can be easily circumvented, even if you are not an "advanced user".
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Turn off Right Click Editing and Settings

Post by jsmorley »

Yincognito wrote: March 19th, 2019, 3:51 pm Indeed. But you can't turn off Task Manager (that can be used to quit Rainmeter as well, aside from the tray icon method), unless you design a proper GPO (and even then, it might not be enough). I'm not saying you can't achieve what the OP wants in Rainmeter, I'm just saying that it can be easily circumvented, even if you are not an "advanced user".
How would they get to Task Manage with no keyboard or mouse access to the Start Menu?

Anyway, trust me. I'm not recommending that this even be attempted. Rainmeter is specifically designed to do everything in its power to give access and control to the end-user.
User avatar
Yincognito
Rainmeter Sage
Posts: 7120
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Turn off Right Click Editing and Settings

Post by Yincognito »

jsmorley wrote: March 19th, 2019, 3:55 pmHow would they get to Task Manage with no keyboard or mouse access to the Start Menu?
Right click on the taskbar, browse to taskmgr.exe in File Explorer, copying a batch file or shortcut to Task Manager from a flashdrive (since you can't edit them using the keyboard), etc.
jsmorley wrote: March 19th, 2019, 3:55 pmAnyway, trust me. I'm not recommending that this even be attempted. Rainmeter is specifically designed to do everything in its power to give access and control to the end-user.
And that was precisely my point. If you have sensitive things you want to block access to, the safest bet is to keep them online based (i.e. done at the server/site level, not on the user's computer). Now, of course, for the OP's case, it really depends on whether bypassing the "locks" is just an "inconvenient" or an "under no circumstances" thing in his usage scenario. If it's just an inconvenient, he can do as advised here, no problems.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth