Jump to content

Fire Fox & AutoIt?


Sardith
 Share

Recommended Posts

I tryed AutoIt's Window Info, no go. I wanted to know if there's a way to read the downloader's current files, the download rate, time remaining for all the downloads.

I have no idea where to begin, any help would be great.

Thanks. Jeff

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Firefox uses XUL (kind of like HTML), not standard Windows form controls, so you can't really use AutoIt with it, at least, not at that deep of a level.

If you really want to figure that stuff out, the best option you've got is to start learning about writing Firefox extensions.

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Link to comment
Share on other sites

well if its possible then this would be a very good example (i guess) dont know if it works because i dont tested it (asked ControlID) to someone else who 'd got shítfox .. This is an {EXAMPLE}

Example:

HotKeySet("{F2}", "_Example")

While 1
    Sleep(100)
WEnd

Func _Example()
    $a = ("MozillaWindowClass2")
    $b = WinGetTitle("")
    $c = ControlGetText($b, "", $a)
    ConsoleWrite($c)
EndFunc

Up to 64KB of window text can be retrieved goodlucky :)

Thnk

Edited by aceloc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Link to comment
Share on other sites

It's the proper classnameNN, but thats all I have. (MozillaWindowClass2) This is really uncharted stuff for me, never worked with IE. But what I'd like to do.. is get the file name of whats being downloaded, the downloaded amount, out of total amount, download rate, and time remaining. I want to make a tool tip. With that for every download.

So anymore help would be great.

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Opt("WinTitleMatchMode", 2) 


While 1
$Title = WinGetTitle("Downloads")
$Class = ("MozillaWindowClass2")
$DLS = ControlGetText($Title, "", $Class)
ToolTip("Current Downloads: " & $DLS, 0, 0)
Sleep(1000)
WEnd

Tool tip doesn't display anything. Little edit, so it will get the title correctly.

Edited by Sardith

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

After some trial and error, it's failing at ControlGetText ( "title", "text", controlID )

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Care to explain 64KB more in depth? As in, what it means in this context? Theres no way for me to relize that the window is above or below the cut point. And your example was not coded even to get the title. So.. umm thanks...

When you look at ControlGetText under remarks.

"Remarks

None.

"

So umm, really.. unless you explain, then I can't truely understand what your talking about. Sure I can be like, yeah only 64kb of a window text can be retrieved.. but what can I do to work around this, or whats another plan of coding something like this?

Edited by Sardith

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Care to explain 64KB more in depth? As in, what it means in this context? Theres no way for me to relize that the window is above or below the cut point. And your example was not coded even to get the title. So.. umm thanks...

When you look at ControlGetText under remarks.

"Remarks

None.

"

So umm, really.. unless you explain, then I can't truely understand what your talking about. Sure I can be like, yeah only 64kb of a window text can be retrieved.. but what can I do to work around this, or whats another plan of coding something like this?

heh.. { WinGetTitle("") } means that it gets the title of the "CURRENT" activated window.

thnk :)

edit: oh ic you editted Just before i posted.

with your "you dont even got something that gives title"

Edited by aceloc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Link to comment
Share on other sites

A little off topic but I thought this was interesting. :)

The XUL name is a reference to the film Ghostbusters, in which the ghost of an ancient Sumerian deity called Zuul possesses the character Dana Barrett (played by Sigourney Weaver) and declares "There is no Dana, only Zuul". Since XUL is unusual in using XML to define an interface, rather than a document, its developers adopted the slogan "There is no data, only XUL". This is referred to by the XML namespace URI at the beginning of every XUL document, when viewed with a XUL-capable application, the document pointed to displays the slogan in large letters in the center of the screen (similar to that to the right).

"Keymaster" and "gatekeeper" are also references to the same plotline. This is not the only reference to Ghostbusters within Mozilla - for instance, the Javascript debugger component is called Venkman, after one of the main characters in the film.

http://en.wikipedia.org/wiki/XUL#Trivia

Anyway , OCR might work but is kind of clunky when using it for non game windows as it can't be minimized IIRC. Do a quick search for OCR if interested.

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to comment
Share on other sites

Yeah, i've used OCR.. Not a fan, but it's a choice if need be.. One that I didn't think of.

Thanks.

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Yeah, i've used OCR.. Not a fan, but it's a choice if need be.. One that I didn't think of.

Thanks.

you are acting like a real retard.. you dont have to be a "fan" its a solution which you should try.. you ask US how to do it.. and when someone try's to help you only give bad responses like "not a fan", "you dont even..." :):P:D

thnk

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Link to comment
Share on other sites

you are acting like a real retard.. you dont have to be a "fan" its a solution which you should try.. you ask US how to do it.. and when someone try's to help you only give bad responses like "not a fan", "you dont even..." :):P:D

thnk

Ok, let me rephrase my comment for the "real" retard? Wow, really how old are you? Look up on M-W, what a retard is.

By the way you have great grammer/understanding. Can you explain to me what you mean by 64 bytes yet? Your calling me a retard?

It's not my first choice to use OCR. I will use it as a last choice. I could do this in OCR if I wanted, I 'asked for help on using this method'. (Using Classname and ControlGetText)

"Try you Ask us how to do it." Yes, maybe because it's human nature... we don't like what we hear always? Second off, you gave me a attempt that wouldn't work yourself. So tell me how thats helping me? What are you doing right now? Criticizing nothing more, save your ranks for someone else's thread.

Edited by Sardith

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

I use download statusbar. nifty little extension...

and aceloc, chill ! this is the support forum... If you can't post something that might be helpful instead of flaming... don't post at all...

> there are 10 types of people in the world, those who understand binary and those who don't.

Link to comment
Share on other sites

  • 2 weeks later...

Sorry, but I have until now never scripted with AutoIt and my English is not good, because I am a German and don't have often situations to articulate in english.

Thr problems with Firefox and AutoIt-like scripters are very familar to me. I liked to automate opening multiple pages of Yahoo groups, and got same problems as mentioned in this thread.

I tried Autohotkey even with no expirience with this software and even with systen-programming but I have long used delphi, so the way of thinking in programming-code isnot quit strange for me.

I had to do much experiments and much walking through the huge Autohotkey-Documentation and Forums, until I found to the above describing of the problem:

Firefox is not standard-windows programmed and therefore AutoIt Window Info and Windowspy can't read out the searched informations and AutoIt and Autohotkey can't even too.

But at the point of my momentan knowledgement there is a way with Javascript. (In my case there is a command "onmouseover" for example).

The solutution could be to realize a device (I know wrong word, should be translation for "Schnittstelle") which lets work Javascript-Commands in AutoIt. The other way could be to use an extension like Greasemonkey, which manages Javascripts in Firefox and write a Javascript.

To make a long text short, I think the best way is, in Firefox to work with Javascript - maybe with AutoIt (I know in Autohotkey there are scripts for merging AHK and Javascript programmed, so I am shure, this is in AutoIt possible too.)

P.S: There is much in AutoIt, I like when comparing with AHK.

MatthiasW

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...