Closed P-Rainbow closed 8 months ago
Hmm. When I try the code, it works as expected for me. I'm not sure why just changing computers would cause this to not work.
but doesn't arrange them in the wanted sizes and positions.
Can you elaborate on the actual behavior that is does do? Does it not move the windows at all? Does it move them, but in the wrong dimensions? Or something else? Are you using the same applications on both computers?
One thought might be that screensize
represents the primary display only, as I understand it. Perhaps the other computer has multiple displays?
@spyoungtech thank you for the vary detailed and caring follow-up.
I tried it a few times and seemed found the cause is the Scale and Layout of (computer's) Display Settings.
When the Scale and Layout set to 100%, it works fine. When it is set to 150% (Recommended), the Windows arranged in a smaller scale, as shown in the screenshot.
Interesting. Glad you found out what seems to be causing that. Some more context can be found in the autohotkey documentation regarding this. I also found this forum post and this forum post which may elaborate further.
Though the documentation mentions some workarounds, it's not immediately clear to me how to apply them in this context.
@spyoungtech thanks again!
Below code is to arrange 2 windows up and down, each to occupy half screen.
It works well in a computer. However the same code, in another computer, it only activates both windows, but doesn't arrange them in the wanted sizes and positions.
Can you please help me? Thank you.