Success!
Well, at least with the status bar text (on my Firefox). And for clarification, by "status bar" I mean the small box that appears in the lower left hand corner, as described here.
Add the following function to Acc.ahk:
; Added by edison 2/2013 ; ; ; Acc_IsAcc - test if object's type is IAccessbile ; ; Parameters: ; Acc - object to test ; ; Returns: ; true|false ; Acc_IsAcc(Acc) { try return ComObjType(Acc, "Name") = "IAccessible" }
It's a simple shortcut to test if an object has the IAccessible interface (i.e. it's an Accessibility object). jethrow uses that functionality in many of his functions - I just made a simple shortcut.
Here's the new status bar function (edited 2/26/2013 to use simpler Acc_Get() method):
; ; FFStatusBarText - get Firefox status bar text ; ; Requires: ; Acc.ahk ; ; Parameters: ; hwnd - [optional] Firefox window handle ; ; Returns: ; string|false ; FFStatusBarText(hwnd = "") { ; get the Firefox window's handle WinGet, hwnd, id, % hwnd ? "ahk_id" hwnd : "ahk_class MozillaWindowClass" ; get the window's Accessibility pointer FFWin := Acc_ObjectFromWindow(hwnd) ; define the path to the status bar ; this may need to change if you pass a hwnd to this function statusBarPath := "application.grouping2.property_page1.status_bar1" return Acc_Get("Name", statusBarPath, 0, FFWin) }
To test:
; press F1 to display the Firefox status bar text F1:: MsgBox % FFStatusBarText() return
Now, from what I've seen so far, the newer versions of Firefox don't actually clear the status bar, they just hide the window. The above function will show the last text that the status bar contained, even if it's not visible.
Near as I can tell, the original FFwait() function simply waits for the status bar to be empty, so that functionality, as it is, won't work. I'm still working on a way to determine it's visibility and/or some other way to tell if the page is done loading.
Please test and report your findings.
Edited by edison, 26 February 2013 - 06:17 PM.