Jump to content

How to fixed any window size?


Recommended Posts

Can anyone help me with a script that will fixed the window to a specific size so the user and the app itself can't re-size it?

Example. Im using MPC to play video, i make it become small and put it on the bottom right corner of my desktop, but when the next video played, the window size re-size it self and become big again.. then I need to re-size it again, and so on for the next video..

does anyone have some autoit script solution?

Link to comment
Share on other sites

Can anyone help me with a script that will fixed the window to a specific size so the user and the app itself can't re-size it?

Example. Im using MPC to play video, i make it become small and put it on the bottom right corner of my desktop, but when the next video played, the window size re-size it self and become big again.. then I need to re-size it again, and so on for the next video..

does anyone have some autoit script solution?

The easiest way might be to simply monitor the window and if the size changes set it back.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Thanks Martin, can u show me what function must be used.. maybe some script example..

First you need to be able to identify the window. You can use the window title when the app starts assuming it's always the same, and then after that use the handle because the title might change depending on the video shown. Then have a loop where you get the window size or set it.

$hW = wingettitle("????")

while 1
    sleep(300)
    $ws = WinGetPos($hW)
    if $ws[2] > $somewidth or $ws[3]<> $someheight Then
        WinMove($hW,.......
    endif
WEnd
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...