Sign in to follow this  
Followers 0
cbkd

Web pages

7 posts in this topic

#1 ·  Posted (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 by cbkd

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

@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')


[center]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.[/center]

Share this post


Link to post
Share on other sites

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

As 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.

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
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
Sign in to follow this  
Followers 0