Sign in to follow this  
Followers 0

WinSetPos Func

5 posts in this topic

Posted

Hi,

I'm a mod from the German Autoit Forum. Quite often the question appears, how to resize a window.

Maybe we can offer a func like WinGetPos for the opposite. (WinSetPos)

Something like this :

; WinSetPos()

WinSetPos(WinGetTitle(''), 100, 100, 400, 400)

Func WinSetPos($title, $text = '', $x = 0, $y = 0, $width = @DesktopWidth, $height = @DesktopHeight)
    Local $wtmm = Opt("WinTitleMatchMode", 3)
    Local $wsc = Opt("WinSearchChildren", 1)
    Local $returnCode = WinMove($title, $text, $x, $y, $width, $height)
    Opt("WinSearchChildren", $wsc)
    Opt("WinTitleMatchMode", $wtmm)
    If $returnCode Then Return 1
    Return -1
EndFunc   ;==>WinSetPos

Just a thought.

So long,

Mega

Share this post


Link to post
Share on other sites



Posted

Seems to me like that is a rename of the WinMove function.

Share this post


Link to post
Share on other sites

Posted

Seems to me like that is a rename of the WinMove function.

Hi,

maybe an alias for nearly the same funtion. I guess, WinGetPos and WinSetPos will be much more clear for those who didn't know the helpfile that good.

So long,

Mega

Share this post


Link to post
Share on other sites

Posted (edited)

Hi,

maybe an alias for nearly the same funtion. I guess, WinGetPos and WinSetPos will be much more clear for those who didn't know the helpfile that good.

So long,

Mega

In fact WinMove is an old heritage from AutoIt V2.

Some other can be inn the same situation at least the related info link to the related function whatever is the naming.

We don't want too many alias. I think Jon can agree with that :)

Edited by jpm

Share this post


Link to post
Share on other sites

Posted

Hi,

if you break some script with the new version. Might be a chance to do this, too.

So long,

Mega

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.