Jump to content
Sign in to follow this  
leapingleon

Cant click button

Recommended Posts

leapingleon

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

Share this post


Link to post
Share on other sites
leapingleon

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

Share this post


Link to post
Share on other sites
leapingleon

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.