Jump to content

How can I stop a MouseClick with function?


Recommended Posts

Hi I made a little Mouseclick script and I want to stop it with certain amount of clicks.

Example I want the script to execute 50 clicks and then it should stop...

This is my script:

HotKeySet("{ESC}","Terminate")


While 1
   MouseClick ("left",863,123,1,10)
   Sleep(10000)
   MouseClick ("left",1501,93,1,10)
   Sleep(10000)

 


WEnd

Func Terminate()
   Exit0

   EndFunc

I'm a newbie and want to test the mouseclick function. Hope someone can help me.

btw sorry for my bad english.

 

Link to post
Share on other sites

Welcome to AutoIt and the forum!

To "test" the MouseClick function you could try the example from the help file :)

Which program do you try to automate?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Link to post
Share on other sites
23 minutes ago, water said:

Welcome to AutoIt and the forum!

To "test" the MouseClick function you could try the example from the help file :)

Which program do you try to automate?

Im playing with mouse speed clicker right now and wanted to know how fast a mouseclicker script with autoit can be. I don’t want to click a button to stop it. I want to try to get it fully automated. I want to stop it with a desired number to stop it but idk how. Can you help me?

Link to post
Share on other sites
Link to post
Share on other sites
9 minutes ago, Nine said:

What about answering this question ?

It’s a website where I should click as fast as possible no specific program. I’m testing mouseclicker and want to add more function to it. And i want to add code which tells the script to stop at a certain amount of a desired numbers. Like, stop after you clicked 50 clicks. It’s not a program. https://clickspeedtest.com/

 

Link to post
Share on other sites
  • Developers
2 minutes ago, RaxXxz0r said:

I have a new problem. I’ve wrote the script and after a certain amount of clicks it stops working without finishing the rest of the clicks. Idk if winwaitactive is the problem...

Line 5 is your problem. ;)

Spoiler

 

(in other words: Please be a lot more explicit when asking a question!)

 

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 post
Share on other sites
2 hours ago, Jos said:

Line 5 is your problem. ;)

  Reveal hidden contents

 

(in other words: Please be a lot more explicit when asking a question!)

 

Jos

Oh forgot the new script.

The new script should open a website, close the tab and open it again. Idk if its a problem of the browser or the code of the script.

HotKeySet("{ESC}", "Terminate")

Run ("C:\Users\Admin\Desktop\Tor Browser\Browser\firefox.exe")
WinWaitActive ("Über Tor")
Sleep(1000)

For $x = 1 To XXX ;Edit XXX for your desired amount of clicks (ex. 10) - I did 100
   MouseClickDrag ("left", 1200, 75, 1209, 0)
   MouseClick ("left", 790, 53 , 1, 10)
   Send ("https://google.com\") ;desired website here
   Send ("{ENTER}")
   WinWaitActive ("Google")
   Sleep(5000)
   MouseClick ("left", 1860, 52, 1, 10)
   Sleep(3000)
Next

MsgBox(0,"Reopener","Done!")

Func Terminate()
    Exit 0
 EndFunc

 

Edited by RaxXxz0r
Link to post
Share on other sites
  • Developers

Well google won't display a title with "uber tor" in it so what about you stop screwing with us and simply post what you are doing or simply sort it out yourself? ;)

Jos

Edited by 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 post
Share on other sites
6 minutes ago, Jos said:

Well google won't display a title with "uber tor" in it so what about you stop screwing with us and simply post what you are doing or simply sort it out yourself? ;)

Jos

Look at the run code. It should run tor. If tor opened the script should wait for the window „über Tor“ it’s German and means „about tor“ the window is minimized through mouseclickdrag the window should drag to be fullscreen. It should get a new identity and it reopens every time but minimized. Then the script writes the google website and hit enter. The speed clicker was a test script. This is my real project where I wanted that script.

Link to post
Share on other sites
  • Developers

I understand German pretty well so no need to translate. ;)

...but the shown code isn't runable for others, so won't reproduce your issue....right?

Also posting an unrelated issue in this thread is always confusing so better start a new topic the next time.

Jos

Edited by 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 post
Share on other sites
  • 2 months later...
  • Developers
7 minutes ago, Luther said:

It’s a website where I should click as fast as possible no specific program.

...and you post this information in this thread ... why exactly? 🤔

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 post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...