Jump to content

Cant click button


Recommended Posts

Hi there

Im using the following script:

ControlSend("Login", "", "Edit1", "")
    ControlSend("Login", "", "Edit1", "username")
    ControlSetText("Login", "", 257, "")
    ControlSend("Login", "", "Edit2", "password")
;Sleep(2000)
    ControlFocus("Login", "", "FTCSkinButton1")
;Sleep(1000)
    ControlClick("Login", "", 1)

ClassNameNN = FTCSkinButton1

ControlID = 1

The button gets focus, and i can see it get clicked (it depreciates for a split second) but nothing happens, like its not even registering the click. It almost seems like the button is being clicked too quickly for it to register. Can I slow down the click speed?

Any Ideas?

Edited by leapingleon
Link to comment
Share on other sites

Sleep(5000)
    ControlFocus("Login", "Login", 1)
    ControlClick("Login", "Login", 1)

I did this, and while it was sleeping i moved the mouse button over the button and the click event goes through. Basically it looks like the mouse has to be over the button in order for it to be clicked, however i can find any command that moves the cursor to a control.

Please help this newB

Link to comment
Share on other sites

Seems like the UI has some quarky code that needs the mouse over the control... weird... but you can ControlGetPos() and move the mouse over the control with MouseMove/Opt/MouseCoordMode.

lar.

Sweet, that works. Didnt know about Opt('MouseCoordMode', 2)

Thanks for your help

Edited by leapingleon
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...