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
I dont have the WMPLOC.DLL on my computer so i get errors, im on windows 10
- Joe Glines
- Posts: 771
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos
Just comment out the lines that call it. You won't have the icon for the menu items that used it but that is the quickest/easiest way to remedy it.
Or you could download it here and put it in these locations:
C:\Windows\System32
C:\Windows\SysWOW64
Or you could download it here and put it in these locations:
C:\Windows\System32
C:\Windows\SysWOW64
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
- Joe Glines
- Posts: 771
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos
I'm looking forward to our Webinar this Tuesday @ 4 EST on Web scraping with AutoHotkey.
Here's the original post and signup link
Here's the original post and signup link
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos
Hi Joe,
thanks for the awesome tutorial.
one simple script , but I cannot get it work,
Here my script
. First I have an error that says
so I tried to just remove #Include <default_Settings>. to get over the error.
I have IE page open to amazon login just like your first video. I press the green triangle button but there is no message box?
any idea? thank you
thanks for the awesome tutorial.
one simple script , but I cannot get it work,
Here my script
. First I have an error that says
C:\IT\AutoHotKey\SciTE\OMSItrade.ahk (1) : ==> Function library not found.
Specifically: #Include <default_Settings>
Code: Select all
#Include <default_Settings>
Browser_Forward::Reload
Browser_Back::
;***********************************************************
pwb := WBGet()
var:=pwb.LocationURL ;grab current url
MsgBox,,page url, % var
so I tried to just remove #Include <default_Settings>. to get over the error.
I have IE page open to amazon login just like your first video. I press the green triangle button but there is no message box?
any idea? thank you
- Joe Glines
- Posts: 771
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos
Hi bobnoob,
Yes, definitely comment out the #include default. It is a file on my computer that I use "everywhere" but is not needed.
If you're using the syntax writer you should have had the "WBGet" function also pasted to that page when you used it. Basically you're trying to use the wbGET function when your code shows: pwb :=WBGet()
The syntax writer would have inserted the following :
Yes, definitely comment out the #include default. It is a file on my computer that I use "everywhere" but is not needed.
If you're using the syntax writer you should have had the "WBGet" function also pasted to that page when you used it. Basically you're trying to use the wbGET function when your code shows: pwb :=WBGet()
The syntax writer would have inserted the following :
Code: Select all
pwb := WBGet()
;************Pointer to Open IE Window******************
WBGet(WinTitle="ahk_class IEFrame", Svr#=1) { ;// based on ComObjQuery docs
static msg := DllCall("RegisterWindowMessage", "str", "WM_HTML_GETOBJECT")
, IID := "{0002DF05-0000-0000-C000-000000000046}" ;// IID_IWebBrowserApp
;// , IID := "{332C4427-26CB-11D0-B483-00C04FD90119}" ;// IID_IHTMLWindow2
SendMessage msg, 0, 0, Internet Explorer_Server%Svr#%, %WinTitle%
if (ErrorLevel != "FAIL") {
lResult:=ErrorLevel, VarSetCapacity(GUID,16,0)
if DllCall("ole32\CLSIDFromString", "wstr","{332C4425-26CB-11D0-B483-00C04FD90119}", "ptr",&GUID) >= 0 {
DllCall("oleacc\ObjectFromLresult", "ptr",lResult, "ptr",&GUID, "ptr",0, "ptr*",pdoc)
return ComObj(9,ComObjQuery(pdoc,IID,IID),1), ObjRelease(pdoc)
}
}
}
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos
Sorry Yes, it does have that too.
I just push it down , as I was watching your video and I follow step by step . unfortunately it didn't go as well as the video.
do I just click the green Triangle and it will show message box right?
does it matter that I am running my SciTE.exe from this location: C:\IT\AutoHotKey\SciTE\SciTE.exe
here is some screenshot. I click the green triangle .. but I don't see a message box.
thank you again
I just push it down , as I was watching your video and I follow step by step . unfortunately it didn't go as well as the video.
do I just click the green Triangle and it will show message box right?
does it matter that I am running my SciTE.exe from this location: C:\IT\AutoHotKey\SciTE\SciTE.exe
here is some screenshot. I click the green triangle .. but I don't see a message box.
thank you again
Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos
Press Browser_Back.do I just click the green Triangle and it will show message box right?
Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos
Helgef wrote:Press Browser_Back.do I just click the green Triangle and it will show message box right?
sorry I am slow... where do I press browser_back?
you mean press with my left mouse click?
this browser back
or this?
thank you
- Joe Glines
- Posts: 771
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos
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?
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?
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos
OK it;s working now.
The fix is to get rid of
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!!
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
Code: Select all
pwb.document.getElementsByClassName("x-btn-noicon")[1].click
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
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
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
This gets it right.
myURL := wb.document.parentWindow.document.getElementsByTagName("frame")[1].LocationURL
myURL := wb.document.parentWindow.document.getElementsByTagName("frame")[1].LocationURL
- Joe Glines
- Posts: 771
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos
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
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos
Hello
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
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
- Joe Glines
- Posts: 771
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos
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/
http://the-automator.com/web-scraping-w ... 04-frames/
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos
Merci, je vais regarder
- Joe Glines
- Posts: 771
- Joined: 30 Sep 2013, 20:49
- Location: Dallas
- Contact:
Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos
Don't thank me yet. Frames suck! LOL
Sign-up for the HK Newsletter
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey
YouTube
Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Re: Web Scraping with AutoHotkey & COM Tutorial- GUI syntax writer and demo videos
Actually it's complicated!
I looked at the source code of the page. the data is here
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
Has the code to iWB2Learner been lost?
Who is online
Users browsing this forum: No registered users and 14 guests