Results 1 to 7 of 7
  1. #1
    stanislavmil's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Location
    Stara Zagora, Bulgaria
    Posts
    75
    Reputation
    10
    Thanks
    91

    InGame Mouse move and clicking

    Heya guys,
    Some days ago I made a bot for a game called World Of Tanks. So let's explain better what it does:

    • It opens the game and logs you in (everything is ok here)
    • Then the mouse should move to a button named Battle! (which starts you a battle) and click it (here is where the problem is)
    • Exits the game and opens it again ...


    So when in step 2 when it should move it to the button and press it it just stays at one place but if I move it a bit it teleports to the button but doesn't click it maybe it clicks while moving but as I said it doesnt want to move. I tried both fullscreen and windowed but still the same result.

    If some1 know why this happens and could help me somehow it will be nice.
    Thanks!



    EDIT: Tried to do
    MouseMove($xcoord,$ycoord,0)
    and
    MouseClick("main", , ,5,0)

    instead of

    MouseClick("main",$xcoord,$ycoord,5,0)

    But the result was the same; also tried running as administrator and didnt help
    Last edited by stanislavmil; 08-21-2013 at 01:25 PM.
    If i helped you, simply click 'thanks'

    My .txt software

    Crossfire

  2. #2
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    how are you moving the mouse and sending the click?
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  3. #3
    stanislavmil's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Location
    Stara Zagora, Bulgaria
    Posts
    75
    Reputation
    10
    Thanks
    91
    Quote Originally Posted by abuckau907 View Post
    how are you moving the mouse and sending the click?
    Well check the Edit i made to the post tried doing from MouseClick to MouseMove , sleep for a sec and then MouseClick at the position it was moved to but no result
    If i helped you, simply click 'thanks'

    My .txt software

    Crossfire

  4. #4
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    MoveMouse(***)

    does the cursor ever move correctly?

    Did you mess with MouseCoordMode ?

    Work on getting the mouse to move correctly first, then worry about the clicks.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  5. #5
    stanislavmil's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Location
    Stara Zagora, Bulgaria
    Posts
    75
    Reputation
    10
    Thanks
    91
    Tried some different things now and when I let it without touching the mouse and when the game closes at the end then I see the cursor going to the place it should do before the game closes but if I touch the mouse as I said it just teleport to where it should be.

    EDIT: I have While/WEnd loop and I dont know if it is a problem for the mouse movement/clicks

    ---------- Post added at 01:59 PM ---------- Previous post was at 01:48 PM ----------

    Code:
    Opt("MouseCoordMode", 1)
    ;Misc;
    $WoT = "WoT"
    $win = "W.o.T. Client"
    ;-------------------------;
    ;Times;
    $loading = 25000
    $battle = 15000
    $restart = 480000
    ;-------------------------;
    While 1
       
    ShellExecute($WoT,"" @desktopDir)
    WinActivate($WoT)
    sleep($loading)
    send("{ENTER}")
    sleep(2000)
    MouseClick("left", 679, 42, 2)
    MouseClick("left", 681, 42, 2)
    sleep($battle)
    WinClose($win)
    sleep($restart)
    
    WEnd
    Thats the code I use tried with 2 MouseClick-s but same result it just dont want to move in the game
    Last edited by stanislavmil; 08-21-2013 at 01:49 PM.
    If i helped you, simply click 'thanks'

    My .txt software

    Crossfire

  6. #6
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    Opt("MouseCoordMode", 1)
    ;Misc;
    $WoT = "WoT"
    $win = "W.o.T. Client"
    ;-------------------------;
    ;Times;
    $loading = 25000
    $battle = 15000
    $restart = 480000
    ;-------------------------;
    While 1

    ShellExecute($WoT,"" @desktop
    Dir)
    WinActivate($WoT)
    sleep($loading)
    send("{ENTER}")
    sleep(2000)
    MouseMove(679,42)
    Sleep(2000)
    MouseClick("left")
    MouseClick("left")

    sleep($battle)
    WinClose($win)
    sleep($restart)

    WEnd
    ---------------------------------------------------------

    Does the cursor display when you sleep() after moving it?

    edit: assuming the window is in the same place and (679,24) is still valid point.

    Do the clicks work in your code - the button gets clicked on? Just the cursor won't display?


    Opt("MouseCoordMode", 1)
    ;Misc;
    $WoT = "WoT"
    $win = "W.o.T. Client"
    ;-------------------------;
    ;Times;
    $loading = 25000
    $battle = 15000
    $restart = 480000
    ;-------------------------;
    While 1

    ShellExecute($WoT,"" @desktop
    Dir)
    WinActivate($WoT)
    sleep($loading)
    send("{ENTER}")
    sleep(2000)
    MouseMove(679,42)
    Sleep(2000)
    MouseClick("left",Default,Default, 2,0)
    sleep($battle)
    WinClose($win)
    sleep($restart)
    WEnd
    Last edited by abuckau907; 08-21-2013 at 03:27 PM.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  7. #7
    stanislavmil's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Location
    Stara Zagora, Bulgaria
    Posts
    75
    Reputation
    10
    Thanks
    91
    Ok thanks for your help dude but it still doesnt move on its own.
    But today I found this script and tried it out.
    It does not include auto login but requires you to be logged in. So when I run it the mouse movement works but doesnt with mine script.
    If you want me to record my screen when trying it so you can see what happens I could do it.
    If i helped you, simply click 'thanks'

    My .txt software

    Crossfire

Similar Threads

  1. [Help Request] Only ROCCAT MOUSE USERS AND AVA PLAYERS
    By don_vito89 in forum Alliance of Valiant Arms (AVA) Help
    Replies: 8
    Last Post: 10-10-2011, 04:55 PM
  2. [Help] Finding images on a wepage and clicking them.
    By Impakt in forum Visual Basic Programming
    Replies: 8
    Last Post: 05-06-2011, 06:42 AM
  3. Mouse Sensitivity and Scope Sensitivity
    By uzinato in forum CrossFire Discussions
    Replies: 28
    Last Post: 02-22-2011, 06:26 PM
  4. [Release]Mouse Moves Recorder :D
    By o-o in forum Combat Arms Spammers, Injectors and Multi Tools
    Replies: 19
    Last Post: 08-07-2010, 12:09 AM
  5. Replies: 2
    Last Post: 03-28-2009, 06:52 PM