Jump to content

What am i doing wrong?


Guest LedZepHead
 Share

Recommended Posts

Guest LedZepHead

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
Link to comment
Share on other sites

  • Moderators

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.

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