AHK + Rainmeter

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
mkurtt96
Posts: 1
Joined: 17 Mar 2018, 09:04

AHK + Rainmeter

17 Mar 2018, 09:18

hey!
I'm making my own skins for a while, they are simple things but mostly because i want a desktop that won't tire me eyes. I used to use AHK for such shortcuts (not complex thing tho) but since rainmeter adds an aesthetic look to my desktop i stopped using it but i recently started using AHK again, so i want use them together. As long as i understand how it works together i have some ideas but for now i need something like this to start with;

- i've loaded an autoCorrect script to fix my mistakes since i'm not a native speaker that helps alot.
- i added a suspend shortcut to it which is ctrl+shift+capslock
- i made a rainmeter skin to show me whether it s on or off.

what i want is a script in ahk to change this on/off in the rainmeter skin when i use the shortcuts, or rainmeter option to turn on or turn off the script.

apparently to do this, most of the job must be done with ahk. So is there a fast way to do this? if not, can u help me with an ahk script to disable/enable rainmeter.ini file?

i have been doing my research and found one to disable the skin (https://gist.github.com/qwerty12/1290825) which i didn't exactly understand it to modify
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: AHK + Rainmeter

17 Mar 2018, 14:06

JFTR. Interestingly there's another request that (AFAICS) is based on a feature rainmeter* is using:
https://autohotkey.com/boards/viewtopic.php?f=5&t=45762
I'd say that way you could create your AHK-driven skins, right?! :)

* https://www.codeproject.com/articles/85 ... in-windows
iseahound
Posts: 1444
Joined: 13 Aug 2016, 21:04
Contact:

Re: AHK + Rainmeter

19 Mar 2018, 01:54

Take a look at the manual! https://docs.rainmeter.net/manual/bangs/

Run, Rainmeter.exe !SetVariable SomeVariable "New value!"

find your raimeter.exe path, then control skins completely from the command line.
User avatar
theimmersion
Posts: 181
Joined: 09 Jul 2016, 08:34
Location: Serbia

Re: AHK + Rainmeter

19 Mar 2018, 09:26

I am kinda building a framework for AHK based on Rainmeter with some added twists and such and hope to someday release it.
It is not intended as a Rainmeter replacement though and should not ever be. It should be an addon to Rainmeter for stuff Rainmeter just cant do or cant do more efficient than AHK. Its rather slow going tho. -.- Maybe i should post the project even if its not finished but still figuring out a lot of the system.
The issue here is dynamic skin creation but with I/O capability.
Like, creating a button using GDI+ and then adding a few states (mouse over, mouse leave, mouse up, mouse down) and rendering those different images or what ever very complex. -.-
GDI+ lib's way of working gets in the way sometimes. Need to create some custom wrappers.
Making some fixed skin in AHK is much easier now though but im trying to mimic the dynamic nature of Rainmeter and its .ini parsing and such which is a pain in the a**.
Also, the AHK's single thread is also a big limitation for this kind of project because id need at least 2 threads, one for skins that AHK should manage and one for its core.
IE, thread that manages skin windows and their I/O, commands, redraw etc and one thread for AHK core that executes all that async.
I maybe could/should use two communicating scripts instead, one for Core stuff and one that just manages the shown skins and similar.
For instance, a skin that wants to use some window API like toggle auto-hide taskbar and show its status as well, skin sends the command to core and the core executes the toggle and then refreshes the skin.

Anyway, i may be able to help with a few things so feel free to ask. Oddly enough tho, i did have some issues with Run, "Rainmeter path" "!Refresh SkinPath\SkinConfig" Refreshing the whole Rainmeter with AHK works like a charm but refreshing a single skin did not work for me for some reason. IE, AHK edits something, refresh a skin that relies, reads and shows the same data as AHK and vice versa.

Here is a GIF showing an example of a synced to winamp skin created in ahk via a skin.ini that AHK reads and acts upon:
GIF.gif
GIF.gif (322.6 KiB) Viewed 2959 times
PC is absolute crap so cant show winamp and the AHK skin at same time because GIF turns all green for some reason.

The skin.ini its parsing:
You will note similarities to Rainmeter or at least may of its bases. :)
Spoiler
Just to show that it is possible. And i am no programmer! I can only imagine what a real programmer could do with AHK <3

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bobak, jaka1, MrDoge and 243 guests