Jump to content
Sign in to follow this  

Cursor On Top

Recommended Posts

Hello everyone, I'm new to the Autoit community. Im messing around with autoit for the first time and have caught on pretty fast. Im working on one of those PixelSearch scripts and It works wonderfully except that in the game that I am playing you can hit ESC and interact with the interface with a cursor, if you hit ESC again, you are now in FPS mode with a cross hair.

When I run my script when the interface is active, the cursor runs into what I want it to run into, it does exactly what I want it to do, but in FPS mode it justs runs all over the damn place. Now I understand the difficulty of making autoit interact with a game, it obviously wasnt designed for it specifically, I am wondering if there is a way around it. What I was thinking was a way to make my desktop cursor "Always On Top" and rubberbands back to the center of the screen after a timeout or something.

Basically I want the cursor always at the center of my crosshairs.

So the questions are

1. How can I get my cursor to be ontop of a fullscreen, or even windowed game?

2. Would that make a difference?

Here is my code WITHOUT any cursor modifications. (By the way, I have edited the DTX files in the game folder so that heads are red.)

#include <Misc.au3>
 Global $Headshot = 0
 Global $Color
 Global $ON = False
Hotkeyset ("{F1}", "_Start")
Hotkeyset ("{F2}", "_Pause")
HotKeySet ("{F3}", "_Color")
HotKeySet ("{F4}", "_Exit")

Func _Start()
$Headshot = 1
sleep (1000)
      Tooltip ("Aimbot ENABLED")
While 1
    If $Headshot = 1 then
        $coord = PixelSearch(0, 0, 1400, 1050, $Color)
            If IsArray($coord) = 1 Then
                MouseMove($coord[0], $coord[1], 0)

Func _Color()
    Tooltip ("Aimbot COLOR CHOOSER")
    $color = _ChooseColor (2, 0xFF0000, 2, "")

While 1

Func _pause()
    Tooltip ("Aimbot DISABLED")

Func _exit()

Share this post

Link to post
Share on other sites


Have you read the announcement at the top of the forum? If not, you can see what it says here.

The majority of forum members do not knowingly support game bots, so do not expect too much help. :mellow:


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:


ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area


Share this post

Link to post
Share on other sites

Instead of helping me with my "bot", perhaps you could just give me a tip.

I'm trying to use _MouseTrap to lock my pointer in the center of my screen for experimenting.

How would the _Mousetrap code look with the coords in it?

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...