Jump to content

More help with functions


sleepy
 Share

Recommended Posts

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

Link to comment
Share on other sites

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 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]
Link to comment
Share on other sites

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 !!!

Link to comment
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
 Share

  • Recently Browsing   0 members

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