|
Wordle 499 4/6
β¬β¬π¨β¬π©
π¨β¬β¬π¨π©
β¬π¨π©β¬π©
π©π©π©π©π©
Get me coffee and no one gets hurt!
|
|
|
|
|
My primary monitor is actually a TV, hooked up via HDMI, and Windows has the nasty habit of repositioning all my opened windows (from all monitors) whenever it's powered off/back on - as if, momentarily, it detected the only display available was running at 640x480, so all windows get moved at (0,0) and inherit that size (if they were any bigger). Then I have to resize/reposition all windows manually...
I can live with this, for the most part, but there is one window in particular (a web page, in fact, shown in a browser window all on its own with no other tabs) that I insist on having positioned at some specific coordinates and some specific size.
Is there an app that will periodically look for another window, identified by its caption, and can then move/size it automatically if it doesn't match some user preference?
I could write this with an app of my own (move any one of its own windows), but the tricky thing here is doing it for any random window that is currently on the screen - typically owned by another program. I know it's feasible, and I've probably done it in the distant past, but "correctly" messing around with window handles that aren't "my own" is something that's part of that growing area of "things I've forgotten how to do over the years"...
|
|
|
|
|
Yep; although I have libraries / dll's I have created called "Common", I still forget what I wrote and wind up writing it again; and even though I'm thinking I'm writing something new, I start to realize I've don't it before.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
When you do work it out, write a Tip on how to do it.
I've found that handy when I needed to do something and google found my own Tip on the very subject from a few years ago ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I haven't found one so I was going to write my own too. I want to start up programs and then set their location. This could be adapted to set the location of a running program fairly easily.
For me it's Visual Studio. It refuses to start up where I left it and I find that infuriating. I am certain that if I submitted a bug report they would tell me it is behavior by design, as they did with the last one, so I haven't bothered.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
VS always starts where I put it: filling my main monitor screen.
Outlook 365 on the other hand, always starts 10 or so pixels up and to the right of where I want it, no matter how many times I put it back ... I write my own apps to remember where they were and auto restore (with a "don't save / don't restore" option if you hold SHIFT while closing / opening the app). That's "baked into" my default new form / new project templates.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I had written this:
GitHub - cliftonm/LaunchPanel[^]
For the reasons you stated - I want windows to go their appropriate monitors and size as I want them.
This was intended at one point to become an article but was never finished. There are nuances to this that are complex and that I was not able to resolve to make it worthy of an article.
But have at it if you like!
|
|
|
|
|
Thanks Marc, I've made a note of it and will take a closer look when I have an opportunity.
|
|
|
|
|
If you use AutoHotKey you should be able to create a quick script to place the current window wherever you want to without going to the trouble of creating an entire app. It wouldn't be auto, like your method, but it might be a lot less work.
|
|
|
|
|
I figured there's utilities to automate this sort of thing, but yeah, I very much would prefer to have it fully automated - I'd be willing to have an app dedicated to looking for that window every 10 seconds and reposition it, on its own, without any input from my self.
Of course I'm sure there'd be edge cases once I'd start using it, so that's where the benefit of writing my own would come in - to handle the weird scenarios another app's author might not have thought of.
|
|
|
|
|
AutoHotKey can easily do that. It can detect the presence of a specific application and then position and size it. You'd just have an infinite loop with a 10 second delay ans then a check for the specific application being active.
I've been using and AutoHotKey scrip for 15+ years to make all my editors and IDEs use WordStar control sequences. It detects which editor/IDE I'm using convert the WordStar controls I'm typing into the appropriate keystrokes for the editor I'm using.
|
|
|
|
|
|
Thanks for that - I'll look into it as soon as I have a chance.
|
|
|
|
|
Here are some c++ and c# apps that you can rework to your needs:
https://github.com/T800G/PIMphonyHelper
https://github.com/T800G/IEmaximizer
|
|
|
|
|
|
I used to do things like this back in olden times with the Win32 API, I assume it's still possible. IIRC, you basically need to find the handle of the window and then you can call functions to manipulate it.
|
|
|
|
|
I used to also, back in my C++ days, and on versions of Window that were a lot more permissive than it is today. I'm absolutely certain it's still the way to do it even nowadays, only, I have to figure out the "correct" way to safely get a window handle owned by a process that's unrelated to the one that's trying to obtain it.
Fortunately I've had some really good pointers throughout this thread. Now it's just a matter of finding the time to put all the pieces together.
|
|
|
|
|
With Win16/3.x, I would write programs to export data out of private memory of other programs. That was fun!
Okay, I HAD to do it because their export function did not work if the resulting export was bigger than 16k. You would end up with a garbage file of the correct length where the data looped over itself in the first 16K.
The developer used a βfarβ pointer when they should have used a βhugeβ pointer that could span more than 16k.
Those were the days (before COM) when DDE ruled.
|
|
|
|
|
... whether I should go there to the toilet, or at the station.
|
|
|
|
|
So, months ago Microsoft decided to update my wife's laptop with Windows 11. All seemed to be well until she decided to try Audacity (Free, open source, cross-platform audio software). Won't work - really weird error messages, etc. Works fine on Windows 10 (of course).
So, being the IT guy in the house, I told her to just go back to Windows 10.
Elephant!
Did you know that Windows 11 DELETES it's reversion path after a period of time? 10 days in fact? What elephanting retard came up with the idea of deleting a user's backup without telling them? I swear, you have to wonder what group of idiots came up with that one.
Charlie Gilley
βThey who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.β BF, 1759
Has never been more appropriate.
|
|
|
|
|
You also have to ask yourself who installs a new OS without a good solid disk image backup before starting?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
You might have a point - EXCEPT - you neglect to realize that with Windows 10, Microsoft been aggressively doing crap to users' machines without approval. I cite my previous rants on the previous set of idiots that deciding to forcibly reboot users' machines to update them.
I suppose I can go in and edit the registry to turn off some behavior, but most users? My wife came down one morning to find Windows 11 installed on her machine. AUTOMATICALLY.
Nah, going to stick with my "Microsoft developers are DICKS" characterization.
Charlie Gilley
βThey who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.β BF, 1759
Has never been more appropriate.
|
|
|
|
|
charlieg wrote: Nah, going to stick with my "Microsoft developers are DICKS" characterization.
You mean, some project manager requested/approved this. The devs just do what they're told (and I'll imagine some have protested and warned about exactly your scenario).
Let's place attribution where it belongs. We're all devs here, and we know how these things work.
modified 30-Oct-22 12:21pm.
|
|
|
|
|
Okay, I can do that. What ever program manager decided this is a DICK.
Charlie Gilley
βThey who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.β BF, 1759
Has never been more appropriate.
|
|
|
|
|
Now we're talkin'
|
|
|
|