how to change turning speed in 360 deggre turn script

Ask gaming related questions (AHK v1.1 and older)
Cone19
Posts: 3
Joined: 16 Jun 2018, 14:07

how to change turning speed in 360 deggre turn script

16 Jun 2018, 14:59

i want to change turning speed in this script:
F12::
Loop 1000 {
DllCall("mouse_event", "UInt", 0x01, "UInt", 8, "UInt", 0) ; move 1 unit right
Sleep 10
}
return
but i dont know anything about ahk coding show can someone plz explain me how to do it, thanks :D .
Qysh
Posts: 143
Joined: 24 Apr 2018, 09:16

Re: how to change turning speed in 360 deggre turn script

16 Jun 2018, 16:34

Try a higher Sleep time :)
User avatar
Flipeador
Posts: 1204
Joined: 15 Nov 2014, 21:31
Location: Argentina
Contact:

Re: how to change turning speed in 360 deggre turn script

16 Jun 2018, 16:37

I'm not sure what you want, could you explain better?.
This is a version with SendInput (Escape=Exit):

Code: Select all

~Esc:: ExitApp

F12::
Loop
{
    MoveMouse(-8, 0)
    Sleep 1
}
return

MoveMouse(x, y)
{
    ; INPUT structure
    ; https://msdn.microsoft.com/en-us/library/windows/desktop/ms646270(v=vs.85).aspx
    Local INPUT := "", Size := A_PtrSize == 8 ? 40 : 28
    VarSetCapacity(INPUT, Size, 0)

    ; MOUSEINPUT structure
    ; https://msdn.microsoft.com/en-us/library/windows/desktop/ms646273(v=vs.85).aspx
    NumPut(x, &INPUT + A_PtrSize, "Int")
    NumPut(y, &INPUT + A_PtrSize + 4, "Int")
    NumPut(1, &INPUT + A_PtrSize + 4 + 8, "UInt")

    ; SendInput function
    ; https://msdn.microsoft.com/en-us/library/windows/desktop/ms646310(v=vs.85).aspx
    Return DllCall("User32.dll\SendInput", "UInt", 1, "UPtr", &INPUT, "Int", Size, "UInt")
}
btw: the function should be DllCall("User32.dll\mouse_event", "UInt", 1, "UInt", X, "UInt", Y, "UInt", 0, "UPtr", 0).
Cone19
Posts: 3
Joined: 16 Jun 2018, 14:07

Re: how to change turning speed in 360 deggre turn script

16 Jun 2018, 17:15

Qysh wrote:Try a higher Sleep time :)
nope its not working
Cone19
Posts: 3
Joined: 16 Jun 2018, 14:07

Re: how to change turning speed in 360 deggre turn script

16 Jun 2018, 17:32

Flipeador wrote:I'm not sure what you want, could you explain better?.
This is a version with SendInput (Escape=Exit):

Code: Select all

~Esc:: ExitApp

F12::
Loop
{
    MoveMouse(-8, 0)
    Sleep 1
}
return

MoveMouse(x, y)
{
    ; INPUT structure
    ; https://msdn.microsoft.com/en-us/library/windows/desktop/ms646270(v=vs.85).aspx
    Local INPUT := "", Size := A_PtrSize == 8 ? 40 : 28
    VarSetCapacity(INPUT, Size, 0)

    ; MOUSEINPUT structure
    ; https://msdn.microsoft.com/en-us/library/windows/desktop/ms646273(v=vs.85).aspx
    NumPut(x, &INPUT + A_PtrSize, "Int")
    NumPut(y, &INPUT + A_PtrSize + 4, "Int")
    NumPut(1, &INPUT + A_PtrSize + 4 + 8, "UInt")

    ; SendInput function
    ; https://msdn.microsoft.com/en-us/library/windows/desktop/ms646310(v=vs.85).aspx
    Return DllCall("User32.dll\SendInput", "UInt", 1, "UPtr", &INPUT, "Int", Size, "UInt")
}
btw: the function should be DllCall("User32.dll\mouse_event", "UInt", 1, "UInt", X, "UInt", Y, "UInt", 0, "UPtr", 0).
i want a faster 360 degree turn thats it, and thanks for trying to help me!
Qysh
Posts: 143
Joined: 24 Apr 2018, 09:16

Re: how to change turning speed in 360 deggre turn script

17 Jun 2018, 15:15

Code: Select all

F12::
Loop 500 {
DllCall("mouse_event", "UInt", 0x01, "UInt", 16, "UInt", 0) ; move 1 unit right
Sleep 1
}
return

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 39 guests