Todd1561 / TANWindowMgr

Reposition windows at the click of the mouse
88 stars 6 forks source link

Can't handle multiple instances of the same program #2

Open Todd1561 opened 4 years ago

Todd1561 commented 4 years ago

Only the instance of the program that had focus most recently will be re-positioned when restoring the window layout

gfay63 commented 3 years ago

Hello! Sure love the idea of this, as I have to reset all my windows every morning. But I have multiple VS Code windows, and multiple Chrome windows. Would LOVE for this "multiple instance of same program" issue to be resolved if you ever get a chance. Though realize you only have time for things you need resolved! :) Also love your astronomy pics!

Todd1561 commented 3 years ago

Hey thanks! I do try to resolve issues/add features for the benefit of the app, even if it's not a feature I use. But this one didn't seem to have an easy solution, or one at all. This app identifies windows based on their underlying process/exe name, which is the reason it can't handle multiple windows spawned by the same parent process. I'm certainly no expert with the Windows APIs but if I ever find a solution to this I'll update this issue.

gfay63 commented 3 years ago

Hey Todd!

Thanks for the reply! Yeah, I did some more research, and I think you are right. There isn't an easy solution, like you figured. I did find one (and only one!) other app that seems to have a workaround. I'm not quite sure how they did it, but this is what I found that seems to help at least:

1) It looks like the window rules include three elements: Window Title, Window Class, and Program path. Then it let's you edit the rules if needed to include Contains, Begins With, etc. string matches on all three. 2) The other thing they do, which solves my big problem (when monitors get unplugged, computer goes to sleep, etc.), is detect those resolution/monitor changes automatically, capture the state of ALL windows, and restore them when the monitors all come back. Seems to work perfectly with my initial testing.

I don't really even need #1 above with this feature. Pretty slick! Was worth $15 to moi!

Here it is if interested: https://www.desksoft.com/WindowManager.htm

So, I am incredibly impressed with your deep sky pics. It motivates me to definitely get some better equipment! Damn, they are amazing. I don't think my 8" Dobs (LOL!) quite cuts the mustard! Even with some CCD equipment and processing software I've fiddled with. Once I get this Company going that I've started, and hopeful success $-wise, I am definitely going down the path of some MUCH better equipment.

Take care, and thx again...

Greg

On Mon, Jun 7, 2021 at 12:01 PM Todd @.***> wrote:

Hey thanks! I do try to resolve issues/add features for the benefit of the app, even if it's not a feature I use. But this one didn't seem to have an easy solution, or one at all. This app identifies windows based on their underlying process/exe name, which is the reason it can't handle multiple windows spawned by the same parent process. I'm certainly no expert with the Windows APIs but if I ever find a solution to this I'll update this issue.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Todd1561/TANWindowMgr/issues/2#issuecomment-856106432, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABC4PO2XZ7H6PHIPMQB5XSDTRT3O7ANCNFSM4NYYY6DQ .

Todd1561 commented 3 years ago

Ha that's funny, I remember a while ago someone mentioning that software in a StackExchange thread so I finally downloaded it to play around, I was about to tell you about it here but it looks like you figured it out yourself. It appears what they're doing is using multiple methods to identify a window (mainly process name and title text). Even with that it still seems to have issues with situations like multiple chrome windows because the title will change depending on the site you're visiting and all windows will have a chome.exe process name. So while not perfect, it definitely addresses more issues than mine. To be honest, I wish I had found that myself years ago! Good luck with it.

Thanks for the kind words on the astro pics. I'm definitely no expert, I just dabble. What I do is generally referred to as EAA (Electronically Assisted Astronomy), it's basically the process of traditional observing but using highly sensitive cameras instead of your eye. It doesn't have all the fuss and hours of exposure that traditional Astrophotography has, and as such the quality suffers. But it does allow you to see a lot. I just use a very basic Celestron 6" SCT. Your dob is great visually, but you really need something with a tracking mount to do EAA/AP. You can learn more about EAA here https://www.cloudynights.com/forum/73-electronically-assisted-astronomy-eaa/

gfay63 commented 3 years ago

Hey again!

Right re: chrome. Since I have three processes on three monitors, My workaround was to fix the first tab to something simple, like Gmail on one, API documentation home page I use a lot on another, etc. Sorta works! And yeah, I also wish I'd found this a year or so back!

Thanks for the tips. Wow, I'm amazed you do all that with a 6"!! I started looking into that specific telescope. Question if you don't mind. Amazon and others have it for at least $1200, but I did stumble onto one site that sells it (I think) brand new for $799!?? Hmm, seems fishy at that low a cost. Does this look for real to you, or am I missing something?!?: https://www.bhphotovideo.com/c/product/440825-REG/Celestron_11068_NexStar_6_SE_6_0_150mm.html

Looks like the ZWO is around $900. Gonna start saving! I'll look into the EAA forum too...thx again, Todd!!

On Mon, Jun 7, 2021 at 12:47 PM Todd @.***> wrote:

Ha that's funny, I remember a while ago someone mentioning that software in a StackExchange thread so I finally downloaded it to play around, I was about to tell you about it here but it looks like you figured it out yourself. It appears what they're doing is using multiple methods to identify a window (mainly process name and title text). Even with that it still seems to have issues with situations like multiple chrome windows because the title will change depending on the site you're visiting and all windows will have a chome.exe process name. So while not perfect, it definitely addresses more issues than mine. To be honest, I wish I had found that myself years ago! Good luck with it.

Thanks for the kind words on the astro pics. I'm definitely no expert, I just dabble. What I do is generally referred to as EAA (Electronically Assisted Astronomy), it's basically the process of traditional observing but using highly sensitive cameras instead of your eye. It doesn't have all the fuss and hours of exposure that traditional Astrophotography has, and as such the quality suffers. But it does allow you to see a lot. I just use a very basic Celestron 6" SCT. Your dob is great visually, but you really need something with a tracking mount to do EAA/AP. You can learn more about EAA here https://www.cloudynights.com/forum/73-electronically-assisted-astronomy-eaa/

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Todd1561/TANWindowMgr/issues/2#issuecomment-856137684, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABC4PO3TNWZZJK5YDGMHZ4DTRUA2XANCNFSM4NYYY6DQ .

Todd1561 commented 3 years ago

B&H is totally legit and is actually where I bought mine from. $799 I think is the pretty standard price for the 6" and is what I paid back in 2017. I have no idea why Amazon is so high, I imagine it's a supply chain thing like many other products. Looks like everyone (except Amazon) is out of stock on it (including B&H) so I imagine Amazon is price gouging this. Definitely don't pay $1,200.

If you want a more astro-specific retailer (which I'd recommend) then you have a couple options here, but everyone is out of stock. I like Agena Astro, personally. https://agenaastro.com/celestron-nexstar-6-se-telescope.html https://www.highpointscientific.com/celestron-nexstar-6se-computerized-goto-sct-11068 https://optcorp.com/products/celestron-nexstar-6se

But tbh, I wouldn't buy anything in the NexStar SE line again. It's a good beginner scope, but they're pretty light duty, If you can spend a few more $$ then the Celestron Evolution line is higher quality with better tracking. It's basically the successor to the long standing SE line. But a lot depends on your goals. If you want to get into full blown AP then all of these are poor choices and you need something on a quality Equatorial mount.

I'm happy to answer more questions but probably best to take it off GitHub, you can just email me at todd@toddnelson.net

k-y commented 2 years ago

I recently had all my window positions reset after my 3440x1440 resolution got reset to 1920x1080 by some misbehaving program so went on a search for a one-button solution and came here.

However, I do have a sh*tload of chrome instances and it would suck to have them all stacked.

Before finding TANWindowMgr, I was using cmdow to get a list of all my window positions and then manually create a bat script. Could you possibly use either cmdow or look up the API it uses in order to programmatically gather window positions for programs of the same instance and then restore them?