ccmt19 Posted March 30, 2008 Share Posted March 30, 2008 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. 2. how can rename a window tiltle? Thanks for reading... srr because of my bad English. Link to comment Share on other sites More sharing options...
monoceres Posted March 30, 2008 Share Posted March 30, 2008 2) WinSetTitle(), look it up in the help file Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
monoceres Posted March 30, 2008 Share Posted March 30, 2008 (edited) 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 March 30, 2008 by monoceres Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
ccmt19 Posted March 31, 2008 Author Share Posted March 31, 2008 Thanks for help, i figured it out Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now