tintin92 1 Posted December 1, 2004 Hi,New to AutoIt.$answer = ControlClick ( "Calculatrice", "", "Button5")This one works(French Calculatrice = calculator)Want to click 8 times the same button.$answer = ControlClick ( "Calculatrice", "", "Button5", , 8)Got :>"j:\Program Files\AutoIt3\autoit3.exe" /ErrorStdOut "K:\01ABBatch\11AutoIt\Calculatrice.au3" K:\01ABBatch\11AutoIt\Calculatrice.au3 (12) : ==> Error in expression.: $answer = ControlClick ( "Calculatrice", "", "Button5",,8) $answer = ControlClick ( "Calculatrice", "", "Button5",^ ERROR>Exit code: 0 Time: 0.545This one, no error, but just 1 time no 8 times.$answer = ControlClick ( "Calculatrice", "", "Button5",8)ThanksTintin92 Tintin92 Share this post Link to post Share on other sites
SlimShady 1 Posted December 1, 2004 (edited) If you're new to AutoIt then read the help file.They made it for new people so they can learn the syntax of functions.The syntax for ControlClick is:ControlClick ( "title", "text", "classnameNN" [, button][, clicks]] )For more info abut the parameters, check the help file. Edited December 1, 2004 by SlimShady Share this post Link to post Share on other sites
Jos 2,177 Posted December 1, 2004 something you need to know about parameters for functions:Many functions contain optional parameters that can be omitted. If you wish to specify an optional parameter, however, all parameters that precede it must be specified! For example, consider Run ( "filename", ["workingdir" [, flag]] ). If you wish to specify the flag, you must specify a workingdir. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
tintin92 1 Posted December 1, 2004 something you need to know about parameters for functions:<{POST_SNAPBACK}>Thanks.This one works.$answer = ControlClick ( "Calculatrice", "", "Button5","left",8)Tintin92 Tintin92 Share this post Link to post Share on other sites