automate web

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
usser
Posts: 148
Joined: 22 Oct 2014, 13:03

automate web

Post by usser » 07 Jun 2016, 15:07

hello!

1) is it possible to automate DOM in Firefox? if not in any other than IE browser?
2) if not, is there a simple guide to learn to automate DOM in IE? can you give me some basic examples, ie. select radio buttons, submit forms, fill forms, etc?

thanks!
usser
Posts: 148
Joined: 22 Oct 2014, 13:03

Re: automate web

Post by usser » 17 Jun 2016, 07:20

thanks for this
it looks like he is making an effort to introduce into the subject but it's not quite comprehensive

I need a table that will be like this:

Action
Open url
Select tab
Click button
Select menu item
etc

and the code/documentation at the right

Instead of reading tons of irrelevant pages
usser
Posts: 148
Joined: 22 Oct 2014, 13:03

Re: automate web

Post by usser » 20 Jun 2016, 04:33

very nice thanks!
but why do I get an error with 'while web_browser.busy' ?
I am talking about Jackie's script

isn't .busy a built in command?

also this line doesn't work:
web_browser.document.getElementById("u_0_n").click()

what kind of script/tutorial is that he has, where commands don't work?
User avatar
Blackholyman
Posts: 1293
Joined: 29 Sep 2013, 22:57
Location: Denmark
Contact:

Re: automate web

Post by Blackholyman » 20 Jun 2016, 07:09

If you follow all of the tutorial with the same site and IE11 then things do work, I've tested them myself a week ago

If your using it for another site you need to change things like element id's in methods like getElementById

Try and post the script thats giving you issues
Also check out:
Courses on AutoHotkey

My Autohotkey Blog
:dance:
usser
Posts: 148
Joined: 22 Oct 2014, 13:03

Re: automate web

Post by usser » 20 Jun 2016, 07:17

Jackie thanks for your tutorial, so I understand it is not standalone? I have to read other stuff too to make it work?

So far my script is like that:

Code: Select all

web_browser := ComObjCreate("InternetExplorer.Application")
web_browser.Visible := true

web_browser.Navigate("https://www.some.com/")

while web_browser.busy
sleep 100

Sleep 5000

web_browser.document.getElementById("some").click()
I want to know what are the commands to make the browser wait and what are the commands to click an element, select drop down menu, etc
User avatar
Blackholyman
Posts: 1293
Joined: 29 Sep 2013, 22:57
Location: Denmark
Contact:

Re: automate web

Post by Blackholyman » 20 Jun 2016, 09:18

.busy is one of a few ways to wait for a page to load you can also wait for the documents readystate to be complete or 4
You can read about some of them in one of the other tutorials i linked to

.click is the method to click an element but you need to "get" the right element first as i tell you how to do in the tutorial and others talk about other ways in the other tutorials as well

.Selectedindex can be set on plain html dropdowns and .value can also be used at times...

All this depends on how the page your trying to do this to works...

Without access to the page or its html i can't tell what will or will not work for you!
Also check out:
Courses on AutoHotkey

My Autohotkey Blog
:dance:
usser
Posts: 148
Joined: 22 Oct 2014, 13:03

Re: automate web

Post by usser » 20 Jun 2016, 10:10

Blackholyman wrote:.busy is one of a few ways to wait for a page to load you can also wait for the documents readystate to be complete or 4
You can read about some of them in one of the other tutorials i linked to

.click is the method to click an element but you need to "get" the right element first as i tell you how to do in the tutorial and others talk about other ways in the other tutorials as well

.Selectedindex can be set on plain html dropdowns and .value can also be used at times...

All this depends on how the page your trying to do this to works...

Without access to the page or its html i can't tell what will or will not work for you!
Can't you just write me a script with imaginary radio buttons, select menus, etc and then I will replace them with the real values to make the script work?
And we can take it from there.
This is because the webpage is secured and you need login to access it.
Thanks!
usser
Posts: 148
Joined: 22 Oct 2014, 13:03

Re: automate web

Post by usser » 21 Jun 2016, 04:53

Anyone help please????
usser
Posts: 148
Joined: 22 Oct 2014, 13:03

Re: automate web

Post by usser » 22 Jun 2016, 03:37

???????????????
User avatar
Blackholyman
Posts: 1293
Joined: 29 Sep 2013, 22:57
Location: Denmark
Contact:

Re: automate web

Post by Blackholyman » 22 Jun 2016, 06:14

Sorry but I will not JUST write you a script with imaginary stuff as I have other things to do with the time I'd use on that, code takes time, imaginary or otherwise

if YOU on the other hand showed a bigger attempt at trying yourself, I'd be happy to help you fix the small separated issues you may come across while attempting to do it yourself...

The tutorials that are linked to have all the basic info you need to get started!
Also check out:
Courses on AutoHotkey

My Autohotkey Blog
:dance:
usser
Posts: 148
Joined: 22 Oct 2014, 13:03

Re: automate web

Post by usser » 22 Jun 2016, 06:25

you gave me this tutorial, but it's incomplete! https://jszapp.com/how-to-create-a-shor ... y-website/
is there a complete tutorial just to autologin to a website?
User avatar
Blackholyman
Posts: 1293
Joined: 29 Sep 2013, 22:57
Location: Denmark
Contact:

Re: automate web

Post by Blackholyman » 22 Jun 2016, 06:47

hmm that tutorial is read and used by more than a 100 people everyday, you are the first to say that it's incomplete...

Some do ask for help with using the methods detailed in the tutorial on other sites as not every site is the same but the tutorial clearly covers how to login to a site that uses a normal login form.

if you need to do more to log in on your site, then the tutorial just does not cover your exact need, that's not the same as being incomplete, just means that it does not cover all ways, method, property's or functions that can be used to interact with a website though COM and why should it, that's not within the scope of that tutorial.
Also check out:
Courses on AutoHotkey

My Autohotkey Blog
:dance:
User avatar
adegard
Posts: 90
Joined: 24 Nov 2017, 05:58
Contact:

Re: automate web

Post by adegard » 21 Nov 2018, 06:53

This topic is old... but I create some functions to simplify IE automantion: https://autohotkey.com/boards/viewtopic ... 27#p249027
Could be usefull for someone
pradipsinhhada
Posts: 8
Joined: 14 Jun 2018, 07:48

Re: automate web

Post by pradipsinhhada » 28 Sep 2019, 04:50

this topic helped me but, most of ahk reply are of 2014 2015 years era. what is it? is it old? what is new then? i am just new please tell.
Post Reply

Return to “Ask for Help (v1)”