It is currently April 23rd, 2024, 4:58 pm

AutoHotKey Plugin to change images

Get help with creating, editing & fixing problems with skins
User avatar
BlueJive
Posts: 27
Joined: February 25th, 2021, 6:45 am

AutoHotKey Plugin to change images

Post by BlueJive »

Hi all! It's been a while, but mainly because everything's going swimmingly thanks to your wonderful help :)

I do have a question though, about the AutoHotKey plugin. More specifically how to use it to switch the images in the following code around. Here's the desired result again:

Image

And here's the code so far. It is currently coded to change the image on mouse over action:

Code: Select all

[Rainmeter]
Update=-1

[switcher]
Measure=PLUGIN
Plugin=RunCommand
Program=PowerShell
Parameter=Switch-Desktop 1
State=Hide

[style]
ImageName=#@#Icons\ghost.png
H=11
PreserveAspectRatio=1
MouseOverAction=[!SetOptionGroup Icons ImageName "#@#Icons\ghost.png"][!SetOption #CURRENTSECTION# ImageName "#@#Icons\pacman.png"][!Update][!Redraw]
Group=Icons

[ghost1]
Meter=Image
MeterStyle=style
X=0
LeftMouseUpAction=["#@#nircmd\nircmd.exe" SendKeyPress lwin+ctrl+left]["#@#nircmd\nircmd.exe" SendKeyPress lwin+ctrl+left][!Update][!Redraw]

[ghost2]
Meter=Image
MeterStyle=style
X=13R
LeftMouseUpAction=[!CommandMeasure switcher "Run"][!Update][!Redraw]

[ghost3]
Meter=Image
MeterStyle=style
X=13R
LeftMouseUpAction=["#@#nircmd\nircmd.exe" SendKeyPress lwin+ctrl+right]["#@#nircmd\nircmd.exe" SendKeyPress lwin+ctrl+right][!Update][!Redraw]
My intent in the end is to use an AutoHotKey skin to detect if the keyboard input "LWin + Ctrl + Left" is inputted and move the pacman left. And to detect when the keyboard input "LWn + Ctrl + Right" is inputted and move the pacman right. I believe I'm right in thinking that these keyboard input move virtual desktops accordingly, and as such, changing the Rainmeter skin like so woudl create the effect of it "monitoring" the virtual desktop without any powershell plugins. (Oh, and to clarify, the video uses dots to represent empty virtual desktops. I feel this would be too hard to replicate so I'm leaving it out of the code).

Obviously, the above code has practically nothing to do with this question. I was including it to show image names, what I've done so far, and perhaps any other information necessary.

What I'm asking for help with is recoding the above code to react to bangs perhaps from the autohotkey plugin and switch accordingly. I was having difficulty knowing where to start, and try as I could, I couldn't find anything in the manuals to help (I know it's probably there, but it's in bits and pieces and I couldn't figure it out). So I'd really appreciate some help.

Thanks, once again! :)

Previous topic thread: https://forum.rainmeter.net/viewtopic.php?f=5&t=37032
Rainmeter 4.4.0.3433 beta (64-bit)
Language: English (1033)
Build time: 2021-02-11 20:36:28
Windows 10 Home 2009 64-bit (build 19042) - English (2057)
Path: C:\Program Files\Rainmeter\
SkinPath: C:\Users\User\OneDrivel\Documents\Rainmeter\Skins\
SettingsPath: C:\Users\User\AppData\Roaming\Rainmeter\
Message: You are reading it now
IniFile: C:\Users\User\AppData\Roaming\Rainmeter\Rainmeter.ini
Issue tags: "Workspace switcher" "AutoHotKey" "plugins"