It is currently June 25th, 2019, 12:24 am

Turn off Right Click Editing and Settings

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

BBALL » March 18th, 2019, 11:16 pm

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: 19268
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Turn off Right Click Editing and Settings

jsmorley » March 18th, 2019, 11:29 pm

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: 8308
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Turn off Right Click Editing and Settings

balala » March 19th, 2019, 10:40 am

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.
Yincognito
Posts: 652
Joined: February 27th, 2015, 2:38 pm

Re: Turn off Right Click Editing and Settings

Yincognito » March 19th, 2019, 3:36 pm

BBALL wrote:
March 18th, 2019, 11:16 pm
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).
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).
User avatar
jsmorley
Developer
Posts: 19268
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Turn off Right Click Editing and Settings

jsmorley » 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, (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...
Yincognito
Posts: 652
Joined: February 27th, 2015, 2:38 pm

Re: Turn off Right Click Editing and Settings

Yincognito » March 19th, 2019, 3:51 pm

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".
User avatar
jsmorley
Developer
Posts: 19268
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Turn off Right Click Editing and Settings

jsmorley » March 19th, 2019, 3:55 pm

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.
Yincognito
Posts: 652
Joined: February 27th, 2015, 2:38 pm

Re: Turn off Right Click Editing and Settings

Yincognito » March 19th, 2019, 4:19 pm

jsmorley wrote:
March 19th, 2019, 3:55 pm
How 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 pm
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.
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.