mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
If a custom window is maximized, /window cannot move the window or resize it around, is this intended? I would expect it to be able to move without problem, in my case I don't want to change the size, only move the window from its location, while keeping its size, executing /window -r first is not really an option for me.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jan 2012
Posts: 301
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 301
If I understand correctly what you want to do, then I can suggest that you try a workaround to solve this problem.
You can use the stretched window in "normal" state to fit your screen size. It will be similar to what it looks like in "maximized" state, and you will be able to move such a window.

To run and view the demo script, enter the command "/winmove":
Code
alias winmove {
  .window -d @WINMOVE 0 0 $window(@desktop).w $window(@desktop).h
  .echo -s @WINMOVE state:04 $window(@WINMOVE).state
  .timerWM1 -m 1 2000 .window @WINMOVE 50 50 -1 -1
  .timerWM2 -m 1 3000 .window @WINMOVE -50 100 -1 -1
  .timerWM3 -m 1 4000 .window @WINMOVE 50 150 -1 -1
  .timerWM4 -m 1 5000 .window @WINMOVE -50 200 -1 -1
  .timerWM5 -m 1 6000 .window @WINMOVE 0 250 -1 -1
  .timerWM6 -m 1 7000 .window @WINMOVE 0 0 $window(@desktop).w $window(@desktop).h
  .timerWM7 -m 1 10000 .window -c @WINMOVE
}

I assume that the window that is open in "maximized" state can't and shouldn't move, because it is glued (fixed) by the system itself to the borders of the screen. I could be wrong.


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
No you are right, maximized windows have smaller borders, smaller titlebar and cannot be moved.

I already tried to workaround the problem by storing the position and size while it's maximized, unmaximizing the window with window -r and then applying the stored size & position with /window again, the problem is that with the difference in size for the borders and titlebar is creating a gap where the window is not taking the whole screen, and the size of borders etc will vary between version of windows, you can't control this with mirc scripting alone.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jan 2012
Posts: 301
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 301
As far as I understand you do not like that with this method of stretching the window, its borders remain visible.
But I managed to hide them as much as possible by using the second command to resize and position the window. In my case, in the system "Windows 8.1", this is very similar to the "maximized" state.

Try this way:
Code
alias winmove {
  .window -d @WINMOVE 0 0 $window(@desktop).w $window(@desktop).h
  .window @WINMOVE -8 -5 $calc($window(@desktop).w +16) $calc($window(@desktop).h -27)
  .timerWM -m 1 10000 .window -c @WINMOVE
}

Or using a no borders window:
Code
//window -d +d @WINMOVE 0 0 $window(@desktop).w $window(@desktop).h

Most likely, apart from these methods, there is nothing else that could affect and change this position of the window borders. Unless only Khaled comes up with some new switch for windows for us.


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
The maximize state is a specific windows flag. When a window is maximized, it is treated differently by Windows. So, no, you cannot treat a maximized window in the same way as a normal, restored window.


Link Copied to Clipboard