Any way to have a button that rotates a specific screen/monitor when clicked (90º) so I can have a vertical or horizontal aspect ratio ratio on demand with a visual cue?
If it doesn't exist but it's possible, would appreciate a point in the right direction.
Thank you!
It is currently March 29th, 2024, 11:00 am
Any way to have a button that rotates a specific screen/monitor when clicked?
-
- Posts: 6
- Joined: January 5th, 2021, 4:50 pm
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Any way to have a button that rotates a specific screen/monitor when clicked?
A possible solution might be here (see the first reply, but to be honest I didn't try it out). You have to download and use a .exe. To download use one of the posted mirrors, the direct link seems to not working.
Does the tool work? If it does and you need assistence on how to use it into a Rainmeter code, please let me (us) know.
-
- Posts: 6
- Joined: January 5th, 2021, 4:50 pm
Re: Any way to have a button that rotates a specific screen/monitor when clicked?
It does work! yes, assistance into wrapping this into a skin/plugin for Rainmeter would be great, so it can be uploaded and shared/used by someone else too.balala wrote: ↑January 5th, 2021, 6:22 pm A possible solution might be here (see the first reply, but to be honest I didn't try it out). You have to download and use a .exe. To download use one of the posted mirrors, the direct link seems to not working.
Does the tool work? If it does and you need assistence on how to use it into a Rainmeter code, please let me (us) know.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Any way to have a button that rotates a specific screen/monitor when clicked?
Alright, I'm glad.
Do you have a starting skin, to work with? If you do have one, post its code please, however I suppose thereis no code so far. If I'm right and you indeed don't have one, I'm gonna write a short sample code, just please let me know.
-
- Posts: 6
- Joined: January 5th, 2021, 4:50 pm
Re: Any way to have a button that rotates a specific screen/monitor when clicked?
Nothing really relevant, I followed the tutorial here:
https://docs.rainmeter.net/tips/button-images/
And this particular code:
Code: Select all
[MeterSample]
Meter=Button
X=1
Y=1
ButtonImage=MyButton.png
ButtonCommand=["SomeCommand"]
( ButtonCommand=["SomeCommand"] )
like so
( ButtonCommand=["X:\Display\display64.exe /device 2 /rotate:90 /toggle"] )
But that did not work.
Last edited by balala on January 7th, 2021, 4:51 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are posting code snippets. It's the </> button.
Reason: Please use <code> tags whenever are posting code snippets. It's the </> button.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Any way to have a button that rotates a specific screen/monitor when clicked?
Ok, add the following measure to your code:
Code: Select all
[MeasureRotate]
Measure=Plugin
Plugin=RunCommand
Program=X:\Display\display64.exe
Parameter=/device 2 /rotate:90 /toggle
State=Hide
Does it work now?
-
- Posts: 6
- Joined: January 5th, 2021, 4:50 pm
Re: Any way to have a button that rotates a specific screen/monitor when clicked?
balala wrote: ↑January 7th, 2021, 4:57 pm Ok, add the following measure to your code:This is a RunCommand plugin measure, which when executed, runs the Program, with the posted Parameter. To run it, replace the ButtonCommand option with the following one: ButtonCommand=[!CommandMeasure "MeasureRotate" "Run"].Code: Select all
[MeasureRotate] Measure=Plugin Plugin=RunCommand Program=X:\Display\display64.exe Parameter=/device 2 /rotate:90 /toggle State=Hide
Does it work now?
Perfectly.
3 follow up questions:
1) Is the used program now "integrated" into the skin? if not, can it be done for easier sharing/reinstalling?
2) Is there a way to disable the multiple images necessary for a single icon (only have one image, and not a static, on hover and pressed image) ? (or just use an icon/ico file?
3) Can I make the icon resizable via click and drag? or can I input a specific size for the icon on the ini file?
Thank you.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Any way to have a button that rotates a specific screen/monitor when clicked?
Great. I'm glad.
No, at all, the program is not integrated yet, but yes, it can easilly be integrated. To do this, I'd move the display64.exe app into the @Resources folder (which is the best place for such programs and additionally if you create a skin installer, it is included into that), let say into an Addons (or whatever) subfolder of @Resources, and would use it from there.
If interested, identify the @Resources folder. It is in the root config (the first folder into the Skins folder, which less or more deeper contains your skin's .ini file). Create an Addons folder in this @Resources folder and move the display64.exe file there. If you do this, you can access your display64.exe as #@#Addons\display64.exe within your skin.
Replace the Program option of the [MeasureRotate] measure with Program=#@#Addons\display64.exe.
Now if pack (or create a skin installer) the config, it integrates the program as well.
Sorry, not sure I understand. Are you talking about the images of the MyButton.png image (its "frames")? But what do you mean by "disable"?
No, you can't in Rainmeter, at least not simply, just maybe through an artifact I don't recommend.
Yes, you can do this, but would be much easier to replace the Button meter with an Image meter, in which case you can set easilly its size with W and H options. The Button meter doesn't support these options, as you can see in the General meter options section of the Button meter. Are you interested and if you are, do you know how to do this? Please let me know if you need assistence.
-
- Posts: 6
- Joined: January 5th, 2021, 4:50 pm
Re: Any way to have a button that rotates a specific screen/monitor when clicked?
Awesome, this is basically what I was missing, the rest can be managed as is.balala wrote: ↑January 7th, 2021, 6:55 pm No, at all, the program is not integrated yet, but yes, it can easilly be integrated. To do this, I'd move the display64.exe app into the @Resources folder (which is the best place for such programs and additionally if you create a skin installer, it is included into that), let say into an Addons (or whatever) subfolder of @Resources, and would use it from there.
If interested, identify the @Resources folder. It is in the root config (the first folder into the Skins folder, which less or more deeper contains your skin's .ini file). Create an Addons folder in this @Resources folder and move the display64.exe file there. If you do this, you can access your display64.exe as #@#Addons\display64.exe within your skin.
Replace the Program option of the [MeasureRotate] measure with Program=#@#Addons\display64.exe.
Now if pack (or create a skin installer) the config, it integrates the program as well.
Yes, that's what I mean.
Specifically I mean, in cases where I don't need a "mouse over" or "pressed", If it's possible to just use the first frame only.
Alternatively, is it possible to have more frames for each state ? (say a looping animation for the "Static" image) or an animation for the "pressed".
I'll further look into the link you provided before bothering you with more specific questions if needed.balala wrote: ↑January 7th, 2021, 6:55 pmYes, you can do this, but would be much easier to replace the Button meter with an Image meter, in which case you can set easilly its size with W and H options. The Button meter doesn't support these options, as you can see in the General meter options section of the Button meter. Are you interested and if you are, do you know how to do this? Please let me know if you need assistence.
Thank you so much for your help, basically got my setup just like I wanted/needed.
Not sure if it's "ok" to share the stuff you helped me make (both auxiliary apps/addons I'm using don't seem to have anything against it in their license) but if so, what's the best way to share them?
Thank you again.
-
- Posts: 1363
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Any way to have a button that rotates a specific screen/monitor when clicked?
DeviantArt is a good place. It is free to use, and lots of people share their work there. (Maybe credit the contributor/s in the description).
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.