Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Simple class to adjust the brightness of your screen. Note: This only works if your screen supports brightness adjustment! I simply took the source in this project and changed a couple things: https://github.com/JeroenvO/screen-brightnesshttps://www.strokesplus.net/files/ScreenBrightness.dllDownload the file into your StrokesPlus.net\Plug-Ins folder and Reload S+.net from the tray icon. NOTE: Windows may mark the DLL as unsafe or blocked. Right click the DLL and select Properties, there will be an option to unblock it. Example script: Code://Decrease by 10 percent
ScreenBrightness.ScreenBrightness.Adjust("10-");
//Increase by 10 percent
ScreenBrightness.ScreenBrightness.Adjust("10+");
//Set to 50 percent
ScreenBrightness.ScreenBrightness.Adjust("50%");
Edited by user Friday, August 6, 2021 2:00:18 PM(UTC)
| Reason: Updated to reflect syntax changes after version 0.5.0.0
|
2 users thanked Rob for this useful post.
|
|
|
Rank: Advanced Member
Groups: Approved
Joined: 3/30/2019(UTC) Posts: 74 Thanks: 8 times Was thanked: 1 time(s) in 1 post(s)
|
Dear Rob, thank you for providing such a good DLL, but there are two questions:
1) "ScreenBrightness. Adjust ("10-"); doesn't work, and the other two work normally. 2) It can't be continuously adjusted by the roller. It can work after loosening the right button and then pressing it again.
|
1 user thanked zyxi for this useful post.
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Not sure, all three combinations work on my computer. Like I said, I simply grabbed some random DLL that someone else made, so it might have some issues with some systems.
I can try to look later and see if there's something I'm missing.
|
|
|
|
Rank: Advanced Member
Groups: Approved
Joined: 5/6/2019(UTC) Posts: 111 Thanks: 19 times Was thanked: 1 time(s) in 1 post(s)
|
Dear Rob, I found that the brightness reduction adjustment is discontinuous, from 100 to 80, by 10 at a time, then from 80 to 60 directly, and from 60 to 30 directly. More importantly, it can no longer reduce brightness after 30, it can not be used as normal as increasing brightness. Can you help me? Thank you
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
I did not write the code for the brightness adjustment, I just took some code that person wrote and compiled it from here https://github.com/JeroenvO/screen-brightness. Screen brightness is a very challenging task due to different hardware/software support, so it does not always function consistently for different computers. I'll try to come back to this another time to see if I can find anything.
|
|
|
|
Rank: Advanced Member
Groups: Approved
Joined: 5/6/2019(UTC) Posts: 111 Thanks: 19 times Was thanked: 1 time(s) in 1 post(s)
|
Thank you, Rob. I'm looking forward to it working properly on my computer.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close