Sign in to follow this  
Followers 0
jinred

Mouse Move

13 posts in this topic

I want to move mouse cursor, here is script, but it does't work why? :think:

Func Move()

    For $x = 240 to $x = 380 Step 20
        For $y = 100 to $x = 240 Step 20
            If $coord <> PixelSearch( 121, 467, 126, 468, 0x050305, 10) Then
                MouseMove($x,$y)
             EndIf
        Next
    Next
    
EndFunc

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

perhaps becuase its a function and u arent calling...., is that ur entire script?

Edited by thatsgreat2345

Share this post


Link to post
Share on other sites

Because $coord is not defined so the statement could never be true, thus.. no mouse moving.

What exactly are you trying to do?


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

I want to move mouse cursor, here is script, but it does't work why? :think:

Func Move()

    For $x = 240 to $x = 380 Step 20
        For $y = 100 to $x = 240 Step 20
            If $coord <> PixelSearch( 121, 467, 126, 468, 0x050305, 10) Then
                MouseMove($x,$y)
             EndIf
        Next
    Next
    
EndFunc
Func Move()

    For $x = 240 to 380 Step 20
        For $y = 100 to 240 Step 20
            If $coord <> PixelSearch( 121, 467, 126, 468, 0x050305, 10) Then
                MouseMove($x,$y)
             EndIf
        Next
    Next
    
EndFunc

????


 

Spoiler

shoot_zpsfd329d66.png
dontbelieveeverythingyouthink_zps0e1e900

Madness is the first step to understanding...

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Because $coord is not defined so the statement could never be true, thus.. no mouse moving.

What exactly are you trying to do?

Also keep in mind your using a variable to compare to an array (PixelSearch returns an array)

Edit:

Let me re-itterate...

The way you have it set up, PixelSearch() will always be a blank return or a 1.

Use:

MsgBox(64, 'Pix Return', PixelSearch( 121, 467, 126, 468, 0x050305, 10))
Try that and test it. Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Here

HotKeySet ("{F5}", "Start" )
HotkeySet ("{F8}", "Stop" )


Func Start()
    
        
While (1)
   Move()
    
WEnd

EndFunc


Func Move()

    For $x = 240 to $x = 380 Step 20
        For $y = 100 to $x = 240 Step 20
            If $coord <> PixelSearch( 121, 467, 126, 468, 0x050305, 10) Then
                MouseMove($x,$y)

             EndIf
        Next
    Next
    
EndFunc

While (1)
Sleep (1)
WEnd

Func Stop()

While 1 = 1
Sleep (1000)
Wend

EndFunc

Share this post


Link to post
Share on other sites

Here

HotKeySet ("{F5}", "Start" )
HotkeySet ("{F8}", "Stop" )
Func Start()
    
        
While (1)
   Move()
    
WEnd

EndFunc
Func Move()

    For $x = 240 to $x = 380 Step 20
        For $y = 100 to $x = 240 Step 20
            If $coord <> PixelSearch( 121, 467, 126, 468, 0x050305, 10) Then
                MouseMove($x,$y)

             EndIf
        Next
    Next
    
EndFunc

While (1)
Sleep (1)
WEnd

Func Stop()

While 1 = 1
Sleep (1000)
Wend

EndFunc
What does $coord equal? And where is it defined?

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

hahah yeah i didnt really understand the point of it

HotKeySet ("{F5}", "Move" )
HotkeySet ("{F8}", "Stop" )
Dim $coord
While 1
Sleep (100)
WEnd

Func Move()
    while 1
For $x = 240 to 380 Step 20
        For $y = 100 to 240 Step 20
            If $coord <> PixelSearch( 121, 467, 126, 468, 0x050305, 10) Then
                MouseMove($x,$y,1)
             EndIf
        Next
    Next
    WEnd
EndFunc

Func Stop()
While 1
Sleep (1000)
Wend
EndFunc

thatll make it go in a zig zag alot ahahha i guess thats what u wanted it to do, ur problem was is u added $x and $y after the to

Share this post


Link to post
Share on other sites

That is the only problem with this script.

Please post EXACTLY (in well written english preferrably), what you want your script to do.


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

Great it working , thx for help :think:

Share this post


Link to post
Share on other sites

$coord has no values.. why even include it in the script?


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

simucal one thing, when some1 says it works , dont ask further questions :think:

Share this post


Link to post
Share on other sites

I guess.. but you are never going to learn using nonsense code :think:


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

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