Sign in to follow this  
Followers 0
tarantules

Help to auto-press button on Firefox

6 posts in this topic

Hello there.I'm new in this forum and I would like to ask how to do a task with Autoit v3.

I have a modem-router (Speedtouch) and I have permanently the user interface of it on Mozilla Firefox.

I want to automate a task that press the DISCONNECT button of the router , wait about 20sec and then press again the same button to reconnect.

How can I do this?Thanks for your help anyway

Share this post


Link to post
Share on other sites



Hello there.I'm new in this forum and I would like to ask how to do a task with Autoit v3.

I have a modem-router (Speedtouch) and I have permanently the user interface of it on Mozilla Firefox.

I want to automate a task that press the DISCONNECT button of the router , wait about 20sec and then press again the same button to reconnect.

How can I do this?Thanks for your help anyway

Welcome to AutoIt forums :) .

Firefox uses it's own controls so it is more difficult to interact with tan some programmers ASIK.

I would do this:-

1) Activate FireFox (FF) using WinActivate and make sure the window is at least a minimum size so you can see the buttons and you know where they are relative to the top left of FF window using WinMove.

2) ensure you have the correct tab showing. Get the full title of FF using

$FullTitle = WIngetTitle(("Mozilla Firefox")

then check that it contains the tab heading you want using StringInStr. If not then use control TAB

Send("^{TAB}")

until you get the tab page you want.

3) find the coordinates of the buttons you want to click. The AutoItInfo tool is useful for that which will tell you the coords relative to the top left of the client area. Get the coordinates of FF using

WInGetPos("Mozilla Firefox") and add the relative cords for the button.

4) Click on the button by first moving the mouse cursor over it with MouseMove, then MouseClick.

5) Wait using Sleep

Look up all the functions I mentioned in the help file.

Best of luck.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Martin thanks a lot for your help.Your tip is working fine.Now I leave my pc all night to download and changes IP all by it self.The only problem is that i have to find a way to solve a little problem.Some kind of routine to check if the ip is different than the previous ip address because some times when the Autoit disconnects and connects my router I get the same ip and the downloading stops.

Anyway I should search to figure out how to solve this.The Autoit has too many capabilities.

Bert sorry but I'm not familiar with the telnet so I had to find another way to control my router

Edited by tarantules

Share this post


Link to post
Share on other sites

Martin thanks a lot for your help.Your tip is working fine.Now I leave my pc all night to download and changes IP all by it self.The only problem is that i have to find a way to solve a little problem.Some kind of routine to check if the ip is different than the previous ip address because some times when the Autoit disconnects and connects my router I get the same ip and the downloading stops.

Anyway I should search to figure out how to solve this.The Autoit has too many capabilities.

Bert sorry but I'm not familiar with the telnet so I had to find another way to control my router

Look up @IpAddress1 to @IpAddress4


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Martin thanks a lot for your help.

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