Yes please balala that could work well and I'll learn more I guess, thank you.
It is currently April 30th, 2024, 2:09 pm
How to make an icon toggle?
-
- Posts: 6
- Joined: October 7th, 2019, 5:47 pm
-
- Rainmeter Sage
- Posts: 16190
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to make an icon toggle?
Not sure what the [Square6] meter is used for (that's why have I commented it out below), but here is one possibility:
Code: Select all
[app6]
Meter=Image
ImageName=TempClose2.png
w=20
h=18
X=1098
Y=3
HideOnMouseOver=0
FadeDuration=0
AlphaValue=1
Hidden=1
LeftMouseUpAction=["C:\Windows\nircmd.exe" sendkeypress "ctrl+c"][!HideMeter "app6"][!ShowMeter "App7"][!Redraw]
;[Square6]
;Meter=Image
;SolidColor=0,0,0,1
;H=23
;w=40
;x=520
;y=0
;HideOnMouseOver=0
;FadeDuration=0
;AlphaValue=1
;C:\Windows\nircmd.exe sendkeypress ctrl+c
[App7]
Meter=Image
ImageName=TempOpen2.png
w=20
h=18
X=1338
Y=3
HideOnMouseOver=0
FadeDuration=1
AlphaValue=255
LeftMouseUpAction=["C:\Windows\nircmd.exe" sendkeypress "ctrl+s"][!ShowMeter "app6"][!HideMeter "App7"][!Redraw]
When you click [App7], AIDA64 is launched, [App7] hidden and [app6] shown. Now you can use this last button to close AIDA64.
Note a disadvantage of this approach: the skin doesn't know when the app is running. So, if when you load it, if AIDA64 is started, the skin will have no idea about this and will act as if the app wouldn't run.
There might be a solution of this problem as well. You have to use a Process plugin, to know when the app is running and when it doesn't. Unfortunately I don't have it installed, so I can't say what is the proper process name, but if you can identify it, we can add the plugin measure to furtherly improve the code.
Please check the above code and let me know how does it work for you. If interested, please try to figure out the name of the process. If you succeeded please let me know, to can modify the code accordingly.
-
- Posts: 6
- Joined: October 7th, 2019, 5:47 pm
Re: How to make an icon toggle?
Well balala that has worked perfectly, by matching the x-y co-ordinates when using your code I now have that working toggle. Looks like the process plugin won't be needed there are zero issues with this. Many thanks for the help gentlemen!
-
- Rainmeter Sage
- Posts: 16190
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to make an icon toggle?
Glad if you got it working.
If every time you're using exclusively the skin to launch / close the app, it's ok, I think.