aviaf Posted August 14, 2008 Posted August 14, 2008 (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 August 14, 2008 by aviaf
BinaryBrother Posted August 14, 2008 Posted August 14, 2008 (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 ) ThenMouseClick ( "left" , 125, 115 , 1 )EndifIf WinActive( Mozilla Firefox ) ThenSleep(5000)MouseClick ( "left" , 635, 355 , 1 )MouseClick ( "left" , 125, 115 , 1 )EndIfRead a bit more about WinActive. Open your AutoIt Help file and look under Functions/Windows Management, should give you everything you need. Edited August 14, 2008 by BinaryBrother SIGNATURE_0X800007D NOT FOUND
NELyon Posted August 14, 2008 Posted August 14, 2008 (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 August 14, 2008 by KentonBomb
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now