Jump to content

How can I read Status Bar in Google Chrome?


Recommended Posts

When I hover over a hyperlink on a site, a popup is displayed, and a status bar displays the URL. I want to capture the URL.

In Internet Explorer I can do this with StatusBarGetText. However I am now using Google Chrome and this does not work. I would like to use ControlGetText, but cannot figure out how to get the control ID of the status bar. If I use Autoit Window Info,  I must use the cursor to hover in order to make the status bar appear, but then cannot simultaneously click the status bar. 

Any suggestions?

Link to comment
Share on other sites

Why not just get the URL from the page source instead? Or are you tracking where a person's mouse pointer is going for some reason?

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

I didn't say the URL of the page, I was talking about the URLs ON the page. Every link is in the source html, you can read that to find out where the links lead to.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

@Donflinn: Do you know what a searchbox is or how to navigate in this forum thru different sections?

As i am a nice guy today i will answer

https://www.autoitscript.com/wiki/FAQ#How_can_I_control_.28click.2C_edit_etc.29_an_external_.28html.29_application.3F

And if you have installed the simplespy you hover over your element to get the basic logic when you press ctrl+w it will capture the information which you could post in this thread if you cannot find it out yourself

In the end you will have something like below (see the examples of iuiautomation on how to come to the right browser and html page)

*** Standard code ***
#include "UIAWrappers.au3"
AutoItSetOption("MustDeclareVars", 1)

_UIA_Setvar("myStatusbar","Title:=<whatever>;class:=<whatever2>")

$myUrl=_UIA_Action("myStatusbar","getvalue")
Link to comment
Share on other sites

Universalist,

My apologies for not being knowledgeable about simplespy. I confess that I am a self-taught, sometime user of Autoit, and a relative newcomer to the forum. Please bear with me, if you will.

I confess also that I have been chasing the wrong information. What I thought was a Status Bar that appeared when I hover over a hyperlink, was really a Tool Tip. So my question is, how do I read the text of tool tip that pops up when I hover over a hyperlink on a web page?

I have used Search to see if this has been answered before, but similar questions don't seem to fit my situation.

I have tried using _GUIToolTip_GetCurrentTool without success. I have also considered using ControlGetText, and _GUIToolTip_GetText but cannot figure out how to get all the parameters.

Actually, I don't even need to get the text information. All I need to know is that a ToolTip or the other PopUp has been activated, which tells me that the cursor is over an active hyperlink.

If I should start a new thread with this request, please advise me.

thanks for your help.

Link to comment
Share on other sites

The problem is answered in the iuiautomation thread but as you are a starter its probably a long way before you will understand that thread or what I write below

example 19 thru 24 will tell you if a tooltip came up

Getting information about a tooltip directly is hard with spytooling and even simplespy cannot see it

tools like inspect.exe (part of windows sdk) can watch tooltip appearing (and is based on logic like example 19 thru 24)

something like this could work but as you have to set the context first before it works you have to give more detail

$myVar=_UIA_Action("controltype:=ToolTipControl","getvalue")

BTW seeing a tooltip does not mean the hyperlink is active. Many hyperlinks and buttons show tooltip even when disabled

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...