Jump to content
Sign in to follow this  
lolp1

Rezizing window.

Recommended Posts

Is there a function in auto-it to resize a window, example resize notepad to 1x1. Or possible detect what size the window is, and then make the mouse clicks so they'll be in the right place.\

Func movemouse ( $x, $y )
    $name = WinGetTitle ( "Classname=Diablo II", "")
    $pos = WinGetPos ( $name, "")
    $x = $x + $pos[0]
    $y = $y + $pos[1]
    MouseClick ( "left", $x, $y, 1, 0)
EndFunc

I expiermented with that, but no luck.

Share this post


Link to post
Share on other sites

Is there a function in auto-it to resize a window, example resize notepad to 1x1. Or possible detect what size the window is, and then make the mouse clicks so they'll be in the right place.\

Func movemouse ( $x, $y )
    $name = WinGetTitle ( "Classname=Diablo II", "")
    $pos = WinGetPos ( $name, "")
    $x = $x + $pos[0]
    $y = $y + $pos[1]
    MouseClick ( "left", $x, $y, 1, 0)
EndFunc

I expiermented with that, but no luck.

WinMove()

WinGetPos()

I'll chalk these questions up to laziness :)


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Would:

WinMove("Diablo II" -", "", 0, 0, 800, 600)

be correct? (to make 800, 600 of course)

Edited by lolp1

Share this post


Link to post
Share on other sites

from manual...

WinMove ( "title", "text", x, y [, width [, height]] )

title    | The title of the window to move/resize. See Title special definition. 
text     | The text of the window to move/resize. 
x        | X coordinate to move to. 
y        | Y coordinate to move to. 
width   | [optional] New width of the window. 
height  | [optional] New height of the window.
Edited by jinxter

> there are 10 types of people in the world, those who understand binary and those who don't.

Share this post


Link to post
Share on other sites

from manual...

WinMove ( "title", "text", x, y [, width [, height]] )

title    | The title of the window to move/resize. See Title special definition. 
text     | The text of the window to move/resize. 
x        | X coordinate to move to. 
y        | Y coordinate to move to. 
width   | [optional] New width of the window. 
height  | [optional] New height of the window.
I believe its called a help file. :)

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...