cbkd Posted July 29, 2006 Share Posted July 29, 2006 (edited) Hi everyone, I want to create a script that: - go to a web page - fill some text fields - push a button to access to the next web page Is there a place where I can find a sample code that do something similar ? Thanks for any help cbkd Edited July 29, 2006 by cbkd Link to comment Share on other sites More sharing options...
orange Posted July 29, 2006 Share Posted July 29, 2006 Have you looked at the address of the website that you want to send information to? Some of the time it is especially easy to just include those variables in the address when you access the page using: Inetget(...) Another way would be to use IE.au3 -- search the forums for specifics on that funciton Link to comment Share on other sites More sharing options...
Achilles Posted July 30, 2006 Share Posted July 30, 2006 (edited) Hi everyone, I want to create a script that: - go to a web page - fill some text fields - push a button to access to the next web page Is there a place where I can find a sample code that do something similar ? Thanks for any help cbkd Run("C:\Program Files\Mozilla Firefox\firefox.exe") ; open Mozilla Firefox Winwaitactive("Mozilla"); waits till the window is active Sleep(2000);wait Send("www.hotmail.com");type this in Send("{enter}") ;go to hotmail.com Winwaitactive("Sign In - Mozilla Firefox") Sleep(2000) Send("myemail@hotmail.com{Tab}mypassword{Enter}") Winwaitactive("MSN Hotmail - Today - Mozilla Firefox") Sleep(2000) Send("{tab 5}{enter}") Winwaitactive("MSN Hotmail - Inbox - Mozilla Firefox") Sleep(2000) Send("!ft") Winwaitactive("Mozilla") Send("www.gmail.com{enter}") Winwaitactive("Welcome to Gmail - Mozilla Firefox") Sleep(2000) Send("myemail@gmail.com{tab}myotherpassword{Enter}") What you want might look something like this.. that is if you don't want to use any IE.au3 stuff... -Check the Helpfile and then send key list for more about sending stuff- Piano_Man Edit: you might want to change some of the sleeps and you'll have to change all the "Winwaitactives"'s if you you IE Edited July 30, 2006 by Piano_Man My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 30, 2006 Moderators Share Posted July 30, 2006 @Piano_Man... No relevance to the thread but just so you know you could run the websites to where you want to go with FireFox like this:Run(@ProgramFilesDir & '\Mozilla Firefox\firefox.exe ' & 'https://login.live.com') Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted July 30, 2006 Moderators Share Posted July 30, 2006 Hi everyone,I want to create a script that: - go to a web page - fill some text fields - push a button to access to the next web pageIs there a place where I can find a sample code that do something similar ?Thanks for any helpcbkdAs long as you are running at least v3.1.1.129 (beta), then I'd suggest looking at the _IE*** functions. Dale has wrote some great examples for each function, so take a look at them and if you still have questions just ask. Link to comment Share on other sites More sharing options...
cbkd Posted July 30, 2006 Author Share Posted July 30, 2006 Thanks everyone for the information. I'm trying the way Piano_Man suggested as I use firefox, and also, this code looks pretty simple. With firefox having a blank home page, the folowing code works, : Run("C:\Program Files\Mozilla Firefox\firefox.exe") ; open Mozilla Firefox Winwaitactive("Mozilla"); waits till the window is active Sleep(4000);wait Send("www.bonjour.fr");type this in Send("{enter}") ;go to hotmail.com Winwaitactive("Petites annonces immobilier, voiture occasion, auto moto, emploi, bonnes affaires, vacances... : les petites annonces de ParuVendu.fr- Mozilla Firefox"); But with firefox home page set to www.free.fr , this code doesn't work, it simply launch firefox that loads www.free.fr and then stop Run("C:\Program Files\Mozilla Firefox\firefox.exe") ; open Mozilla Firefox Winwaitactive("Bienvenue sur Free - Mozilla Firefox"); waits till the window is active Sleep(4000);wait Send("www.bonjour.fr");type this in Send("{enter}") ;go to hotmail.com Winwaitactive("Petites annonces immobilier, voiture occasion, auto moto, emploi, bonnes affaires, vacances... : les petites annonces de ParuVendu.fr- Mozilla Firefox"); Any idea of what is wrong ? Link to comment Share on other sites More sharing options...
cbkd Posted July 30, 2006 Author Share Posted July 30, 2006 Ok, I found the problem, the Winwaitactive worked, the next lines did not gave what I expected because of a focus reason (had to insert some tab) 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