Hello.
I want to make a script that will scan the entire monitor aeria and find only the pixels that didn't change color for a specific time (i.e 10min) and turn it black or white for 1 or 2 seconds.
To help you better I want to prevent the image retention on OLED tv when I use it as a PC monitor.
Thanks
Help making pixel color change
-
- Posts: 3
- Joined: 24 Sep 2016, 09:30
Re: Help making pixel color change
This would require you to have two huge arrays (millions of elements each) for both storing the color and time of last change for every pixel on your screen. It will be very slow loop through every pixel -- much longer than 10 minutes -- mainly because getting the pixel color is such a slow operation and there millions of pixels. Then you'd need to draw pixels in black or white on a transparent GUI covering the screen and keep track of the ones that were drawn (another huge array) so you can go erase them a couple seconds later, or just wait on each one, and at 2 seconds each that will make the process take a ton longer once it starts drawing pixels. It will take a lot of CPU time, and it would probably interfere (visually at least) with things a good bit.
You would be much better off just having a script black out (or white out) the screen for a couple of seconds every 10 minutes.
You would be much better off just having a script black out (or white out) the screen for a couple of seconds every 10 minutes.
-
- Posts: 3
- Joined: 24 Sep 2016, 09:30
Re: Help making pixel color change
Even that it would be great and do the job...
Re: Help making pixel color change
This will alternate between a putting up a black window and white window that covers the screen every 10 minutes. It also moves the mouse so it doesn't show up when blacked (or whited) out, and then moves it back where it was.
Edit: Correction to MouseMove speed
Code: Select all
CoordMode, Mouse, Screen
Gui, -Caption
loop
{
Sleep, 1000 * 60 * 10 ; 10 minutes
MouseGetPos, MX, MY
MouseMove, A_ScreenWidth, A_ScreenHeight, 0 ; move mouse off screen
Gui, Color, % (Toggle := !Toggle ? "Black" : "White")
Gui, Show, Maximize
Sleep, 2000
Gui, Hide
MouseMove, MX, MY, 0 ; move mouse back
}
return
Last edited by boiler on 15 Dec 2017, 10:49, edited 1 time in total.
-
- Posts: 3
- Joined: 24 Sep 2016, 09:30
Re: Help making pixel color change
Thanks a lot for your help.This will do the work just fine.
Thanks again.
Thanks again.
Re: Help making pixel color change
You're welcome. You might want to use the version that I just edited because I noticed I didn't put the 0 speed (fastest) on one of the MouseMove commands. Probably not even noticeable, though.
Who is online
Users browsing this forum: No registered users and 140 guests