Jump to content

Rezizing window.


lolp1
 Share

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.

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

  • Moderators

WinMove

Edit: Smoke_N beat me to it.

Sometimes you gotta be quick :)

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.

Link to comment
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.

Link to comment
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- #
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...