ellysh / l2bot

Simple and easy configurable Lineage 2 bot on AutoIt scripting language
http://en-l2bot.blogspot.com
GNU General Public License v3.0
35 stars 26 forks source link

Script generator with right click and wheel #4

Closed Seiifer closed 8 years ago

Seiifer commented 9 years ago

Is there any way to save right click and mouse wheel while we create a script using script generator ? What source file are concerned ? I could look into it if you explain how does the API work.

Right click are important to move characters ...

Thanks for your project.

ellysh commented 9 years ago

Hello,

I suppose that you can add this functionality in run/script_generator.au3 file.

This is function that respond to logging mouse clicks:

func _MouseLogger($nCode, $wParam, $lParam)
    if $nCode < 0 then
        $ret = DllCall("user32.dll", "long", "CallNextHookEx", "hwnd", $hM_Hook[0], _
                "int", $nCode, "ptr", $wParam, "ptr", $lParam)
return $ret[0] endif ; The AutoIt function is used to get coordinates because of PixelCoordMode = 2 in functions.au3 file local $point = MouseGetPos() if $wParam = $WM_LBUTTONDOWN then WriteMouseClick($point[0], $point[1]) endif endfunc

You should add checking wParam variable to WM_RBUTTONDOWN and pass button name "left" or "right" to WriteMouseClick function. Then you can use button name in FileWrite operation that is used for writing commands in run/script.au3 file.