Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clicking 2 buttons on firefox status bar
#1
Hello,
For a short description of the problem - i very frequently use to click on and off 2 buttons on firefox status bar. These buttons are 2 (js and f), amongst a few other buttons present on the status bar. They are of quick java addon.
I want to make a macro to click them both to on, and to make them off - you just need to click on them once to make them on and once to make them off. But the problem is that they are not in just 1 firefox window, but installed in many firefox portables, all with different window sizes. So making a macro to click the buttons using a feature like mouse click on coordinates will not work - even coordinates w.r.t. Window, actual screen, or etc.
Here's the image of firefox portable statusbar - these buttons are 2nd and 4th - JS, F -    
please help.
#2
Use accessible objects or "find image". Look in QM floating toolbar -> Window, control.

Macro Macro2573
Code:
Copy      Help
int w=win("Mozilla Firefox" "MozillaWindowClass")
Acc aBar.Find(w "TOOLBAR" "" "a:id=nav-bar" 0x1004 1)
Acc aJS.Find(aBar.a "PUSHBUTTON" "" "a:id=QuickJava_ToolbarIcon_Container_JavaScript" 0x1081)
Acc aF.Find(aBar.a "PUSHBUTTON" "" "a:id=QuickJava_ToolbarIcon_Container_Flash" 0x1081)
aJS.DoDefaultAction
aF.DoDefaultAction
My Firefox version does not have a status bar. These buttons are on the navigation toolbar. Therefore this macro will not work with your Firefox version, need to change something.

Quick Java add-in adds a QJ button that toggles "favorite" buttons, ie does exactly what you need. Unless you use old versions of Firefox and Quick Java.
#3
Done that. But the macro isn't working right. I am using hotkey numpad4 for doing this macro and when i press the hotkey, this thing is happening -
a delay of 5 seconds like (dont know why), then JS button gets clicked, then no f button gets clicked, rather an another inactive window (sometimes metapad which is opened up here) gets activated. Also the qm is showing an error - Error (RT) in <open ":1582: /344">MacroF: window not found. <help #IDP_ERR>? (the exact text of error is - Error (RT) in MacroF: window not found ?)

Here's the code made by - accessible object actions -

Code:
Copy      Help
int w=win(" - Mozilla Firefox" "MozillaWindowClass")
Acc a.Find(w "PUSHBUTTON" "Enable/Disable Javascript" "" 0x1001)
a.DoDefaultAction
int w1=win(" - Mozilla Firefox" "MozillaWindowClass")
Acc a1.Find(w1 "PUSHBUTTON" "" "" 0x1000)
a1.DoDefaultAction
#4
Try to create macro similar to Macro2573 in my previous post. Or upgrade Quick Java and use its QJ button.
In your macro, Acc a1.Find(w1 "PUSHBUTTON" "" "" 0x1000) does not contain button name.
#5
Maybe QJ button exists in yoour Quick Java version, but is hidden. Try Customize.


Forum Jump:


Users browsing this thread: 1 Guest(s)