Alexis Posted September 28, 2021 Report Share Posted September 28, 2021 Hey everyone, has anyone noticed an odd behaviour on Win10 and MEX Pro 4 using Window Move? If I move a Window to X: 0 and Y: 0 it's on the top border but about 8px to the right of the left border, to correct this I would have to use X: -8 . Why is that? On Win7 it seems to be working with X: 0 Quote Link to comment Share on other sites More sharing options...
rberq Posted September 28, 2021 Report Share Posted September 28, 2021 I can't reproduce your problem on my Windows 10 / MEX Pro 4 system, for a window that is less than full-screen. With the macro below, I can see the window shifted partially off the screen by the first move. It jumps to proper alignment, both visually and with the diagnostic display, by the second move. There is no change by the third move. // Window Reposition: <Current Window> Position: -8, -8 // Variable Set Integer %x%: Set to the Current Window's Left Variable Set Integer %y%: Set to the Current Window's Top Text Box Display: Display window position Delay: 2 seconds, without ability to halt // Window Reposition: <Current Window> Position: 0, 0 // Variable Set Integer %x%: Set to the Current Window's Left Variable Set Integer %y%: Set to the Current Window's Top Text Box Display: Display window position // Delay: 2 seconds, without ability to halt Window Reposition: <Current Window> Move to the top-left corner // Variable Set Integer %x%: Set to the Current Window's Left Variable Set Integer %y%: Set to the Current Window's Top Text Box Display: Display window position // Macro Return // <COMMENT Value=" "/> <WINDOW REPOSITION Option="\x00" Partial="TRUE" Wildcards="FALSE" Method="\x00" Left="-8" Top="-8" Monitor="0" _IGNORE="0x0006"/> <COMMENT Value=" "/> <VARIABLE SET INTEGER Option="\x09" Destination="%x%"/> <VARIABLE SET INTEGER Option="\x08" Destination="%y%"/> <TEXT BOX DISPLAY Title="Display window position" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 x = %x%\r\n\\par y = %y%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <DELAY Flags="\x10" Time="2"/> <COMMENT Value=" "/> <WINDOW REPOSITION Option="\x00" Partial="TRUE" Wildcards="FALSE" Method="\x00" Left="0" Top="0" Monitor="0" _IGNORE="0x0006"/> <COMMENT Value=" "/> <VARIABLE SET INTEGER Option="\x09" Destination="%x%"/> <VARIABLE SET INTEGER Option="\x08" Destination="%y%"/> <TEXT BOX DISPLAY Title="Display window position" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 x = %x%\r\n\\par y = %y%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <COMMENT Value=" "/> <DELAY Flags="\x10" Time="2"/> <WINDOW REPOSITION Option="\x00" Partial="TRUE" Wildcards="FALSE" Method="\x02" Left="0" Top="0" Monitor="0" _IGNORE="0x0006"/> <COMMENT Value=" "/> <VARIABLE SET INTEGER Option="\x09" Destination="%x%"/> <VARIABLE SET INTEGER Option="\x08" Destination="%y%"/> <TEXT BOX DISPLAY Title="Display window position" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 x = %x%\r\n\\par y = %y%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <COMMENT Value=" "/> <MACRO RETURN/> <COMMENT Value=" "/> Quote Link to comment Share on other sites More sharing options...
Alexis Posted September 28, 2021 Author Report Share Posted September 28, 2021 I tested it with your Script, on the first move the Window is at -8, -8 which appears to exactly align with the Borders of my screen. After the Second move to 0, 0 the left side has a space between the border of the screen and the window, I captured a picture. It's like MEX assumes that Windows in WIN10 have a bigger, transparent border on the left side. Quote Link to comment Share on other sites More sharing options...
acantor Posted September 28, 2021 Report Share Posted September 28, 2021 Prior to Windows 10, we had much greater ability to control the appearance of windows. The thickness of the window border, and its colour, could be adjusted. That 8 pixel difference is likely the default thickness of the window border for your display theme, and the ability to fine-tune it is limited. Quote Link to comment Share on other sites More sharing options...
rberq Posted September 28, 2021 Report Share Posted September 28, 2021 So your results are different from mine with the same script. I also tried the same script starting with a full-screen window. My results were similar to a smaller window except that the positioning to 0,0, and the positioning to top-left-corner, resulted in the RIGHT margin being partially off the screen because the window was too wide for the screen. I normally run my screen at 1366 X 768, but when I changed it to the "recommended" 1920 X 1080, the macro positioning worked fine with no right-margin problem. So acantor's information about border thickness may be the answer. Or -- shocking as it may seem -- Windows 10 may still have a few bugs. 😮 Quote Link to comment Share on other sites More sharing options...
acantor Posted September 28, 2021 Report Share Posted September 28, 2021 If you are using a slightly older version of Macro Express, there used to be a "Windows Sizing Border" command, which I believe was deprecated a few versions ago. Not sure what the command would do in Windows 10, but if your computer is fully backed up and you are feeling brave, one can experiment... although it's not an experiment I'm willing to try. Quote Link to comment Share on other sites More sharing options...
rberq Posted September 28, 2021 Report Share Posted September 28, 2021 1 hour ago, acantor said: "Windows Sizing Border" command Yes, still there in my version 4.9.1.1. Another command I have never used, or even noticed! I would hesitate to use it, too -- Help says, "This is a system command that will affect any window currently open or any that will subsequently be opened." Subsequently? Like, forever? Others I have never used are Shutdown, Power Off, and Reboot. It would be too bad to have a macro consisting only of one of those commands, tell the macro to run at ME startup, and tell ME to start automatically at Windows startup. Quote Link to comment Share on other sites More sharing options...
acantor Posted September 29, 2021 Report Share Posted September 29, 2021 During the 25 years I ran Windows 95, 98, and all the way to 7 -- I skipped Windows 8 -- I didn't hesitate to mess with window border thickness and colour because the changes made it so much easier to spot the active window. But I always made the adjustments via the Control Panel, not via Macro Express. But now that Microsoft has removed the settings, who knows what mischief the deprecated Macro Express command might do. Maybe it will do nothing? Or maybe, it will cause quirks that will last forever-more? Worse case scenario: if the Macro Express instruction makes a mess of things, you can always reinstall Windows 10 or buy a new computer!! Quote Link to comment Share on other sites More sharing options...
Alexis Posted September 29, 2021 Author Report Share Posted September 29, 2021 Well at least I managed to make the gap smaller, by changing some registry values to 0 BorderWidth and PaddedBorderWidth HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.