Sign in to follow this  
Followers 0
Draygoes

Reading the firefox address bar, and displaying it in a messagebox.

5 posts in this topic

I am writting a small script that will read the firefox address bar and save it to a text file to be read by a program that I am making. But right now, I want it to show me what it sees in the form of a message box.

The problem with code below is that the message box displays "0". I take it that the read operation failed.

Here is the code. I cannot think of any other way to do this, so any help would be appriciated.

AutoItSetOption ("WinTitleMatchMode", 2 )
$address = WinGetText("Mozilla Firefox", "http://")
MsgBox( 0, "asdf", $address )

Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites



Isn't Firefox using XUL and not the native Windows controls? This would explain why you cannot retrieve data from the controls, even though they look familiar.

Share this post


Link to post
Share on other sites

Thanks! It works perfectly.

Though the project that I am working on is private, and will most likely never be public, if I use this code in other projects I will give you proper credit.

If I forget to, please remind me lol


Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites

For more complete control of Firefox, I recommend this FF UDF. It's great.

Share this post


Link to post
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
Sign in to follow this  
Followers 0