Jump to content

Recommended Posts

Posted (edited)

I want the mouse to click an apply settings button, and then click continue and then click on another tab in firefox, however the time for the settings to apply and click conitnue may differ and i dont want to lose time by making a long delay so i want it to click apply, then click continue, and if the site then goes to settings to click another tab, but if it clicked too quickly and its still at continue , then to delay 5 sec, and click at continue coordinates then click another tab, here's my coding so far:

MouseClick ( "left" , 635, 355 , 1 )

If WinActive( Basic Setup - Mozilla Firefox ) Then

MouseClick ( "left" , 125, 115 , 1 )

Endif

If WinActive( Mozilla Firefox ) Then

Sleep(5000)

MouseClick ( "left" , 635, 355 , 1 )

MouseClick ( "left" , 125, 115 , 1 )

EndIf

But it says error parsing function call, how do i fix it?

Edited by aviaf
Posted (edited)

First off, it's throwing that Function error because your WinActive Syntax is incorrect.

WinActive("title","text")
The "txt" field CAN simply be left as quotes and it will skip the filter for text.

MouseClick ( "left" , 635, 355 , 1 )

If WinActive( Basic Setup - Mozilla Firefox ) Then

MouseClick ( "left" , 125, 115 , 1 )

Endif

If WinActive( Mozilla Firefox ) Then

Sleep(5000)

MouseClick ( "left" , 635, 355 , 1 )

MouseClick ( "left" , 125, 115 , 1 )

EndIf

Read a bit more about WinActive. Open your AutoIt Help file and look under Functions/Windows Management, should give you everything you need. :P

Edited by BinaryBrother

SIGNATURE_0X800007D NOT FOUND

Posted (edited)

First off, it's throwing that Function error because your WinActive Syntax is incorrect.

Technically it is wrong, but only because he did not wrap it in "Double Quotes"

The text parameter is optional.

EDIT: Also, add

Opt("WinTitleMatchMode", 2)
to the top of your script so you can match windows by a substring of their text (Rather than the entire title) Edited by KentonBomb

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...