Jump to content

Question


Drew
 Share

Recommended Posts

Is there a way to use ControlClick , when their is no control ID?

I just want it to click somewhere in a browser without the browser having to be the active window. I can't seem to figure this out =/. Thank you'll for your help.

Link to comment
Share on other sites

  • Moderators

Is there a way to use ControlClick , when their is no control ID?

I just want it to click somewhere in a browser without the browser having to be the active window. I can't seem to figure this out =/. Thank you'll for your help.

If you know the handle of the control you can use that in the control id parameter. If you know the classnameNN of the control (can find this with autoinfo.exe) you can use that as well.

Matter of fact... if you open your help file up to windows management/controls you'll see a whole list of options there.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Is that a joke? ;)

Yes and no. If they already know the coordinates of the control they want to use then there's no real need for complex functions, especially if it's only for personal use since the odds are the coordinates won't change unless the page layout is updated.

Link to comment
Share on other sites

Yes and no. If they already know the coordinates of the control they want to use then there's no real need for complex functions, especially if it's only for personal use since the odds are the coordinates won't change unless the page layout is updated.

ControlClick() is far from complex, it's easy as pie. Why use a function that needs constant baby-sitting to make sure you are on the right gui, the right coordinate etc etc when you have one that you simply run that never fails?
Link to comment
Share on other sites

Is there a way to use ControlClick , when their is no control ID?

I just want it to click somewhere in a browser without the browser having to be the active window. I can't seem to figure this out =/. Thank you'll for your help.

Wait a minute here, are you trying to automate a web-browser?? You should use IE.au3 instead!!
Link to comment
Share on other sites

There is not a single program that "never fails" and never will be. I'm fairly sure Drew will just take SmOke_N's advice. We don't know that the GUI Drew wants to work with won't always be visible nor do we know that it won't. As I said before there's always the chance of the page layout being updated and if that happens the control ID may change. As an example I use gaiaonline.com. They update their layout fairly often but the overall appearance doesn't usually change and when it does they give their users warning. They mostly just change the control IDs of their buttons to prevent botting (or at least slow it down a bit). Since they only change the IDs and not the placement the coordinates would be the same, thus a program that uses ControlClick() will fail and one that uses MouseClick() will not. I'm not trying to argue I'm simply saying that it's another way to do the same thing. Both have pros and cons I was simply suggesting an alternative.

Link to comment
Share on other sites

I think you are missing the point. ControlClick() can be used with coordinates and will thus work while MouseClick() could fail since it is dependant upon much more things.

And besides, if it is a website we are talking about he should use IE.au3. Trying to automate web-browsing with keyboard and/or mouse is not smart.

Link to comment
Share on other sites

Ya but the thing is , I was hoping to use it with Firefox. IE sucks =/.

I greatly appreciate you two's input , but I can't use MouseClick. I need this to be able to run minimized , thus me needing to know how to do it with ControlClick.

I've never used ControlClick for something I didn't know the ControlID for , and wasn't sure if It was possible. I haven't done much research or "trial and error" and what SmokeN told me , ( I plan to however ).

But Thank you guys for your input on it =).

Link to comment
Share on other sites

Alrighty! Problem solved , thank you AdmiralAlkex and dbzfanatic for your input , that got me thinking about some things.

But thank you mostly to SmokeN =). Quick reply and it solved me question.

*Drew

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