Jump to content

Recommended Posts

Posted

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
Posted

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)
Posted

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

????

  • Moderators
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

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.

Posted

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
  • Moderators
Posted

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?

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.

Posted

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

Posted

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)
Posted

$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)
Posted

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)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...