Jump to content
Sign in to follow this  
Glyph

Detecting the middle of the screen

Recommended Posts

Glyph

Is there a way to find the Desktop settings

and then by finding the desktop settings

have it store the exact middle pixels in a XXxXX square of the screen into a variable?

Just guessing...

If @DesktopHeight = $vara and @DesktopWidth=$varb then
IniWrite(@Scriptdir & "\Settings.ini", "Middle", "1", '50,50,50,50')
endif

Whats the command, if any to find the middle pixel?


tolle indicium

Share this post


Link to post
Share on other sites
botanic

@DesktopHeight And @DesktopWidth are what you need

i think you could do an expression like this one

@desktopheight / 2 = $heightmid

@desktopwidth /2 =$withmid

then just do the iniwrite

Share this post


Link to post
Share on other sites
Glyph

Would this work?

$a=@desktopheight / 2 = $heightmid

$b=@desktopwidth /2 =$widthmid

$heightmid=()

$widthmid=()

Edited by backstabbed

tolle indicium

Share this post


Link to post
Share on other sites
AnythinG

Whats the command, if any to find the middle pixel?

well... if you need the middle pixel, just calculate it

$a = @DesktopWidth/2
$b= @DesktopHeight/2
MsgBox(0,"","The midle is: " & $a & "," & $b)

hope this will help you :P

Share this post


Link to post
Share on other sites
Glyph

-edit never mind..

Edited by backstabbed

tolle indicium

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.