StrokesPlus.net
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
kuer  
#1 Posted : Saturday, June 8, 2019 1:39:03 PM(UTC)
kuer

Rank: Member

Reputation:

Groups: Approved
Joined: 6/8/2019(UTC)
Posts: 8
Czech Republic

Thanks: 1 times
StrokesPlus.net is very cool,I am a rookie, and really like it.

1:I want to know how to change the brightness of screen,for example change to 30%.
2:I still don't know how to open a specific website. for example Open youtube.com.
3:Why does the action “action.Window.TopMost” can't work. I think it can make specific window always Above others. But not now.

[img=http://bit.ly/2ET63Sn]http://bit.ly/2ET63Sn[/img]

Can anyone help me with this?
Thanks a lot.
Rob  
#2 Posted : Saturday, June 8, 2019 6:40:47 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,359
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 419 time(s) in 356 post(s)
1) Brightness is very device dependent and doesn't have the widest adoption, so most solutions are kind of inconsistent.
You can install this plug-in as a kind of hack which generally is okay: https://forum.strokesplus.net/posts/t1008-Display-Gamma
Code:
//red, green, blue - values 0 - 255 each
DisplayGamma.Set(110,110,110); //about 43% brightness
DisplayGamma.Set(255,255,255); //max gamma

Again, this is not true brightness, just kind of a trick. It is possible to accomplish this, depending on the hardware, etc. But I don't have anything built-in for this, until there's a widely adopted standard and support.
Though you might find a .NET library (DLL) out there which can handle it, put it in the plug-ins folder and try to call it.


2) Couple ways to do that, if you just want to open YouTube from anywhere, like not just when you're in Chrome or something, just run the URL, like putting it into the Window Run box:
Code:
sp.RunProgram("http://youtube.com", "", "open", "normal", true, false, false); 

Or, you can use this if you want to have it typed into the address bar directly when in Chrome:
Code:
//Send Alt+D to set focus to address bar in Chrome
sp.SendModifiedVKeys([vk.LMENU], [vk.VK_D]); 
sp.Sleep(10);
sp.SendKeys("youtube.com~"); // ~ = enter key



3) That is simply the property, you didn't do anything to set the property. Try this:
Code:
action.Window.TopMost = !action.Window.TopMost;

That will toggle the TopMost flag, to the opposite of whatever it is currently set as, so if on, turn off, and the reverse.
You can also explicitly set the value:
Code:
action.Window.TopMost = true; //Make top most
action.Window.TopMost = false; //Make not top most
thanks 2 users thanked Rob for this useful post.
kuer on 6/23/2019(UTC), Dauren on 8/9/2020(UTC)
Rob  
#3 Posted : Saturday, June 8, 2019 7:12:00 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,359
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 419 time(s) in 356 post(s)
I found a simple .NET library for adjusting brightness, so you can give it a try! For me, it adjusts the brightness of my laptop's screen, but not the external monitors.

https://forum.strokesplus.net/posts/m5198-Adjust-Screen-Brightness
Users browsing this topic
Guest
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.