Jump to content

Mouse Wrap


Recommended Posts

haha i was actually thinking of making an asteroids game in autoit... :)

Link to comment
Share on other sites

haha i was actually thinking of making an asteroids game in autoit... :)

Currently I'm working on it :party: -> http://www.autoitscript.com/forum/index.ph...st&p=680298

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

I wrote this a while ago, it has a little border around the bottom (where the taskbar is around me), so that way the taskbar is still easy to use. I took out y wrap just 'cause I don't like it, and on a widescreen monitor the part that matters is the x wrap. This also doesn't have the bug where if you leave the mouse right on the border it will continuously jump back and forth.

#noTrayIcon

While 1 
    $pos = MouseGetPos()
    
    If $pos[1] < @DesktopHeight - 35 then
    
        If $pos[0] = @DesktopWidth - 1 then 
            MouseMove(1, $pos[1], 0) 
            $pos[0] = 1
        ElseIf $pos[0] = 0 then 
            MouseMove(@DesktopWidth - 2, $pos[1], 0) 
            $pos[0] = @DesktopWidth - 2
        EndIf 
        
    EndIf 
    
;~  If $pos[1] = 0 then 
;~      MouseMove($pos[0], @DesktopHeight - 1, 0)
;~  EndIf 
    
    Sleep(100) 
WEnd
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

The code that I provided earlier in this topic:

[a] Doesn't cause the mouse to jump back and forth

Handles properly multiple monitors with different resolutions

[c] Handles properly multiple monitors with any configuration set-up (side-by-side, one on top of the other etc.)

WBD

Edited by WideBoyDixon
Link to comment
Share on other sites

either way... :\ i am now using this EVERY day... haha it does take some time to get used to (not overshooting when you move your mouse)but after like half an hour its very easy to use...

idk WHY i didn't think of this before xD

Link to comment
Share on other sites

lol i fixed the Y bug... (completely removed Y wrapping)i haven't added the dual moniters.. sorry you guys... and cut down the CPU usage from 50% to 7% by adding a sleep

UPDATED AT THE TOP

lol i find this so much fun :)

WBD - i haven't been able to grab anything from your above code... DLL calls are slightly too advanced for me... so yeah

Link to comment
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
 Share

  • Recently Browsing   0 members

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