Jump to content

Recommended Posts

Posted

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.

  • Moderators
Posted

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.

  • Moderators
Posted

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.

Posted (edited)

Would:

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

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

Edited by lolp1
Posted (edited)

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.

Posted

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- #
Posted

d0h... but it's so well documented it feels like a manual :) (fair enough?)

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

Posted

d0h... but it's so well documented it feels like a manual :P (fair enough?)

Ofcourse :)
# MY LOVE FOR YOU... IS LIKE A TRUCK- #

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
×
×
  • Create New...