mdes Posted April 20, 2004 Share Posted April 20, 2004 I would like to click on a button field of a html form. I tried to useControlClick ("Bla bla bla -", "", "Send Report(s) Now")but AutoIT does not find the button. I tried also differents funtions like ControlFocus(), ControlSetText(), but without success.How can I do that ?Here is a part of the html form:<form action="/sc" method="post" enctype="multipart/form-data" name="sendreport"> ... (a lot of hidden fields, text,...) Additional notes (optional - max 2000 characters):<br> <textarea name="notes" rows=3 cols=60 wrap="physical" > </textarea><br> <input type="submit" value="Send Report(s) Now"> <input type="submit" name="cancel" value="Cancel"> Gestion des congés, RTT, vacances scolaires, autres absences sur Pocket PC : CongésRFV Link to comment Share on other sites More sharing options...
scriptkitty Posted April 20, 2004 Share Posted April 20, 2004 HTML is not a real form, and the buttons are not really buttons, but just graphics and text. One way to do forms on HTML pages is to first make sure of the title, and that it is loaded, and then do a find on the page for known text on that page, and then Tab to the button and send space. I use this technique a lot. I also rename the page, so that I know when it loads the next page. AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
scriptkitty Posted April 20, 2004 Share Posted April 20, 2004 oh yea, here is a test code I did for the partial HTML you sent: $pagename="C:\Documen"; name this to your document WinWaitActive($pagename) send("^f") WinWaitActive("Find") send("optional{enter}") sleep(1000) send("{esc}") WinWaitActive("$pagename") send("{tab 2}") send("{space}") AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
mdes Posted April 21, 2004 Author Share Posted April 21, 2004 That's fine ! Thank a lot ps: Why do you putWinWaitActive("$pagename")instead ofWinWaitActive($pagename)? Gestion des congés, RTT, vacances scolaires, autres absences sur Pocket PC : CongésRFV Link to comment Share on other sites More sharing options...
scriptkitty Posted April 21, 2004 Share Posted April 21, 2004 because I made a mistake Glad you saw it. AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
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