topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday May 18, 2021, 3:46 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Show Center of monitor screen  (Read 5002 times)

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,552
    • View Profile
    • Donate to Member
Show Center of monitor screen
« on: June 05, 2009, 11:58 AM »
Editing a wallpaper photo, I need this little dot to be situated at the very center of the finished photo = the center of the screen. So I fumble around with my calculator and papers, but it would be so much faster if I could only press a hotkey and up comes some crossmark of a kind, illuminating the exact place at once. Then I could maybe hit the same hotkey again, and the crossmark disappears. Or how it should be done.

It could very well look just like Skrommel's MouseMark, or whatever 'you', dear coder, will like it to.

Any takers?

---
Just an example:

MouseMarkScreenP.gif


lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Show Center of monitor screen
« Reply #1 on: June 06, 2009, 07:02 AM »
see if this helps you: ShowScreenCenter. :)

you can press Capslock to show/hide a tooltip at the center of the screen. btw, i've only tested on a single monitor system with the taskbar at the bottom.

; Show Center of monitor
;   https://www.donationcoder.com/forum/index.php?topic=18632.0
; Use Capslock to show/hide a tooltip at the center of the screen.
; Last Updated: 06/06/2009

#Persistent
#SingleInstance force
#NoEnv

SendMode, Input
DetectHiddenWindows On
CoordMode,Mouse,Screen
toggle=0
Return

~CapsLock::
If toggle=0
  {
  ToolTip, +, (A_ScreenWidth/2), (A_ScreenHeight/2)
  toggle=1
  }
Else
  {
  ToolTip
  toggle=0
  }
Return

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Show Center of monitor screen
« Reply #2 on: June 16, 2009, 06:34 AM »
[user]lanux128[/user] wonders if anyone tried this script.. :-\

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,552
    • View Profile
    • Donate to Member
Re: Show Center of monitor screen
« Reply #3 on: June 16, 2009, 07:40 AM »
- inside my little head I answered and thanked you long ago, but now I realize that I wrote nothing! Sorry!! :-[


Yes, of course I've tried it, and it works fine.  :up:

There are some behaviours that I don't fully understand, when I have a window of a kind open, but for the time being I have simply minimized all windows before I press the hotkey and only then maximize the IrfanView window, to see where the center is. Within this frame, ShowScreenCenter works just perfect.

Thanks, lanux  :Thmbsup:


I tend to get what I want from my Daddy by Stuck in Customs.JPGShow Center of monitor screen


lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Show Center of monitor screen
« Reply #4 on: June 16, 2009, 07:54 AM »
thanks for the feedback, Curt. i was wondering whether this script suited your purpose and i'm glad that your response has indicated it is so. :)

btw, what was the behaviour that you mentioned? if you want, the script can be modified to work only if certain apps (such as IrfanView) are active.

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,552
    • View Profile
    • Donate to Member
Re: Show Center of monitor screen
« Reply #5 on: June 16, 2009, 08:32 AM »
- thanks for the extra offer, but I am changing default apps much too often ;-)

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,552
    • View Profile
    • Donate to Member
Re: Show Center of monitor screen
« Reply #6 on: April 20, 2021, 10:00 AM »
lanux128 has not posted since November 2019...

Any takers to my problem?

The app is not doing its job properly on my 1920x1080: The cross comes up half a centimer off center! -even with no apps open.

I don't have the neccessary notes to go back and investigate when this began, I never imagined it could be needed.

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 253
  • Call me Vic!
    • View Profile
    • PublicDomainGift.com
    • Read more about this member.
    • Donate to Member
Re: Show Center of monitor screen
« Reply #7 on: April 20, 2021, 10:21 AM »
Any takers to my problem?

Hi Curt, I'm in with ScreenMark! :Thmbsup:

Do you have the exact same requirement? i.e. show a mark @ the very center of your screen? Anything else?

(Do feel free to expand for v0.1.0)

Cheers!
Vic
♥♥♥ You may support this project by expressing your excitement in the form of a Donation using DonationCredits, via Paypal @ PayPal.me/victorvls or by becoming a Patron @ Patreon.com/publicdomain

Thanks & keep on rocking!
Email: publicdomainvicgmail.com

Coding: AppFolderIcon v0.2.0
--Victor
« Last Edit: April 20, 2021, 12:47 PM by publicdomain »

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,326
    • View Profile
    • Donate to Member
Re: Show Center of monitor screen
« Reply #8 on: April 20, 2021, 11:16 AM »
The app is not doing its job properly on my 1920x1080: The cross comes up half a centimer off center! -even with no apps open.

Without knowing the full details, my guess is that it has to do with the taskbar always being displayed by default.

I recently encountered a similar issue where an app I use (DisplayFusion) wasn't properly centering windows on my monitor and I found that by setting my taskbar to hide then it would center them properly.

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 253
  • Call me Vic!
    • View Profile
    • PublicDomainGift.com
    • Read more about this member.
    • Donate to Member
Re: Show Center of monitor screen
« Reply #9 on: April 20, 2021, 05:20 PM »
Hi Curt, I'm in with ScreenMark! :Thmbsup:
-publicdomain (April 20, 2021, 10:21 AM)

Hello again! In the process of creating the graphical interface for ScreenMark now :)

Currently adding mark on:

- Screen center.
- Working area center.
- Active window center.

With the options:

- Display mark on all screens (for multi-monitor setups).
- Enable Hotkeys on ALT + SHIFT + M.
- Rounding by floor or ceiling.
- Move cursor to latest mark.

This can do the job for first version.

More features can surely be added if you (or any other fellow user) require it later.

Feel free to comment if you want different hotkeys, et cetera... First version is the most-malleable stage



Cheers!
♥♥♥ You may support this project by expressing your excitement in the form of a Donation using DonationCredits, via Paypal @ PayPal.me/victorvls or by becoming a Patron @ Patreon.com/publicdomain

Thanks & keep on rocking!
Email: publicdomainvicgmail.com

Coding: AppFolderIcon v0.2.0
--Victor
« Last Edit: April 20, 2021, 08:40 PM by publicdomain »

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,552
    • View Profile
    • Donate to Member
Re: Show Center of monitor screen
« Reply #10 on: April 20, 2021, 06:09 PM »
I'm in with ScreenMark!

Do you have the exact same requirement? i.e. show a mark @ the very center of your screen?
-publicdomain

Yes, Vic, same procedure. The very center.

But Deozaan made me realize that the taskbar can make a difference? However, I have never had the need for the precise vertical spot, merely the horizontal (width) one. So I am GUESSING that the taskbar that Deozaan is mentioning, not is the problem; I was only talking about the spot being too far to the right. I have not even checked if the displayed spot is too high up or what. Edited: I have Taskbar > AutoHide
« Last Edit: April 20, 2021, 06:27 PM by Curt »

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 253
  • Call me Vic!
    • View Profile
    • PublicDomainGift.com
    • Read more about this member.
    • Donate to Member
Re: Show Center of monitor screen
« Reply #11 on: April 20, 2021, 07:57 PM »
Yes, Vic, same procedure. The very center.

Super! The math's straightforward & the WinAPI calls are pretty documented :)

Fast-tracking this app as the very first of our "Public Domain REIMPLEMENTATION" service :Thmbsup:
♥♥♥ You may support this project by expressing your excitement in the form of a Donation using DonationCredits, via Paypal @ PayPal.me/victorvls or by becoming a Patron @ Patreon.com/publicdomain

Thanks & keep on rocking!
Email: publicdomainvicgmail.com

Coding: AppFolderIcon v0.2.0
--Victor

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 628
    • View Profile
    • Donate to Member
Re: Show Center of monitor screen
« Reply #12 on: April 20, 2021, 08:04 PM »
The app is not doing its job properly on my 1920x1080: The cross comes up half a centimer off center! -even with no apps open.

Without knowing the full details, my guess is that it has to do with the taskbar always being displayed by default.

I recently encountered a similar issue where an app I use (DisplayFusion) wasn't properly centering windows on my monitor and I found that by setting my taskbar to hide then it would center them properly.
FYI the taskbar is not part of the desktop client area. Normal apps center on desktop, so their centering is correct.
You can write code to get around that issue for people who use a ruler to notice that at all  :P

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,326
    • View Profile
    • Donate to Member
Re: Show Center of monitor screen
« Reply #13 on: April 21, 2021, 02:06 AM »
But Deozaan made me realize that the taskbar can make a difference? However, I have never had the need for the precise vertical spot, merely the horizontal (width) one. So I am GUESSING that the taskbar that Deozaan is mentioning, not is the problem; I was only talking about the spot being too far to the right. I have not even checked if the displayed spot is too high up or what. Edited: I have Taskbar > AutoHide

I think you are correct that my guess was unrelated to your issue after all.

FYI the taskbar is not part of the desktop client area. Normal apps center on desktop, so their centering is correct.
You can write code to get around that issue for people who use a ruler to notice that at all  :P

My problem was that I was trying to use OBS to capture a 1920x1080 portion in the center of my 2560x1400 monitor. So I used DisplayFusion and set up a hotkey to resize the current window to 1920x1080 and place it in the center of the screen. Where the window ended up and where OBS recorded on my monitor were not aligned (vertically, as Curt correctly surmised). I found that by setting my taskbar to auto-hide, DisplayFusion began placing the window in the same location that OBS was recording.

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 253
  • Call me Vic!
    • View Profile
    • PublicDomainGift.com
    • Read more about this member.
    • Donate to Member
Re: Show Center of monitor screen
« Reply #14 on: April 22, 2021, 08:08 PM »
With the options:
-publicdomain (April 20, 2021, 05:20 PM)

Proggie's progressing:

ScreenMark_v0-1-0.png

Options have expanded:

ScreenMark_options.png

First version's shaping as a goodie/keeper, functionality-wise  :)
♥♥♥ You may support this project by expressing your excitement in the form of a Donation using DonationCredits, via Paypal @ PayPal.me/victorvls or by becoming a Patron @ Patreon.com/publicdomain

Thanks & keep on rocking!
Email: publicdomainvicgmail.com

Coding: AppFolderIcon v0.2.0
--Victor

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 628
    • View Profile
    • Donate to Member
Re: Show Center of monitor screen
« Reply #15 on: April 23, 2021, 04:22 AM »
First version's shaping as a goodie/keeper, functionality-wise  :)
-publicdomain (April 22, 2021, 08:08 PM)
You might want to look at RegisterHotKey and UnregisterHotKey, just as a small hint  ;D

Images looks wonderful! Amazing job you do there!!  :up:  :Thmbsup: :up:

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,552
    • View Profile
    • Donate to Member
Re: Show Center of monitor screen
« Reply #16 on: April 25, 2021, 06:00 PM »
[ Invalid Attachment ]It would be interesting to know if any of you guys have tried the (attached) original file from lanux128 ? It was fine on Windows Vista - so I am wondering if the problem might be my setup. I mean, how can (A_ScreenWidth/2), (A_ScreenHeight/2) give anything but the center? Why is there a problem in the first place?

 :tellme:
« Last Edit: May 03, 2021, 07:49 PM by Curt »

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 628
    • View Profile
    • Donate to Member
Re: Show Center of monitor screen
« Reply #17 on: April 26, 2021, 08:09 PM »
so I am wondering if the problem might be my setup. I mean, how can (A_ScreenWidth/2), (A_ScreenHeight/2) give anything but the center? Why is there a problem in the first place?
FYI the taskbar is not part of the desktop client area. Normal apps center on desktop, so their centering is correct.
Still just a guess and a fact; if author really has used your formula there would be another problem, "Screen" is a dimensional sum of all connected displays :-] (having 2 displays of same size the center would be "one half on left and one half on right display")
Luckily there are Api ways to determine position and size of taskbar, aslong original taskbar is used. If custom taskbar was used, last chance would be to recognize dimension of current active display to center things like you want to have it.

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 253
  • Call me Vic!
    • View Profile
    • PublicDomainGift.com
    • Read more about this member.
    • Donate to Member
Re: Show Center of monitor screen
« Reply #18 on: April 28, 2021, 09:31 AM »
Hi guys! I'm "clipping" some functionality to publish this baby today. Core works in a straightforward way. The bells & whistles can be added in a further version (hey! this is the very first v0.1.0 release after all, there's room to expand :) )

Cheers!  :Thmbsup:
♥♥♥ You may support this project by expressing your excitement in the form of a Donation using DonationCredits, via Paypal @ PayPal.me/victorvls or by becoming a Patron @ Patreon.com/publicdomain

Thanks & keep on rocking!
Email: publicdomainvicgmail.com

Coding: AppFolderIcon v0.2.0
--Victor

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 253
  • Call me Vic!
    • View Profile
    • PublicDomainGift.com
    • Read more about this member.
    • Donate to Member
Re: Show Center of monitor screen
« Reply #19 on: April 30, 2021, 11:48 AM »
♥♥♥ You may support this project by expressing your excitement in the form of a Donation using DonationCredits, via Paypal @ PayPal.me/victorvls or by becoming a Patron @ Patreon.com/publicdomain

Thanks & keep on rocking!
Email: publicdomainvicgmail.com

Coding: AppFolderIcon v0.2.0
--Victor
« Last Edit: April 30, 2021, 05:10 PM by publicdomain »

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 253
  • Call me Vic!
    • View Profile
    • PublicDomainGift.com
    • Read more about this member.
    • Donate to Member
Re: Show Center of monitor screen
« Reply #20 on: April 30, 2021, 06:44 PM »
ScreenMark v0.1.0 released
-publicdomain (April 30, 2021, 11:48 AM)

It should be good enough for your use-case: Launch program, put target on foreground, press CTLR+ALT+M to mark.

This is traditional Winapi/GDI+ painting (so the mark is "sticky" until stopped).

We can try other ways to mark such as full-screen invisible click-though form Window & hooks if you wish :up:

I'm open to adding improvements with further versions :) i.e. Move cursor to mark / more control on mark features-/ other.

Cheers!


♥♥♥ You may support this project by expressing your excitement in the form of a Donation using DonationCredits, via Paypal @ PayPal.me/victorvls or by becoming a Patron @ Patreon.com/publicdomain

Thanks & keep on rocking!
Email: publicdomainvicgmail.com

Coding: AppFolderIcon v0.2.0
--Victor

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,552
    • View Profile
    • Donate to Member
Re: Show Center of monitor screen
« Reply #21 on: May 01, 2021, 05:25 PM »
I have not yet tested further than opening, click hotkeys, closing, repeating a couple of times - and wondering What blue pen?

To me it is well working, Victor.  :Thmbsup:

Would you care to add Start hidden / minimized to systray / notification area, please?


publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 253
  • Call me Vic!
    • View Profile
    • PublicDomainGift.com
    • Read more about this member.
    • Donate to Member
Re: Show Center of monitor screen
« Reply #22 on: May 03, 2021, 10:00 AM »
To me it is well working, Victor.

Sweet news Curt! Thanks for confirming

Would you care to add Start hidden / minimized to systray / notification area, please?

Sure thing. It comes with ScreenMark v0.2.0
♥♥♥ You may support this project by expressing your excitement in the form of a Donation using DonationCredits, via Paypal @ PayPal.me/victorvls or by becoming a Patron @ Patreon.com/publicdomain

Thanks & keep on rocking!
Email: publicdomainvicgmail.com

Coding: AppFolderIcon v0.2.0
--Victor

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,552
    • View Profile
    • Donate to Member
Re: Show Center of monitor screen
« Reply #23 on: May 03, 2021, 07:41 PM »
Only now do I understand the original problem:

CENTERCROSSES.jpgShow Center of monitor screen

The blue plus in the picture is from the new "publicdomain" app, and the black&white 'plus' is from the old app from lanux128. Notice how the upper left corner of the b/w 'plus' -sign is in that exact spot the center of its plus-sign should be. So, the "ShowScreenCenter" program is accurate, as expected, but how to show the result, was wrongly formulated.
« Last Edit: May 04, 2021, 06:00 PM by Curt, Reason: ShowScreenCenter »

GirkovArpa

  • Participant
  • Joined in 2020
  • *
  • Posts: 3
    • View Profile
    • Donate to Member
Re: Show Center of monitor screen
« Reply #24 on: May 05, 2021, 04:21 PM »
Here's an application I made a while back that looks like exactly what you need, plus lots of customization options.

preview.pngShow Center of monitor screen