Ok, a little detective work. I looked at the true outerHTML of this Google page for an img in question.
https://www.google.com/search?tbm=isch& ... 4DR2Sgcn1k
One of many in a long notepad string of outerHTML. The [img] is actually part of an [a} element.
The href of the [a] is what I would need to start with.
So if your function saw "data:image..." in the src, it could try to get the img "parent' [a]'s href.
which is this:
href="/imgres?imgurl=https%3A%2F%2Fstatic.pexels.com%2Fphotos%2F87452%2Fflowers-background-butterflies-beautiful-87452.jpeg&imgrefurl=https%3A%2F%2Fwww.pexels.com%2Fsearch%2Fflowers%2F&docid=nVrbZ6x84_QItM&tbnid=ok3Ujapxrx5yrM%3A&vet=10ahUKEwialcGnp4XWAhXBOSYKHYuhBSAQMwiNAigDMAM..i&w=2144&h=1424&bih=658&biw=1280&q=flowers&ved=0ahUKEwialcGnp4XWAhXBOSYKHYuhBSAQMwiNAigDMAM&iact=mrc&uact=8"
I could urlDecode(URL) this before or after parsing as shown above. "imgurl=" to first "&" character is the URL needed.
Easy with IE_Inject as shown below. Just get me the "href" I think, as this data:image method may use different formats.
Then I can parse it as needed based on LocationURL I guess. Google's format is by far the only one to worry about.
I or you could parse it as I have shown in my IE_Inject function shown here.
myL = var mySS = "%myL%"; mySS = mySS.split('imgurl=')[1].split('&')[0];
fURL := IE_InjectJS(WinExist("ahk_class IEFrame"), myL, "mySS")
This would be consistent whether the StatusBar for StatusBarGetText is showing or not. We would not even
look at the StatusBar. Our fURL data would come from the href of the <a .. element. Maybe that would just
be the parentNode of the img element?
If you do this yourself, just search for 'background-butterflies" in your text editor"
I get the active outerHTML with:
+F1::
wb := WBGet("ahk_class IEFrame")
myL := wb.document.all.item[0].outerHTML
;then put this var into Edit1 of notepad.
This is the actual innerHTML in the pages outerHTML:
<a class="rg_l" style="left: 0px; width: 263px; height: 161px;"
href="/imgres?imgurl=https%3A%2F%2Fstatic.pexels.com%2Fphotos%2F87452%2Fflowers-background-butterflies-beautiful-87452.jpeg&imgrefurl=https%3A%2F%2Fwww.pexels.com%2Fsearch%2Fflowers%2F&docid=nVrbZ6x84_QItM&tbnid=ok3Ujapxrx5yrM%3A&vet=10ahUKEwialcGnp4XWAhXBOSYKHYuhBSAQMwiNAigDMAM..i&w=2144&h=1424&bih=658&biw=1280&q=flowers&ved=0ahUKEwialcGnp4XWAhXBOSYKHYuhBSAQMwiNAigDMAM&iact=mrc&uact=8"
rel="noopener" jsaction="fire.ivg_o;mouseover:str.hmov;mouseout:str.hmou" jsname="hSRGPd">
<img name="ok3Ujapxrx5yrM:" class="rg_ic rg_i" style="width: 263px; height: 174px; margin-top: 0px; margin-right: 0px; margin-left: 0px;" onload="typeof google==='object'&&google.aft&&google.aft(this)" alt="Image result for flowers"
src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxITEhUSEhIVFRUXFxxYVF...miles long here...jsaction="load:str.tbn" data-sz="f">
This is the URL that would be (ahk's) urlDecode(URL) to yield what I need:
https%3A%2F%2Fstatic.pexels.com%2Fphotos%2F87452%2Fflowers-background-butterflies-beautiful-87452.jpeg
to produce this
https://static.pexels.com/photos/87452/ ... 87452.jpeg
which is the URL I need.
Messing with the hex code would not do us any good anyway. The URL of the photo is what I need.
Hope this helps.
Thanks