It is currently April 25th, 2024, 11:55 am

Rainmeter Icon produce keyboard combination on clic

Get help with creating, editing & fixing problems with skins
shiroho
Posts: 3
Joined: November 6th, 2018, 4:18 pm

Rainmeter Icon produce keyboard combination on clic

Post by shiroho »

Hello Rainmeter community,

I am looking for some script (i hope simple but i don't mind the long explanation if it's required) to put under an icon so that when i click this one it generates a combination of keyboard keys.

I was hoping something like this to exist : LeftMouseDownAction= Keyboard[Ctrl+Alt+Escape] but i didn't found any synthaxe which could do that.
And yeah i know i am aware there is an "alike" old post in that forum which explain it's impossible unless with the use of another program (Nircmd). I really tried my best with it but i didn't succeed to make my dream come true and i don't know if it's really the same stuff.

Why do i need it ? 2 things :

- I have to press Ctrl + alt + Escape to make my magic taskbar (invisible windows task bar) appear or disapear. And i want a total lazy interface in which i could hit an icon with a simple clic that would do it for me without having to stretch my 3 fingers (small hand).

- Since i have a lot of audio programs, i use Audioswitcher. That software allows me to change audio channels/devices with simple shortcut (i gathered all my devices to ctrl+F1/ctrl+F2/ctrl+F3/etc...) Again, so my rainmeter setup can be smoother and more agreable to use, i would like to do that in a simple clic upon an icon array. It would be so awesome ...

Is there anyone which know a simplier way ? or want to give me more understanding about this ? (or even how i can do that with nircmd if the only possibility)
azazello
Posts: 33
Joined: December 14th, 2017, 6:41 pm

Re: Rainmeter Icon produce keyboard combination on clic

Post by azazello »

Take a look at this AutoHotkey
Last edited by azazello on November 6th, 2018, 7:02 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rainmeter Icon produce keyboard combination on clic

Post by balala »

Beside azazello idea, I'd recommend indeed the nircmd tool. You can download it here: http://www.nirsoft.net/utils/nircmd.html
If you have it, put the downloaded nircmd folder into the @Resources folder.
Then add the following LeftMouseUpAction to the desired meter: LeftMouseUpAction=["#@#nircmd\nircmd.exe" sendkeypress ctrl+alt+esc]. Note that I replaced the LeftMouseDownAction with LeftMouseUpAction. Here you can find out why.
Obviously you can use another key combination if needed as well.
azazello
Posts: 33
Joined: December 14th, 2017, 6:41 pm

Re: Rainmeter Icon produce keyboard combination on clic

Post by azazello »

TaskBar Hider+AutoHotkey

animation
You do not have the required permissions to view the files attached to this post.
shiroho
Posts: 3
Joined: November 6th, 2018, 4:18 pm

Re: Rainmeter Icon produce keyboard combination on clic

Post by shiroho »

you guys are all wonderful ! i will try out each solution you proposed. Thanks for the nircmd further explanation, i tried it once but didn't get how to do that ! Also thanks for showing me that software autohotkey. i keep you in touch in case i have further problems but i think i should be fine :)
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rainmeter Icon produce keyboard combination on clic

Post by balala »

shiroho wrote: November 6th, 2018, 7:43 pm you guys are all wonderful ! i will try out each solution you proposed. Thanks for the nircmd further explanation, i tried it once but didn't get how to do that ! Also thanks for showing me that software autohotkey. i keep you in touch in case i have further problems but i think i should be fine :)
Ok, let us know which one how does work.
shiroho
Posts: 3
Joined: November 6th, 2018, 4:18 pm

Re: Rainmeter Icon produce keyboard combination on clic

Post by shiroho »

both of your solutions are working ! but i have to say i prefer and will stick with the nircmd solution. it's really simple when you have that precious line you just told, i missed that badly when i did try the first time. And i get it for the mouseup. Thanks for all these infos.

As for hiding the task bar, I tried that "taskbar hider" soft, it's a bit old ... and rusty. I restarted my pc (win 10) few times and didn't hide the task bar at start even if prompted to. So i will keep magic taskbar for that even if it's a little more complicated. I don't know if there is any more modern & more reliable soft for that purpose. Magic taskbar and taskbar hider are both last updated 2012 ...

You made me really happy guys. Keeping an eye in there, Nice community :welcome:
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rainmeter Icon produce keyboard combination on clic

Post by balala »

shiroho wrote: November 6th, 2018, 8:31 pm both of your solutions are working ! but i have to say i prefer and will stick with the nircmd solution. it's really simple when you have that precious line you just told, i missed that badly when i did try the first time. And i get it for the mouseup. Thanks for all these infos.
Nircmd has the advantage that it can be used for a lot of things. You can find a list here, but I'm not sure it is complete. Maybe yes, maybe no...
shiroho wrote: November 6th, 2018, 8:31 pm As for hiding the task bar, I tried that "taskbar hider" soft, it's a bit old ... and rusty. I restarted my pc (win 10) few times and didn't hide the task bar at start even if prompted to. So i will keep magic taskbar for that even if it's a little more complicated. I don't know if there is any more modern & more reliable soft for that purpose. Magic taskbar and taskbar hider are both last updated 2012 ...
Windows has a taskbar hiding feature, isn't that one good for your needs?
shiroho wrote: November 6th, 2018, 8:31 pm Nice community :welcome:
:great: Indeed. :thumbup:
azazello
Posts: 33
Joined: December 14th, 2017, 6:41 pm

Re: Rainmeter Icon produce keyboard combination on clic

Post by azazello »

balala wrote: November 6th, 2018, 8:43 pm Nircmd has the advantage that it can be used for a lot of things. You can find a list here, but I'm not sure it is complete. Maybe yes, maybe no...

Windows has a taskbar hiding feature, isn't that one good for your needs?

:great: Indeed. :thumbup:
I agree NirCmd more features.For me personally, everything related to hotkeys is more convenient to use AutoHotkey .
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rainmeter Icon produce keyboard combination on clic

Post by balala »

azazello wrote: November 6th, 2018, 9:17 pm For me personally, everything related to hotkeys is more convenient to use AutoHotkey .
I don't know AutoHotKey. Could you please post a link where it can be downloaded? I'd like to give it a try.