It is currently April 20th, 2024, 10:22 am

[Request] Hotkey to bring the Rainmeter to front

Report bugs with the Rainmeter application and suggest features.
dudul
Posts: 4
Joined: July 5th, 2015, 12:11 pm

[Request] Hotkey to bring the Rainmeter to front

Post by dudul »

Hi,
Sometimes I want to know the network traffic or the RAM usage (for example) without minimize all my open windows/running applications.
I think that an hotkey which bring the Rainmeter to front (another click will bring it to back), will be a great feature.

You can call it "quick view ".

thank you in advance
User avatar
Mordasius
Posts: 1171
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: [Request] Hotkey to bring the Rainmeter to front

Post by Mordasius »

How about clicking on that little rectangle at the far-right-end of the Windows-7 taskbar to show the desktop along with all of your Rainmeter skins in their full glory?

Now if you are not running Windows-7 or if you have abolished the taskbar, you could well be up a tree without a whistle in which case the widdle-weasels will gobble your RAM and snuffle your network while you struggle to display your Rainmeter skins.
Last edited by Mordasius on July 5th, 2015, 3:56 pm, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Request] Hotkey to bring the Rainmeter to front

Post by jsmorley »

Mordasius wrote:How about clicking on that little rectangle at the far-right-end of the Windows-7 taskbar to show the desktop along with all of your Rainmeter skins in their full glory?
Or you could roll your own...

Code: Select all

[Rainmeter]
Update=1000
OnRefreshAction=[!ZPos "#CurrentToggle#" "*"]

[Variables]
Toggle1=-2
Toggle2=2
CurrentToggle=-2

[MeasureCurrentZPos]
Measure=Calc
Formula=#CurrentToggle#
DynamicVariables=1
UpdateDivider=-1

[MeterToggleZPos]
Meter=Image
W=15
H=30
SolidColor=150,160,170,100
LeftMouseUpAction=[!SetVariable CurrentToggle (#Toggle1#+#Toggle2#-#CurrentToggle#)][!UpdateMeasure MeasureCurrentZPos][!ZPos "[MeasureCurrentZPos]" "*"]
DynamicVariables=1
That will toggle all running skins from "On desktop" to "Always in front". It doesn't "minimize" any other windows, which I think was an implied requirement of the original post.

However, to directly respond to the original question as phrased, you can't have any "hotkey" functionality in Rainmeter proper. You would need some external utility like AutoHotKey or AutoIt.
dudul
Posts: 4
Joined: July 5th, 2015, 12:11 pm

Re: [Request] Hotkey to bring the Rainmeter to front

Post by dudul »

Thanks jsmorley.
Do you have any idea how to simulate a click to this specific Rainmeter window.

On Autoit I can't identify this window from the other.

I'm using this function, but I always get the same hwnd which is not the new Rainmeter window that we created.
Local $hWnd = WinGetHandle("[CLASS:RainmeterMeterWindow]", "")
dudul
Posts: 4
Joined: July 5th, 2015, 12:11 pm

Re: [Request] Hotkey to bring the Rainmeter to front

Post by dudul »

got it.
I'm using this method in order to get all the Rainmeter window:
Local $aList = WinList("[CLASS:RainmeterMeterWindow]", "")
dudul
Posts: 4
Joined: July 5th, 2015, 12:11 pm

Re: [Request] Hotkey to bring the Rainmeter to front

Post by dudul »

This is my AutoIt script to bring the Rainmeter windows to front/back when pressing the ALT+Q hotkexy.

I set the jsmorley's ini cordinates to: -9999,-9999 - so the user will not see this Rainmeter window.
The window coordinates are also my way to find this window among the other.
I'm loop through all the Rainmeter windows that I get and search for the window with -9999,-9999 coordinates. then I'm sending it left mouse click.

Code: Select all

HotKeySet("!q", "SetUnsetRainmeterTopmost")	;ALT + q
HotKeySet("^+q", "Terminate")				;CTRL + SHIFT + Q

While 1
	Sleep(1000)
WEnd

Func SetUnsetRainmeterTopmost()
	; Retrieve a list of RainmeterMeterWindow handles.
	Local $aList = WinList("[CLASS:RainmeterMeterWindow]", "")

	Local $index = -1
	For $i = 1 To $aList[0][0]
        Local $aPos = WinGetPos($aList[$i][1])
		If $aPos[0] = -9999 And $aPos[1] = -9999 Then
			$index = $i
		EndIf
    Next


	Local $hwnd = $aList[$index][1]

	ControlClick($hwnd, "", "")

EndFunc   ;==>SetUnsetRainmeterTopmost

Func Terminate()
	Exit
EndFunc   ;==>Terminate