Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Searching for a window centerer (Read 3701 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Searching for a window centerer

In order to center various windows precisely, I'll need some software. Does anyone have any suggestions for such software? All it needs to do is center a selected window. Thanks for any help in advance
err... i'm not using windows any more ;)

Searching for a window centerer

Reply #1
I don't know of any.

Why do you need windows perfectly centered, anyway?

If you can't find anything, my advice is to make a desktop background picture exactly the size of your resolution (1024 x 768 or 1600 x 1200 or whatever) that is just one color except for lines every 10 or 20 or whatever pixels (like a ruler or graph) both horizontally and virtically.  That way you can switch the background to that, center the window, and then change the background back.
It's due for a good DEGAUSSIN'

Searching for a window centerer

Reply #2
nVidia drivers for their graphics cards have such a feature IIRC.


Searching for a window centerer

Reply #4
I was intrigued by pepoluan's post, so I had a look at AutoHotKey.

A little while later I had this.

Double-click, and the icon will sit in the systray (right-click and Exit to quit).  Hit the Windows Key + Home and the active window will be centered on the screen.  Use Windows Key + Alt + Home and it will take the task bar into account.

Here's the source:

Code: [Select]
#Home::
WinGetPos x, y, w, h, A
nx := (A_ScreenWidth/2)-(w/2)
ny := (A_ScreenHeight/2)-(h/2)
WinMove, A,,%nx%, %ny%
return

!#Home::
WinGetPos x, y, w, h, A
SysGet, sw, 16
SysGet, sh, 17
nx := (sw/2)-(w/2)
ny := (sh/2)-(h/2)
WinMove, A,,%nx%, %ny%
return

Edit: Uploaded v2 with Alt method.
I'm on a horse.

Searching for a window centerer

Reply #5
There's a (freely available) script for AutoHotkey called WinWarden (somewhere here); it is not only capable of centering windows, but also making a window stay on top, fall to bottom (even when it was hard-coded by the appmaker to stay on top), automatically resize and move somewhere on the screen as the app opens, etc.

The above link also provides many, and I do mean *many*, AutoHotkey scripts. Maybe you can find a script you like.

AutoHotkey is waaaay too powerful  one favorite use is perhaps to remove title bar of a certain app's window () and force it to go full screen... can't go more specific or I'll be warned, heh

Edit: added link, and of course, fix some Stupid Tyopes™

Searching for a window centerer

Reply #6
@SyntheticSoul:  Once you start mucking around with AutoHotkey, you come to the realization that nearly everything is possible.

I used AutoHotkey to do things like:
- Kill the Win key when in a full-screen game like Civ4 and NFSU2
- Insert an ISO8601-formatted date when I want to
- Replace the cumbersome Start menu with a far better alternative (i.e. Rajat's 320MPH script)
- Set WindowsMixer's main volume and wave volume complete with an OSD
- Automatically insert custom tags (and values) into an audio file through foobar2000

... and many more.

I can barely believe how AutoHotkey changed the way I use - and enjoy - my computer now

Searching for a window centerer

Reply #7
@SyntheticSoul:  Once you start mucking around with AutoHotkey, you come to the realization that nearly everything is possible.
Yeah, it looks pretty cool.  I had a quick look at AutoIt when tycho released REACT and thought that was nice.

- Set WindowsMixer's main volume and wave volume complete with an OSD
I noticed a script regarding this.  It caught my eye, as my old work keyboard had the volume controls (with pop up on-screen level) on it, but my new one doesn't.  I am currently using VolumeTray, which is quite nice, but I quite like the idea of using the script and being able to adapt it to my needs/whims.  Maybe I'll try to find some more time.

Thanks for the heads-up.
I'm on a horse.

Searching for a window centerer

Reply #8
@SyntheticSoul: And don't forget to not create separate scripts for them... you can conjoin most of them in one script. Keeps the SysTray area clean

And what amuses me is that actually there are more than 1 script available for the Set-Volume-With-OSD functionality, with various kinds of OSD style (e.g. text, graphic, or TV-stile)

Edit: Oh, for those of you who want to explore AutoHotkey, the main site is here, and the forums (where you can discuss, suggest, and download scripts) is here.

OT: Damn, a new AutoHotkey version. This I gotta download.

Searching for a window centerer

Reply #9
It's more fun doing it yourself though.

Code: [Select]
^+NumpadAdd:: SetMasterVolume(10)
^+NumpadSub:: SetMasterVolume(-10)

#WheelUp:: SetMasterVolume(10)
#WheelDown:: SetMasterVolume(-10)

#!WheelUp:: SetMasterVolume(2)
#!WheelDown:: SetMasterVolume(-2)

SetMasterVolume(sngAlteration)
{
If sngAlteration >= 0
    sngAlteration = +%sngAlteration%
SoundSet, %sngAlteration%
SoundGet, sngCurrentVolume
sngCurrentVolume := Round(sngCurrentVolume)
TrayTip, Volume, Master Volume: %sngCurrentVolume%, 2
}
I'm on a horse.

 

Searching for a window centerer

Reply #10
Instead of using TrayTip, why not use ToolTip, Splash, or Progress? That way the OSD's location is settable.

Of course you must use a SetTimer to kill the ToolTip/Splash/Progress, but it's not that difficult