+ Reply to Thread
Results 1 to 7 of 7

Thread: AutoIt Help With Bot

  1. #1
    Join Date
    May 2009
    Location
    South Africa
    Posts
    203
    Thanks
    0
    Thanked 1 Time in 1 Post
    Rep Power
    4

    Default AutoIt Help With Bot

    Hey guys

    I would like someone to write me a tut on how to create a bot that can autopost to forums.. And how to customize these bots to change what its posting, etc.. Hopefully one of you AutoIt guru's can help me out
    ShareCash ID <<< Moxxy >>>

    Number 1 Top Earner on ShareCash For October 2009+rep

    Sign Up As My Referal

  2. #2
    Join Date
    May 2009
    Posts
    32
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Rep Power
    4

    Default

    Well, its not that hard. The main functions you want to use are:
    • MouseClick
    • Send

    Heres a quick how to:

    Step 1. Find out what you need to do (Click somewhere, send some text, click somewhere else, etc.)
    Step 2. Get the coordinates, I just released a handy tool for that here.
    Step 3. Start scripting your bot. For example you need to login somewhere.
    You already found out (by doing step 1 and 2) where and what u need to do.
    Example:
    Click at pos X: 100 Y:200 and send "username"
    Click at pos X: 150 Y:200 and send "password"
    Click at pos X: 150 Y:250 (Login Button)

    That would be:
    Code:
    MouseClick("left", 100, 200, 1, 0) ; look at MouseClick in the helpfile for parameters
    Send("username")
    Sleep(1000) ; A little delay
    MouseClick("left", 150, 200, 1, 0)
    Send("password")
    Sleep(1000)
    MouseClick("left", 150, 250, 1, 0)
    It isnt that hard at all. If you want the script to loop itself until you exit the script, add a While 1 at the top and a WEnd at the bottom.

    Last edited by AlmarM; 04-12-2009 at 12:38.

  3. #3
    Join Date
    May 2009
    Location
    South Africa
    Posts
    203
    Thanks
    0
    Thanked 1 Time in 1 Post
    Rep Power
    4

    Default

    Thanks man when you say 'loop' itself, do you mean carry on repeating the steps until i exit the script?

    And how do I make it run in the background so I can other stuff while the bot is running.
    I am aware of how to use mouse co-ordinates and the basic send function but the reason i originally gave up with AutoIt was because I couldnt make anything run in the background..
    ShareCash ID <<< Moxxy >>>

    Number 1 Top Earner on ShareCash For October 2009+rep

    Sign Up As My Referal

  4. #4
    Join Date
    May 2009
    Location
    Denmark
    Age
    17
    Posts
    689
    Thanks
    42
    Thanked 3 Times in 3 Posts
    Rep Power
    5

    Default

    Quote Originally Posted by Moxxy View Post
    Thanks man when you say 'loop' itself, do you mean carry on repeating the steps until i exit the script?
    Yep, that's what loop means but I think you would have to have a big sleep, else the site wouldn't be able to load before the bot starts again.

    Quote Originally Posted by Moxxy View Post
    And how do I make it run in the background so I can other stuff while the bot is running.
    I am aware of how to use mouse co-ordinates and the basic send function but the reason i originally gave up with AutoIt was because I couldnt make anything run in the background..
    ControlClick & ControlSend functions.


    The following is an example of writing "This string is sent in the backgroun" pushing "ENTER" and then writing "See, it isn't that hard afterall? ". Then we'll make it click... All in the background!
    Code:
    ControlSend("Untitled - Notepad", "", "[CLASS:Edit; INSTANCE:1]", "This string is sent in the background")
    Sleep(1000)
    ControlSend("Untitled - Notepad", "", "[CLASS:Edit; INSTANCE:1]", "{ENTER}")
    Sleep(1000)
    ControlSend("Untitled - Notepad", "", "[CLASS:Edit; INSTANCE:1]", "See, it isn't that hard afterall? ;)")
    Sleep(1000)
    ControlClick("Untitled - Notepad", "", "MDIClient1", "Left", 1, 100, 200)
    Very simple code, and please correct me on the ControlClick if I'm wrong, because I'm not 100% sure about it...

  5. #5
    Join Date
    May 2009
    Posts
    32
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Rep Power
    4

    Default

    Yush, like Reinn said, ControlSend, ControlClick.

    Quote Originally Posted by Reinn View Post
    else the site wouldn't be able to load before the bot starts again.
    In that case, we could use _IE* functions, but thats a more hard way, stay with the way we explained now. ^^,

    Last edited by AlmarM; 04-12-2009 at 20:36.

  6. #6
    Join Date
    May 2009
    Location
    South Africa
    Posts
    203
    Thanks
    0
    Thanked 1 Time in 1 Post
    Rep Power
    4

    Default

    Can someone help me with the ControlClick function and the ControlSend fuction?
    When to use :
    "[CLASS:Edit; INSTANCE:1]"
    "MDIClient1"
    etc..

    Thanks
    ShareCash ID <<< Moxxy >>>

    Number 1 Top Earner on ShareCash For October 2009+rep

    Sign Up As My Referal

  7. #7
    Join Date
    May 2009
    Location
    Denmark
    Age
    17
    Posts
    689
    Thanks
    42
    Thanked 3 Times in 3 Posts
    Rep Power
    5

    Default

    I would suggest you checking out my AutoIt Help Script, I think you could learn a lot from that one.

    And as to the "[CLASS:Edit; INSTANCE:1]", it all depends on what you need. Those are going to be different, because you'll probably need different things. It's hard to explain, but when I don't know what to input, I just read the help file (e.g. "Controlsend") and then check out what they write, the remarks, and eventually the "test" script in the very bottom. That helps me a lot, when I code something.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Why should I choose AutoIt?
    By Reinn in forum AutoIt
    Replies: 8
    Last Post: 03-12-2009, 21:21
  2. Main information about AutoIt!
    By AlmarM in forum AutoIt
    Replies: 6
    Last Post: 01-12-2009, 10:32

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts