| View previous topic :: View next topic |
| Author |
Message |
Visioneer
Joined: 19 Nov 2007 Posts: 36
|
Posted: Mon Jul 14, 2008 6:24 pm Post subject: Get values from IE Properties popup window |
|
|
Hi,
Are there ways to get the values from an IE Properties box that would
popup when you right-click on a web-page's jpeg etc. photo.
I am looking specifically to get the Address [URL] of web-page photo
graphics (jpeg, gif etc) that the mouse is currently hovered over.
WinGet, clipboard, ControlList, Properties
yields this when the IE6 Properties box is popped up.
#327701
Internet Explorer_Server1
Button1
Button2
Button3
Button4
SysTabControl321
Of course it would be even better if the Properties box popping
up could be avoided altogether, but I still want to know how to
get values from them.
The solution must work with all versions of Internet Explorer.
Thanks |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6772 Location: Pacific Northwest, US
|
Posted: Mon Jul 14, 2008 11:02 pm Post subject: |
|
|
if you could use firefox, there is a context menu for each picture that is "Copy image location"
I don't know if there is a direct way to get the information without parsing the web page directly. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
Visioneer
Joined: 19 Nov 2007 Posts: 36
|
Posted: Tue Jul 15, 2008 12:45 am Post subject: |
|
|
The solution must work with all versions of Internet Explorer.
Sorry if I did not make that clear.
I figure that if Fire Fox could know, maybe COM, dll, sendmessage etc
could too. I need to get the URL into an ahk var.
Thanks |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6772 Location: Pacific Northwest, US
|
Posted: Tue Jul 15, 2008 2:59 am Post subject: |
|
|
search for posts by tank. he has some good scripts that can get info from IE7. many probably work with 6. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 676
|
Posted: Tue Jul 15, 2008 4:12 am Post subject: |
|
|
| Code: |
COM_Init()
google:=IE7_New("http://www.google.com")
js=
(
function whichElement()
{
if (event.srcElement.tagName.toLowerCase() == "img")
{
var imgSource=event.srcElement.src;
alert(imgSource);
}
}
document.body.onmousedown = whichElement
)
IE7_ExecuteJS(google, js) |
done _________________ Read this
Com
Automate IE7 with Tabs
Last edited by tank on Tue Jul 15, 2008 6:07 am; edited 2 times in total |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 676
|
Posted: Tue Jul 15, 2008 5:08 am Post subject: |
|
|
| engunneer wrote: | | search for posts by tank. he has some good scripts that can get info from IE7. many probably work with 6. |
they all actually work with ie6 or 7
thanks for the plug of confidence tho
seems many have been mislead by the function names into thinking they were only ie7
i was recently alerted to this by a user
for the record the functions work on a gui browser object ie6 and 7 with or without tabs _________________ Read this
Com
Automate IE7 with Tabs |
|
| Back to top |
|
 |
Visioneer
Joined: 19 Nov 2007 Posts: 36
|
Posted: Wed Jul 16, 2008 2:14 pm Post subject: |
|
|
Thanks Tank,
That is a ingenious idea. I played with it for a few hours and also used
onmousemove, because so many pictures are actually links, so
onmousedown is not "clean hover" that I hoped for. I also see that we
can run the Inject a second time to get the var to ahk. (Maybe even a
third time to delete the page's var/function, or at least set
onmouse... = null after 1 run in first Inject.)
However, it seems to not work in frames. Take a look at Google Image
for example. When you click an image to view larger, it is in a frame and
the concept does nothing as far as I can tell.
So I still want to get a solution to read/get info from a Properties popup
window. This has other uses too, like getting filename, protocol,
type,address [URL], byte size, demensions, created and modified dates,
and probably other info for other Property windows.
I use, (in IE6, would that work in IE7 too?)
SendEvent {Click right}
sleep, 200
sendPlay, r
to get the Properties window to popup. I would like to hide or move it as
soon as possible, and read info from it somehow. Please see the controls
list in my top post. I tried ControlGetText on all those controls, but I get
nothing.
THIS WORKS IN FRAMES. I know that sometimes the Right click can be
disabled, so maybe your concept could be used in conjuction with a
Properties approach.
Thanks |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 676
|
Posted: Wed Jul 16, 2008 2:39 pm Post subject: |
|
|
ill solution this later today or tomorrow there havebeen alot of rame requests lately
note ahk has no native means of interacting with web pages except by using image search which requires you to already know the image your looking for
and all of my solutions rewuire the same security requirements implemented in dom standard. most importantly
both frames will be required to have same domain portion of the url
for events you can use onmouseover onmousemove onload etc
any event that can be applied to an image accordign to w3c standards can be used i just used on mousedown for the example
| Code: | | msgbox % IE7_ExecuteJS(google, "","imgSource") |
would call the variable value newly set each time if you wanted to call it from a hotkey
all of my functions work in 6 and 7 with or without tabs
| Quote: | THIS WORKS IN FRAMES. I know that sometimes the Right click can be
disabled, so maybe your concept could be used in conjuction with a
Properties approach. |
yes so long as you have devised some method of finding the image location such as imagesearch or simply manually moving the mouse over _________________ Read this
Com
Automate IE7 with Tabs |
|
| Back to top |
|
 |
Visioneer
Joined: 19 Nov 2007 Posts: 36
|
Posted: Wed Jul 16, 2008 4:47 pm Post subject: |
|
|
Thanks Tank,
I'll be looking for it.
My app simply has the user move their mouse over an image, and press a
button. |
|
| Back to top |
|
 |
Visioneer
Joined: 19 Nov 2007 Posts: 36
|
Posted: Fri Jul 25, 2008 5:21 pm Post subject: |
|
|
Hey Tank,
Any luck or leads on reading Properties boxes ? |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 676
|
Posted: Fri Jul 25, 2008 5:28 pm Post subject: |
|
|
Sunday i plan on posting something of a web event and propertes recorder
the gist will go soemthing like this
user will click a browser
from that moment the tool will trap events and any html atributes that can be derived such as events ids and index values as well as the event itself mouseover click etc
it will be the precurser tool to a true web macro recorder which will attempt to actually write with com functions or com wrapped functions an ahk script torun or alter much the way script writer works now
I am hopeful i will have it ready by then be patient guys it will come and it will be much more object driven than any of my scripts have been to date
and better documented _________________ Read this
Com
Automate IE7 with Tabs |
|
| Back to top |
|
 |
|