Guest LedZepHead Posted August 7, 2005 Posted August 7, 2005 (edited) When there are 5 or less people in a room i want AutoIt to atuomatically close the window. this is the code so far local $play = _players($brainwindow) local $player = StringMid(($play), 11, 1) if $player < "6" then MouseClick("left", 252, 490) sleep ("5000") WinClose("classname=#32770", "Auto Post Blind") Sleep ("2000") Send("{ENTER}") but it always kicks me out before it even gets how many people r in the room. what i want is <= 5 then it click a button closes window and presses enter becuase a pop-up asks if you really want to leave. Can some one help me out here? Edited August 7, 2005 by LedZepHead
Moderators SmOke_N Posted August 7, 2005 Moderators Posted August 7, 2005 When there are 5 or less people in a room i want AutoIt to atuomatically close the window. this is the code so farlocal $play = _players($brainwindow) local $player = StringMid(($play), 11, 1) if $player < "6" then MouseClick("left", 252, 490) sleep ("5000") WinClose("classname=#32770", "Auto Post Blind") Sleep ("2000") Send("{ENTER}")but it always kicks me out before it even gets how many people r in the room. what i want is <= 5 then it click a button closes window and presses enter becuase a pop-up asks if you really want to leave. Can some one help me out here?<{POST_SNAPBACK}>Try to debug first:local $play = _players($brainwindow) local $player = StringMid(($play), 11, 1) ;Debug MsgBox(16, " Players ", "There are: " & $player & " in the room") if $player < "6" then MouseClick("left", 252, 490) sleep ("5000") WinClose("classname=#32770", "Auto Post Blind") Sleep ("2000") Send("{ENTER}") 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.
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