Jump to content

help me with my mini scrip


Recommended Posts

1.

#Include <Misc.au3>

#include <Array.au3>

Dim $tleft, $tright, $bleft, $bright

MsgBox(1,"","where's that seller?")

$sell=MouseGetPos()

MsgBox(1,"","where's that Buy/Sell text?")

$buysell=MouseGetPos()

MsgBox(1,"","which's item?")

$item=MouseGetPos()

MsgBox(1,"","inventory left-top?")

$tleft=MouseGetPos()

MsgBox(1,"","inventory right-bottom?")

$bright=MouseGetPos()

$tright[0] = $bright[0]

$tright[1] = $tleft[1]

$bleft [0]=$tleft[0]

$bleft[1]=$bright[1]

$x=(($tleft[0]+$tright[0])/2)

$y=(($tright[1]+$bright[1])/2)

can you help me to debug this, i'm new & i don't know much about array. I need to get the center's coordinate when the user give me 4 corners' coordinate.

Posted Image

2.

how can rename a window tiltle?

Thanks for reading... srr because of my bad English.

Link to comment
Share on other sites

Here's the solution to number one as well, I made a whole new example but you will hopefully figure it out :)

MsgBox(0,"Top left","Top left pixel")
$tleft=MouseGetPos()
MsgBox(0,"Top right","Top right pixel")
$tright=MouseGetPos()
MsgBox(0,"Bottom left","Bottom left pixel")
$bleft=MouseGetPos()
MsgBox(0,"Bottom right","Bottom right pixel")
$bright=MouseGetPos()
MsgBox(0,"Moving mouse","Moving mouse the center of specified box")
$x=($tleft[0]+$tright[0])/2
$y=($tleft[1]+$bright[1])/2 ; Notice that I use just one right and one left, this will make the script better if it's not a good rectangle
MouseMove($x,$y)
Edited by monoceres

Broken link? PM me and I'll send you the file!

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...