Hello!
Im trying to get FFwait() to work but it only to work when firefox opens
it doesnt work on a new tab. Im using this script:
#Include Acc.ahk
FFwait() {
WinWaitActive, ahk_class MozillaWindowClass
;button := "application.grouping2.property_page1.tool_bar2.combo_box1.push_button4"
button := "application.grouping.property_page.tool_bar.combo_box.push_button"
;button := "application.tool_bar22.combo_box3.push_button5"
;button := "application1.tool_bar3.combo_box1.push_button3"
loading := "Stop loading this page"
loaded := "Reload current page"
; sleep until the description indicates page is loaded
while description := Acc_Get("Description", button, 0, "ahk_class MozillaWindowClass") {
if (description = loaded) {
break
}
sleep, 10
}
return
}
Run, firefox.exe https://www.youtube.com/
FFwait()
msgbox, loaded
----
it seems the problem its with the button, i already tested all of these nothing works for new tabs but all of them work for the first tab aka when the firefox opens.
Anyone would help me on this one? thanks
Firefox wait for load
Re: Firefox wait for load
This work for me.
Output:
Although I have not worked with msaa before, so I may be wrong.
"4.25.3.5" is equal to "program.værktøjslinje3.kombinationsboks.trykknap3" which in turn is "application.tool_bar3.combo_box.push_button3"
Sorry about the danish.
Have you tried using this https://autohotkey.com/board/topic/7788 ... 012-09-20/ to find the button.
Code: Select all
#Include Acc.ahk
FFwait() {
;WinWaitActive, ahk_class MozillaWindowClass
loading := "Stop loading this page"
loaded := "Reload current page"
;button := "4.25.3.5" ; application.tool_bar3.combo_box.push_button3
button := "application.tool_bar3.combo_box.push_button3"
; sleep until the description indicates page is loaded
loop {
description := Acc_Get("Name", button, 0, "ahk_class MozillaWindowClass")
OutputDebug, %description%
if(description = loaded) {
break
}
sleep, 10
}
}
Run, https://www.youtube.com/
FFwait()
msgbox, loaded
return
Code: Select all
[2028] Stop loading this page
[2028] Stop loading this page
[2028] Stop loading this page
[2028] Stop loading this page
[2028] Reload current page
"4.25.3.5" is equal to "program.værktøjslinje3.kombinationsboks.trykknap3" which in turn is "application.tool_bar3.combo_box.push_button3"
Sorry about the danish.
Have you tried using this https://autohotkey.com/board/topic/7788 ... 012-09-20/ to find the button.
Please excuse my spelling I am dyslexic.
Re: Firefox wait for load
Thanks Alot ! I finally got it done, i didnt know that "AccViewer Source.ahk"
This code is working for me now thanks
This code is working for me now thanks
Code: Select all
FFwait() {
WinWaitActive, ahk_class MozillaWindowClass
button := "application.tool_bar3.combo_box.push_button3"
loading := "Stop loading this page"
loaded := "Reload current page"
; sleep until the description indicates page is loaded
while description := Acc_Get("Description", button, 0, "ahk_class MozillaWindowClass") {
if (description = loaded) {
break
}
sleep, 10
}
return
}
Re: Firefox wait for load
Now i have another problem..
How do i know when the page is loading but it only shows on the content not the browser itself
update
i got a away i think, im going to use Easy Copy addon to copy the url link till i see that the url link copied is the new one then i can run FFwait again
How do i know when the page is loading but it only shows on the content not the browser itself
update
i got a away i think, im going to use Easy Copy addon to copy the url link till i see that the url link copied is the new one then i can run FFwait again
Code: Select all
send, ^+u
sleep, 50
url1=%clipboard%
;login()
while url1 = clipboard
{
send, ^+u
sleep, 50
url2=%clipboard%
sleep, 100
}
msgbox, %url2%
Re: Firefox wait for load
Thanks, Odin! I was looking for this for a long time. Do you think I can always use this code even though Firefox is updated regularly and could break the code with new updates?Capn Odin wrote:This work for me.Output:Code: Select all
#Include Acc.ahk FFwait() { ;WinWaitActive, ahk_class MozillaWindowClass loading := "Stop loading this page" loaded := "Reload current page" ;button := "4.25.3.5" ; application.tool_bar3.combo_box.push_button3 button := "application.tool_bar3.combo_box.push_button3" ; sleep until the description indicates page is loaded loop { description := Acc_Get("Name", button, 0, "ahk_class MozillaWindowClass") OutputDebug, %description% if(description = loaded) { break } sleep, 10 } } Run, https://www.youtube.com/ FFwait() msgbox, loaded return
Although I have not worked with msaa before, so I may be wrong.Code: Select all
[2028] Stop loading this page [2028] Stop loading this page [2028] Stop loading this page [2028] Stop loading this page [2028] Reload current page
"4.25.3.5" is equal to "program.værktøjslinje3.kombinationsboks.trykknap3" which in turn is "application.tool_bar3.combo_box.push_button3"
Sorry about the danish.
Have you tried using this https://autohotkey.com/board/topic/7788 ... 012-09-20/ to find the button.
Re: Firefox wait for load
It is unlikely that firefox will stop supporting some standard of accessibility, however the standard may change, but firefox will probably remain backwards compatible for avail in this case.
If your mean the specific code, it will break if the internal layout of firefox changes, but then you just need to find the new path of the button "reload current page".
If your mean the specific code, it will break if the internal layout of firefox changes, but then you just need to find the new path of the button "reload current page".
Please excuse my spelling I am dyslexic.
Re: Firefox wait for load
this doesn't work for me.
Everytime through the loop, after a few iterations of changing values, the value of description is always "96%".
"96%" is the value of magnification level. I am using a FF addon ZoomPageWE that creates a button on the toolbar. That button has a box labeled "96".
So, there is some problem when one has this addon (and I suspect other addons that alter the toolbar). I also wonder if the arrangement of things on the toolbar matters.
Gee, it would be great if this worked, but people have been working on FFWAIT for some 10 years and I have yet to see one that works all the time.
Everytime through the loop, after a few iterations of changing values, the value of description is always "96%".
"96%" is the value of magnification level. I am using a FF addon ZoomPageWE that creates a button on the toolbar. That button has a box labeled "96".
So, there is some problem when one has this addon (and I suspect other addons that alter the toolbar). I also wonder if the arrangement of things on the toolbar matters.
Gee, it would be great if this worked, but people have been working on FFWAIT for some 10 years and I have yet to see one that works all the time.
Who is online
Users browsing this forum: Descolada, Google [Bot], mmflume, Ralf_Reddings200244, sofista and 169 guests