Sign in to follow this  
Followers 0
simone

click on flash button

3 posts in this topic

dear all

i did a very simple script to open speedtest website and run connection speed test. To click on the "Begin Test" button i've used the mouseclick() function with position of mouse cursor. The problem is that if i maximize the IE window or the window is opened in another position of the desktop, i need to change the "x.y" coordinates of cursor or the "click" is out of button.

the button is in the Flash part of page and Auto Inform It is reporting these informations(attached)

there is a way to make a "click" on a Flash object ? i've used controlclick but it is not working or i don't know how to use it

ControlClick("Speedtest.net - The Global Broadband Speed","","[CLASS:MacromediaFlashPlayerActiveX1]","left",350,24) = FAILURE

ControlClick("Speedtest.net - The Global Broadband Speed","","[CLASS:MacromediaFlashPlayerActiveX]; INSTANCE:1","left",350,24) = FAILURE

please there is someone that can help or clarify if it's not possible ?

thanks a lot

Share this post


Link to post
Share on other sites



Try

ControlClick("Speedtest.net - The Global Broadband Speed","","[CLASS:MacromediaFlashPlayerActiveX; INSTANCE:1]","left",350,24)

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

Thanks AlmarM but .... it's not helping in my case , here is script modified as you suggest

---------------------------------

Run(@ProgramFilesDir & ' (x86)\Internet Explorer\iexplore.exe' & ' www.speedtest.net')

WinSetState("[CLASS:IEFrame]", "", @SW_MAXIMIZE)

;$PID=ProcessExists("iexplore.exe")

Sleep(5000)

;WinActivate("Speedtest.net - The Global Broadband Speed","")

ControlClick("Speedtest.net - The Global Broadband Speed","","[CLASS:MacromediaFlashPlayerActiveX; INSTANCE:1]","left",350,25)

;mousemove(557,317)

;MouseClick("left",557,317,1)

;IF $PID Then ProcessClose($PID)

---------------------------------

the WinActivate() i have read is required by controlclick but seems there is no difference with or without.

if i use mousemove + mouseclick it works, but in this way the mouse cursor coordinates are referred to IE window and not to Flash part , so each time IE open window in different position of desktop the cursor point should be changed in order to click the button and not something different.

Looking the WindowsInfo / Control window it seems the controlclick can use coordinates of mouse cursor referred to flashObject borders, or not ?

thanks a lot

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