Jump to content

Simple script help


Recommended Posts

It's been probably 8 years since i've used AutoIt. I need help getting a very simple script done, figured may be easier to enlist help.

First off, I need to get the screen coordinates for a certain location of the screen.

Then the script, basically needs to pause (what's this command) and then double click at a screen location.

With your help on how to get the coordinates, and then pause and left double click, I can probably compile the whole thing.

Many thanks in advance!

Link to comment
Share on other sites

  • Moderators

atleer, welcome to the forum. Can you be more specific about what you're trying to click on? Is it a button, are you after a radio button, etc? Also, if you can tell us what type of application you're trying to manipulate, it would help us help you. 99% of the time, there is an easier way to accomplish what you're after than with MouseClicks.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Ya it does need to be mouse clicks. It's clicking a button inside of another application. I've done this exact setup before, but I forget the coding etc. Really just need the simple coding for:

"pause"

"left mouse click"

and how to find screen coordinates.

Thanks!!

Link to comment
Share on other sites

  • Developers

Ya it does need to be mouse clicks. It's clicking a button inside of another application. I've done this exact setup before, but I forget the coding etc. Really just need the simple coding for:

"pause"

"left mouse click"

and how to find screen coordinates.

 

Sweet, so what have you tried and isn't working?

What exactly do you want to do?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Ya it does need to be mouse clicks. It's clicking a button inside of another application. I've done this exact setup before, but I forget the coding etc. Really just need the simple coding for:

"pause"

"left mouse click"

and how to find screen coordinates.

Thanks!!

;Send Pause
Send("{PAUSE}")

;Get some coordinates
$y = Random(0, @DesktopDepth)
$x = Random(0, @DesktopWidth)

;And left Click it!
MouseClick("left", $x, $y)
Link to comment
Share on other sites

@AutoIteers - I know you are enthusiastic helpers and all, and that is to be encouraged and even admired.

But when the OP hasn't provided code, and someone like Jos (especially) asks a question, then you really should be waiting until the OP has responded to that question.

There are usually one or more good reasons for this.

P.S. Jos I hope you don't mind me speaking up like this, but I have seen this happen a lot.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

  • Developers

P.S. Jos I hope you don't mind me speaking up like this, but I have seen this happen a lot.

Don't mind and have gotten used to the fact people feel they need to chime in even when we try to moderate... guess its a free world :)

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I guess we have all tolerated it too much, and now it's getting worse, but like you said it is a free world, and better that we have so many enthusiastic helpers willing to volunteer their help, than none or only a few.

Still, I wish they would consider more, hence my remarks.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

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