Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by Joe Glines » 14 May 2018, 11:01

No, there is not. I rarely do that so didn't have that as part of the tool.

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by AHKStudent » 14 May 2018, 10:26

Hi Joe

Quick question

Right now when I write a script that does some scraping, I have it set to close the IE by using pwb.quit() once its done.

Is there an equivalent of that within the syntax writer? I looked in the menus and also did a search on the code but did not find quit()

Thanks

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by AHKStudent » 14 May 2018, 08:50

Joe Glines wrote:The hotkey to trigger it is to hold down the control key and then left-mouse click.
beautiful work! I am learning just by playing with the features

Thank you

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by Joe Glines » 14 May 2018, 05:49

The hotkey to trigger it is to hold down the control key and then left-mouse click.

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by AHKStudent » 14 May 2018, 02:24

Hi Joe,

Using Windows 10 64bit latest updates. I run the script, I do see the tray icon and the menu but I don't see a window popup or anything else. I clicked on the tray icon and selected reload, and still no luck. I checked the code to see if I need to use a hotkey to trigger it, but I didn't notice anything.

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by Joe Glines » 09 Apr 2018, 20:50

no. You can find it, and updated versions, here https://autohotkey.com/boards/viewtopic.php?f=6&t=13031

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by jeeswg » 06 Apr 2018, 12:03

There's a link to iWB2 Learner here:
Acc library (MSAA) and AccViewer download links - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=26201

https://github.com/ahkscript/awesome-Au ... PDATED.zip

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by TXShooter » 06 Apr 2018, 11:22

Has the code to iWB2Learner been lost?

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by Didier3L » 19 Mar 2018, 09:57

Actually it's complicated! :evil:
I looked at the source code of the page. the data is here

Code: Select all

var Data_1=[new Array(1,"blank.gif","A","ABCDEFG","123456","sSSSSS","55","BOUBOU","")
];

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by Joe Glines » 17 Mar 2018, 09:07

Don't thank me yet. Frames suck! LOL

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by Didier3L » 17 Mar 2018, 09:01

Merci, je vais regarder

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by Joe Glines » 17 Mar 2018, 08:33

The fact you have frames is what is causing you the issue. Check out my video dealing with frames.
http://the-automator.com/web-scraping-w ... 04-frames/

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by Didier3L » 17 Mar 2018, 08:20

Hello 8-)
I would like to read values from a website and store them in a variable.
I use the iWB2 Learner program which gives me the following information:

index: 2050 (change depending on the fields)
name :(empty)
ID :(empty)
Frame # : IFRAME.1
index : 411 (never changes)
name : z1menuAppFrame (never changes)
id : z1menuAppFrame (never changes)
InnerText : 123456 (change depending on the fields)
OuterHTML : <div tabindex = "- 1" style = "width: 79px; text-align: left;"> 123456 </ div>

I can not use
Var:=pwb.document.all.XXXXXXX.Value ;Unique ID -no dashes
Var:=pwb.document.GetElementsByName("XXXX")[0].Value ;Object Name- Get array value
Var:=pwb.document.getElementByID("XXX").Value ;Unique ID-with dashes

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by Joe Glines » 28 Aug 2017, 15:06

I tried your code on a page that I use having frames and it did not work. I'm guessing it is something that is going to be different depending on how view page is built. Thank you for sharing

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by Visioneer » 28 Aug 2017, 10:19

This gets it right.
myURL := wb.document.parentWindow.document.getElementsByTagName("frame")[1].LocationURL

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by Visioneer » 28 Aug 2017, 09:54

Hi,
I want to get the "current" url of the 2nd frame of 2 frame frameset. It displays many different pages, while the address bar shows the original
url you started out with. It never changes. When I grab the location.href or the src, it keeps coming back with the address bar url. I need the
active url of the fames page. I do not see anything in these frame pages source code to indicate their url.

These return the address bar only. Not what I want.
;myURL := wb.document.parentWindow.document.getElementsByTagName("frame")[1].src
;myURL := wb.document.parentWindow.document.getElementsByTagName("frame")[1].document.location.href

I would prefer COM solution.

Thanks

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by Cerberus » 29 Jul 2017, 17:40

Code: Select all

pwb.document.getElementsByClassName("x-btn-noicon")[1].click
This works. Apparently, when you try it with the "get ID" method, it gives you the text area on the button, but not the button itself. I think normally "click" on such a text area works, but not on this page. So I used "get elements by class name" to get at one of the layers above the button text: any of the layers that have something with "btn" works on this page, apparently.

Notice the "[1]". The thingy "get elements" gives a collection of results, not just a single results. But you can only act on a single thing or get the content of a single thing (at least in this way). That's why you always need a number when you use a "plural" get/select thingy, if you want to act on it.

Note also that 1 means the second element, and 0 means the first element: that's called "zero indexing", and for some reason that fails to convince me, many computer languages use zero indexing.

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by bobnoob » 26 Jul 2017, 23:49

OK it;s working now.
The fix is to get rid of

Code: Select all

Browser_Forward::Reload
Browser_Back::


Now I can fill in the user name and password for the website I tried to scrap. But I cannot click the button.
Can you please check this website and advise on how to click the logon button??
https://oms.itradenetwork.com/secure/login/logon.cfm

thank you so much for replying

I have tried using iWB2 Learner. it says the login button has ID and index. but it has no name.


I tried this code to click the login. but it does not work. pwb.document.all.getElementByID("ext-gen32").click()

I did some success with this code. I just simulate enter key.
Sleep, 1000
SendInput {Enter 2}

I think I am off to a good start.

I still have a lot of questions. But I will start my own thread.



Thank you very much!!

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by Joe Glines » 25 Jul 2017, 21:53

Hi bobnoob,

It would be a bit time consuming for me to answer in an post. Do you want to email me at Joe@the-Automator.com and we'll plan a time to have a webex type call where I can walk you through some things?

Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos

by bobnoob » 25 Jul 2017, 17:20

Helgef wrote:
do I just click the green Triangle and it will show message box right?
Press Browser_Back.

sorry I am :crazy: slow... where do I press browser_back?


you mean press with my left mouse click?

this browser back
Image


or this?
Image


thank you

Top