Jump to content

Recommended Posts

Posted (edited)

AutoItSetOption("MouseCoordMode",0)

#include <Misc.au3>

$dll = DllOpen("user32.dll")

While 1
    If _IsPressed("01", $dll) Then
        
        MouseMove( 0,10, 20)

        
  EndIf
WEnd
DllClose($dll)

It doesn't Mouse Move using relative mode for some reason? Script purpose: When I hold left mouse click, it will move my mouse from the current location. Error:MouseCoordMode not working.

Edited by STAEDTLER
Posted

I notice the help has "Sleep ( 250 )" in the while loop, have you tried putting that in?

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Posted

Maybe you want??

Opt("GUICoordMode", 0) ;1=absolute, 0=relative, 2=cell

8)

No, basically I want my mouse cursor to more in a certain direction when i hold a key(in this case the left mouse button).

Posted

No, basically I want my mouse cursor to more in a certain direction when i hold a key(in this case the left mouse button).

Use MouseGetPos() and then add/subtract to the values and pass them to MouseMove.

Broken link? PM me and I'll send you the file!

Posted (edited)

#include <Misc.au3>

$dll = DllOpen("user32.dll")

While 1
    If _IsPressed("01", $dll) Then
     $array= MouseGetPos() 
     
        
       MouseMove( $array[0],$array[1]+10, 2)

        
  EndIf
WEnd
DllClose($dll)

This worked but can I make it so that if a key is held down, this script wont run. LShift key?

Edited by STAEDTLER

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...