Jump to content
Sign in to follow this  
snowreaper03

A counter on a bot

Recommended Posts

snowreaper03

is there any possable way to get it to count how many times its clicked?sry for asking such simple questions but i just started yesterday :whistle:

Share this post


Link to post
Share on other sites
LxP

I'm not quite sure that this is what you want without any context, but you could just increment a variable after you execute the mouse click:

mouseClick(...)
$counter = $counter + 1
···
; and then at the end:
msgBox(0x40, "Bot", "Clicked " & $counter & " times.")

Share this post


Link to post
Share on other sites
Insolence

This would be the best way I can think of, (BTW that's a horrible idea SupraNatural)

_MouseClick($btn,$x,$y,$times,$speed)
; I forget the parameters, but this sounds right
MouseClick ( $btn, $x, $y $times, $speed )
Global $Something+=1
EndFunc

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites
LxP

If you don't use the beta version of AutoIt then Insolence's code won't work without this modification:

···
; (Global $Something+=1)
global $something = $something + 1
···

Share this post


Link to post
Share on other sites
snowreaper03

and no im to lazy to include a gui :whistle:

and u ass :Pjeez supra

Share this post


Link to post
Share on other sites
snowreaper03

how do i define the variable or w/e

Share this post


Link to post
Share on other sites
SmOke_N

how do i define the variable or w/e

<{POST_SNAPBACK}>

ERRR...

Get UN-Lazy and Read the help file under variables?


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.

Share this post


Link to post
Share on other sites
snowreaper03

wow um ok sry im a noob i learnt this shit yesterday bymyself sry for asking a question

Share this post


Link to post
Share on other sites
SmOke_N

and no im to lazy to include a gui :whistle:

and u ass :Pjeez supra

<{POST_SNAPBACK}>

Well... I wouldn't have posted what I did... If not right before you asked your variable question that you made the quote above.

You'll find the forum very helpful, if YOU put forth an effort and stay away from profanity (there are kids that read the site / even though you may be one... try to show a little respect.)... Thanks


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.

Share this post


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
Sign in to follow this  

×