Jump to content

How to locate a graphic "button"


Recommended Posts

I have a an ActiveX process within Firefox (or any browser) that has three "buttons." While not actually HTML-buttons they are area-defined Images as clickable links. IF -- Firefox is set to full screen (Maximize) I can numerically locate a "button" relative to Screen(0,0) and MouseMove to the one I need as the images are always in the same Screen psoition. BUT - If Firefox is not in full screen mode I need to find the "button." I can't use the Button.Caption as it is not an HTML-button and thus does not have a Caption. How can I find the button? Thanks

Link to comment
Share on other sites

First off, ActiveX is a Microsoft feature for Internet Explorer. It cannot work in any other browser, so whatever it is, it's not ActiveX if it works in Firefox. We might be able to help you if you tell us the website and which button you are trying to click. Otherwise, we would be just as helpful as guessing tomorrow's lottery numbers.

If you think the only way to press the button is with ControlClick and full screen, then you can try using the Firefox UDF (I think a lot of it no longer works perfectly since version 3.xx). Or you can use WinSetState ( "window title", "", @SW_MAXIMIZE) to bring it to full screen. I just tested it with this page and it worked.
 

Edited by abberration
Link to comment
Share on other sites

I have a an ActiveX process within Firefox (or any browser) that has three "buttons." While not actually HTML-buttons they are area-defined Images as clickable links. IF -- Firefox is set to full screen (Maximize) I can numerically locate a "button" relative to Screen(0,0) and MouseMove to the one I need as the images are always in the same Screen psoition. BUT - If Firefox is not in full screen mode I need to find the "button." I can't use the Button.Caption as it is not an HTML-button and thus does not have a Caption. How can I find the button? Thanks

I have a better question for you - what is the name of the web based application your using? Someone may have come up with a better way to do what your trying to do. In some cases there may be a GUI base app that you can run instead of the web based one. In even better cases that GUI based app may have command line support so no clicking buttons.

Link to comment
Share on other sites

First off, ActiveX is a Microsoft feature for Internet Explorer. It cannot work in any other browser

 

 

You are absolutely correct, sorry for the misdirection. It is a menu to run ActiveX if it is being run in IE and Server Push if on Firefox Chrome etc, the third button I forget what it is for.

The software is not smart enough to detect which browser it is running in, so that says a lot about the quality of the software. I'd rather not mention the name of the camera/site/vendor as I do not wish to promote such awful stuff, but I have spent the bucks on the camera so I need to make it work. Caveat Emptor. Guilty, but I digress.

The problem is still the same, the three "buttons" are graphics so not identifiable by Button.Caption.

I had also tried the WinSetState Macro several times before posting, but it was ignored when the script ran. I even copied and pasted a line from one of the sample scripts as I thought my Syntax may be wrong but still it was ignored.

Anyway, the point is now moot as I have found iMacros add-on for Firefox and it is incredibly easy to use and does it all perfectly. It finds the "button" regardless of screen size. It is not using th Caption in the script, but whatever it does, it does extremely well.

The Recorder in AutoIt is still very flaky at best. It generates code that will not run without a lot of editing first.

For instance

1:

It includes the recorder macro name twice and the second one has to be removed or it will not compile.

2:

the IP camera address is 192.168.110.01:6500

The recorder saves that as

192?168?110?01{SHIFTDOWN}?{SHIFTUP}6500

Of NO use at all.

Also, multiple compiles and test runs of the same script leave multiple copies running (visible in TaskManager) and the end result is chaos when running the script as it seems they all run again. I have to close Firefox and AutoIt between each edit, compile and test run.

Edited by Flogger
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...