Sign in to follow this  
Followers 0
Guest LedZepHead

What am i doing wrong?

2 posts in this topic

#1 ·  Posted (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 by LedZepHead

Share this post


Link to post
Share on other sites



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?

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0