Sign in to follow this  
Followers 0
lolp1

Need help with increments/Other

3 posts in this topic

I know I have a lot pf post and been here a while but I have not touched autoit in roughly 4 months.

I need help with a few simple things. I am creating a bot to auto-mate account creating for a user.

Heres an example fucn:

Func CreateAccount()
Mouseclick("left") ; click on create account
Send($AccountName)
Mouseclick("left") ; Click ok
EndFunc

This is of course just an example fucntion. There is two things I need to do. Lets say for example in my ini they have AccountName=Joe , I need it to start with Joe1 , then the next account it makes Joe2 (etc...). I'm not sure how to do this and I did not find anything in help file, and could not come up with a clever scheme to do it..

The other thing, is to have a way for them to set the amount of accounts created. For example if they have in my ini AccountsToCreate=10, it would go through and automate creating 10 accounts, once that limit is reached, stop.

Any help is appreciated.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

$count = 1
$maxaccts = iniread()
Do
     mouseclick()
     Send($acctname & $count)
     mouseclick()
     $count = $count + 1
until $count = $maxaccts

not very detailed but you should get the general idea

Edited by narayanjr

Share this post


Link to post
Share on other sites

I think that makes sense I'll give it a try thanks.

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  
Followers 0