ConfidenceMan Posted June 30, 2006 Posted June 30, 2006 could someone tell me what is wrong in this part of my script? ive been rewriting this part over and over in different ways but can't seem to get it. oh yah im a total novice in script writing so this might be very simple to some of you guys out there. MouseMove( 1000, 1000, 1 ) $__a_ = MouseGetPos ( ) $x = $__a_[0] $y = $__a_[1] if ($x, 799) then Bot() if NOt ($x, 799) then Resfix() when ever i try to run it, it says something about me missing a right ")" bracket oh btw i like this smiley Interest is only a word for self reasurance
McDope Posted June 30, 2006 Posted June 30, 2006 MouseMove( 1000, 1000, 1 ) $__a_ = MouseGetPos ( ) $x = $__a_[0] $y = $__a_[1] if ($x = 799) then Bot() else then Resfix() endif the syntax of your if is/was wrong
ConfidenceMan Posted June 30, 2006 Author Posted June 30, 2006 Hm Thx McDope you did what i couldn't do for hours. oh btw i did what you told and it still didn't work said something about else statment Error but i quickly resolved that issue MouseMove( 1000, 1000, 1 ) $__a_ = MouseGetPos ( ) $x = $__a_[0] $y = $__a_[1] if ($x = 799) then Bot() if ($x <> 799) then Resfix() Thx again Interest is only a word for self reasurance
McDope Posted June 30, 2006 Posted June 30, 2006 oh sry written to fast ^^ but hey effect was the same as you get it
PsaltyDS Posted June 30, 2006 Posted June 30, 2006 Hm Thx McDope you did what i couldn't do for hours. oh btw i did what you told and it still didn't work said something about else statment Error but i quickly resolved that issue MouseMove( 1000, 1000, 1 ) $__a_ = MouseGetPos ( ) $x = $__a_[0] $y = $__a_[1] if ($x = 799) then Bot() if ($x <> 799) then Resfix() Thx again Just for the sake of clean code: things in an array are already variables and don't have to be read out to other variables. Anywhere you would normally use a variable like $x, you can put an array reference: $__a_ = MouseGetPos( ) if $__a_[0] = 799 Then Bot() Else Resfix() EndIfoÝ÷ Øò¢æ«zåÊ)íz·¬µçbÞ¡ûayÊ(اj׬ì_®®® Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
ConfidenceMan Posted June 30, 2006 Author Posted June 30, 2006 Hay Thanks That Cleaned evrything up a bit Interest is only a word for self reasurance
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