Jump to content

Super Newbie Question


Recommended Posts

How do I make it so that it clicks a certain position on my screen over and over again? More specifically...

>>>>>>>>>>> Mouse Position <<<<<<<<<<<

On Desktop: x: 409 y: 608

In Window: x: 413 y: 612

I just want it to click that over and over and if someone can PLEASE help me, I downloaded Crimson Editor. I'm a big newbie, so any help is needed~!

Link to comment
Share on other sites

Read the sections in the manual titled Using AutoIt and Language Reference as a good place to get started. It covers basic things like how to run a script, how to compile one, and basic syntax such as variables and loops. You can also found all functions grouped by catagory in the Function Reference section. It shouldn't be too hard to guess where a mouse click function would be found.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

Thanks for the help, but now...

I put that in crimson editor and saved it with .au3 after the filename. Now when it runs it says error in expression. I put this in Crimson Editor...

Mouseclick ( "left" [, 409, 608, [, 99999999999999999999999999 [, 50 ]]] )

Link to comment
Share on other sites

Thanks for the help, but now...

I put that in crimson editor and saved it with .au3 after the filename. Now when it runs it says error in expression. I put this in Crimson Editor...

Mouseclick ( "left" [, 409, 608, [, 99999999999999999999999999 [, 50 ]]] )

<{POST_SNAPBACK}>

Mouseclick ( "left",  409, 608, 99999999999999999999999999, 50 )

The [] are not to be used. They're placeholders.

Edit: Cyberslug has a good suggestion. Beat me to the punch actually. :ph34r:

Edited by randd
Raoul S. Duke: Few people understand the psychology of dealing with a highway traffic cop. Your normal speeder will panic and immediately pull over to the side. This is wrong. It arouses contempt in the cop-heart. Make the bastard chase you. He will follow.
Link to comment
Share on other sites

OK, I finally figured out that the numbers cant be that big, there are limits. I keep trying to get this to work and its not. I want an infinite loop of clicking the mouse at a certain position with delays inbetween the clicks and a pause button. I can't get it to work, and I've even been reading the manual. I'm dumb :ph34r:

Link to comment
Share on other sites

MouseClick ( "left", 409, 608, 1, 0)

sleep(10)

While 1

Wend

<{POST_SNAPBACK}>

You need to put the code you want to run inside the loop. That code you posted will click once, sleep for 1/100th of a second, and then use all the CPU doing nothing over and over until you kill the script.

If you want to repeat something, it must go inside the loop.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

like this:

While 1
MouseClick ( "left", 409, 608, 1, 0)
sleep(10)
Wend

<{POST_SNAPBACK}>

You can use the code above. But it would be more important to go to the help file and look up While and MouseClick. It looks like you read the help file for mouseclick but you didnt' understand what the formating was - hence your misuuse of [] in your script.

That's good. But you probably need to look through the help file a bit more to better understand why this-is-me is suggesting to use While and Sleep.

Aslo, this code does what you want but it doesn't care what window it does it to. So you might want to look up WinWaitActive and the other Win* functions.

Good luck!

Raoul S. Duke: Few people understand the psychology of dealing with a highway traffic cop. Your normal speeder will panic and immediately pull over to the side. This is wrong. It arouses contempt in the cop-heart. Make the bastard chase you. He will follow.
Link to comment
Share on other sites

Thanks, it seems I'm starting to get this figured out. I'm just wondering, but is there a way to have it run in a minimized window? Like, while the script is running on a program that is minimized, you can do your other computer businesses. Well, okay, thanks bye!

Link to comment
Share on other sites

I'm just wondering, but is there a way to have it run in a minimized window? Like, while the script is running on a program that is minimized, you can do your other computer businesses.

<{POST_SNAPBACK}>

See the Control* functions in the manual (like ControlClick, ControlSend, etc.)

Also if you ever run into apparent problems with the shift (or alt or control) state that seems to not be ControlSent correctally, you should then read about and look into my ControlSendPlus UDF. Just a little heads up so you aren't compleatly taken by supprise if you ever encounter this :ph34r:

Minor wordage edit

Edited by pekster

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

OK, I have been reading about controls but I haven't found a way for me to click a specific part of a window while the window is minimized, are you sure theres a way to do that? Just so you guys know, I'm on the gamesite www.pogo.com and in the keno room. I've made it so it will keep clicking on "RE-BET" over and over after it picks my numbers so I could play in my sleep and try for the jackpot. I was wondering if there was a way to constantly have it running in a minimized window while I do other work on the computer. But I'm not sure if its possible?

Link to comment
Share on other sites

I'm on the gamesite www.pogo.com and in the keno room. I've made it so it will keep clicking on "RE-BET" over and over after it picks my numbers so I could play in my sleep and try for the jackpot. I was wondering if there was a way to constantly have it running in a minimized window while I do other work on the computer.

<{POST_SNAPBACK}>

In a web browser the "main" part of the browser window is all a single control, so you can't ControlClick a specific button.

What you can do is send the proper series of tabs and then press enter, or see if you can extract the URL of the button, and send that to the URL bar.

Another option to help get you close to the button is to use Firefox, which has a very cool text search feature. If you send text to the main browser control, it will search for text-URL's that have the text you've typed in it. If you send a slash first, and then some text, it will search for any text (not just a URL) that matches. This means you can get close to the button using one of these methods, tab to the button, and hit enter to send it.

As for doing it all minimized, it should work, just be sure to send to the "main" control on the browser window (the big one... where all the stuff shows up :ph34r: )

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

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