Sign in to follow this  
Followers 0
Timo196

Pixelsearch and Mousemove mouse stops 100 pixel before the pixel wanted

6 posts in this topic

I wanted to know how the mouse stops at mousemove 100 pixels before the pixel wanted.(as in the title)

My script looks like this: 

HotKeySet ("{NUMPADMULT}", "Start")
HotKeySet ("{NUMPADSUB}", "Pause")
HotKeySet ("{Esc}", "_Exit")
 
While 1
   Sleep(10)
WEnd
 
Func Start()
While 1
$pos = PixelSearch(1680,1050,0,0,15935534,10)
If isArray($pos) then
   MouseMove($pos[0],$pos[1],2)
EndIf
    WEnd
 EndFunc
 
Func Pause()
While 1
  Sleep(10)
    WEnd
EndFunc
 
Func _Exit()
   Exit
EndFunc
 
It would be nice if someone could help me if it is possible.
Sorry about my bad english.

Share this post


Link to post
Share on other sites



You should be able to just add the distance on your MouseMove statement:

MouseMove($pos[0] - 100, $pos[1] + 100, 2)

I'm curious, though, what app you're trying to manipulate? There are tons of better methods than PixelSearch and MouseMove to control most apps.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Thanks for your quick response, and what other methods are there. (I'm trying to make some kind of aimbot, i'm just trying to use it at several third/first person shooter)

Share this post


Link to post
Share on other sites

Thanks for your quick response, and what other methods are there. (I'm trying to make some kind of aimbot, i'm just trying to use it at several third/first person shooter)

 

Sorry man, game automation or anything like that is a no-no here.

Share this post


Link to post
Share on other sites

Ok i'll remember that

Share this post


Link to post
Share on other sites

Timo196,

Bearpocalypse is quite right - please read the Forum rules (the link is also at bottom right of each page) - particularly the bit about not discussing game automation - before you post again. Thread locked. :naughty:

But welcome to the AutoIt forum - and see you soon with a legitimate question I hope. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

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
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0