Sign in to follow this  
Followers 0
Glyph

Detecting the middle of the screen

5 posts in this topic

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



@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

#3 ·  Posted (edited)

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

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

#5 ·  Posted (edited)

-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  
Followers 0