1
I’m developing a VBA module to open google images, search "cement", scroll the page down to the end and then use the console to input some scripts into javscript.
The Code so far is as follows::
Sub Google()
Dim IE As Object
Dim Pesquisa As String
Pesquisa = "cimento"
Set IE = CreateObject("InternetExplorer.application")
With IE
.Visible = True
.Navigate ("https://www.google.com/imghp?q=" & Pesquisa)
While .Busy Or .readyState <> 4:
DoEvents:
Wend
waittime (1000)
SendKeys "~", True
SendKeys "{PGDN}", True
.document.parentwindow.execScript "javascript_code()", "JavaScript"
End With
End Sub
Function waittime(ByVal milliSeconds As Double)
Application.Wait (Now() + milliSeconds / 24 / 60 / 60 / 1000)
End Function
However, the page does not scroll down, which is of paramount importance for the script to work. I’ve searched a lot of places to do this, but they all come back to this same Sendkeys function. If anyone has any suggestions on how to input the explorer console, I’d appreciate it too. I haven’t been able to test this method yet.
Thank you for your attention.
Please read We want answers that contain only links? and edit the answer.
– danieltakeshi
Thank you for this link, I will raise my response standard.
– Bruno Fonseca