sleepy Posted November 27, 2006 Posted November 27, 2006 I was asked to do some testing of AUTOIT to see if it might fit into a framework to automate software testing. I am working with a device that needs configureations done through a browser I/O. So I find I am doing a lot of send("{tab}") followed by sleep(200). In some cases I may send 11 make a selection then send 15 more. I need to know how to make a function say named tapto; in this function it expects a number to be passed from the script. So I would do tabto 11 and expect the code to execute a tab with a sleep 11 times. While I did find function in the command instructions I can't get it to work. I did not find help in the FAQ. I guess I am looking for more examples how and where are they created and called. Thanks. OH I am using V3
mikehunt114 Posted November 27, 2006 Posted November 27, 2006 (edited) Func MyFunc($parameter) For $i = 0 to $parameter Send("{TAB}") sleep(10) Next EndFunc oÝ÷ ØÜ(ºWf¢ËeG¥É·¦¹Èf¢·}øéíü¨ºëvØ^ í®¢iÛ²è zËç$x-騺ا¶¡zZ_WØý´èq©e¶ºw-ìjeÊëjëh×6 $number = 11 MyFunc($number) Edited November 27, 2006 by mikehunt114 IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
roofninja Posted November 27, 2006 Posted November 27, 2006 So I find I am doing a lot of send("{tab}") followed by sleep(200).What are you "tab"ing to? Is it a check mark box? I have learned a lot in the last 2weeks and I have made a few changes because of it. RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!!
sleepy Posted November 30, 2006 Author Posted November 30, 2006 Thanks that worked, I will examin Control as well later. Func MyFunc($parameter) For $i = 0 to $parameter Send("{TAB}") sleep(10) Next EndFunc oÝ÷ ØÜ(ºWf¢ËeG¥É·¦¹Èf¢·}øéíü¨ºëvØ^ í®¢iÛ²è zËç$x-騺ا¶¡zZ_WØý´èq©e¶ºw-ìjeÊëjëh×6 $number = 11 MyFunc($number)
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