YAMM Yet Another Move Mouse application

2 posts in this topic

In my work place they blocked the application movemouse. so y decided to do one by myself , to cheat the system.

I have used some peaces of code from another scripts I have, and also I have found in this forum

Hope this helps


#include <Misc.au3>
If _Singleton(@ScriptName, 1) = 0 Then ; allow only one instance
    MsgBox(0, "Warning", "An occurence of " & @ScriptName & " is already running")

#region tray icon
    Opt("TrayIconHide", 0)
    Opt("TrayMenuMode", 1)
    TraySetToolTip("Ratoner "&  $version)
    Local $exititem = TrayCreateItem("Exit")
    TraySetState(1) ; Show the tray menu.
#region variables
    $Counter= 0
#region main
    Local $hTimer = TimerInit()
    while 1
        if $Counter>1000 then
            if $MouseNotMovedCounter>2 then moveMouse()
            $Counter= 0
        Switch TrayGetMsg()
            Case $exititem

#region functions
    func CheckifMouseMove()
;~      ConsoleWrite("+CheckifMouseMove()" & @crlf)
        $posMouseMoved = MouseGetPos()
        if $posMouseMovedX<>$posMouseMoved[0]or $posMouseMovedY <> $posMouseMoved[1] then
;~          ConsoleWrite('>$MouseNotMovedCounter = ' & $MouseNotMovedCounter & @crlf )
;~          ConsoleWrite('--$MouseNotMovedCounter = ' & $MouseNotMovedCounter & @crlf )
    func moveMouse()
;~      ConsoleWrite("+moveMouse" & @crlf)
        Local $posMouse = MouseGetPos()
        Local $new_y = $posMouse[1] + $flagMouse ; + (10*$flagMouse)
;~                  ConsoleWrite("+mouseMove $MouseNotMovedCounter" & $MouseNotMovedCounter & @crlf)


Share this post

Link to post
Share on other sites

I assume you do this to keep your computer not getting locked

another trick vbscript is to numlock on/off not converted to AutoIT code (I assume if mousemove gets blocked by policy its just a matter of time they block other tools) so far never seen getting wscript locked out by policy

' Function to prevent locking the screen
Function BlinkNumlock()
    Dim WxhShell

    Set WxhShell = CreateObject("WScript.Shell")
     WxhShell.SendKeys "{NUMLOCK}"
     WxhShell.SendKeys "{NUMLOCK}"
     Set WxhShell = Nothing
End Function


1 person likes this

Share this post

Link to post
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

  • Similar Content

    • algiuxas
      Dragging GUI makes script pause
      By algiuxas
      When I move GUI, script pause until I release GUI.
      I need to make script not pause while dragging GUI.
      GUICreate("Hello world!",250,175,-1,-1) Opt("GUIOnEventMode", 1) GUISetOnEvent(-3, "exit_") ; Check if closed GUISetState() While 1 ToolTip("This tooltip should move.") Sleep(50) WEnd Func exit_() GUIDelete() Exit EndFunc  
    • fishbones
      Help me with mouse clicks
      By fishbones
      Hi guys!
      I'm really new to AutoIT, and I have little experience with scripting or any sort of programming. But I'm trying to learn!
      Right now, what I'm trying to do is make a quick script that repeats a few functions while a key is held down. I want to see if I can make a quick-burst script that might work in Fallout 4 with machine guns
      #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep(100) If _IsPressed("01", $dll) Then MouseDown("left") Sleep(320) MouseUp("left") Sleep(25) EndIf WEnd DllClose($dll) Right now, when I hold down my left mouse button, it just repeats the script once - then I have to release and hold again to enable it again. Is it possible to to start it from the top and basically just repeats itself while I'm holding down my mouse button?

      In advance, thank you!
    • algiuxas
      GUI Show/Hide Cursor [SOLVED]
      By algiuxas
      I want that when mouse cursor is in GUI, cursor would hide, and when cursor is outside GUI it would appear again.

      (Sorry for my bad English)
    • Tirk
      How can I move a GUI wiindow
      By Tirk
      How can I move a GUI window? How can I adjust the gui's position (coordinates) ?
      ... When I click to the green four-way arrow and move the mouse --> move the gui window.

    • Grosminet
      WHY a while loop speedup when the mouse is moving
      By Grosminet
      Searching inside the forum, I don't succeed to get any explanation about a strange (for me !) phenomena:
      Using AutoIt, I have coded a "cortex of neurons Simulator" for which I handle several neurons activity (Action Potential and Postsynaptic Potential) which take a long time, about 20 ms per neuron to be processed. This is why I need a global loop running about 1s for a global cortex of 50 neurons.
      But when I move the mouse (in any direction, like rotating above the GUI) the speed of the loop increase significantly : around x8 times more ... !
      This happens only if the GUI has the focus. I did a check with the "Windows Task Manager" where I can see the CPU usage changing every time the mouse is moving (growing from 3% to 15%).
      I believe to remember some lecture about the influence of the user events regarding the "Application" capability to anticipate user actions by changing it's rate of pooling events, but I'm not sure it was in an AutoIt forum, or maybe it was in an other "developer forum" (like "Code Project", "Stackoverflow" , or ...?
      Could somebody help me to understand this behaviour ?
      If possible, is there a programmatic method to manage the speed of a simple "For, Next" loop ? I try to change the Application priority (setting to level 4 with "ProcessSetPriority"), but this seems not very efficient ....
      Thanks, Alain.

      FYI: I'm using :
      Autoit Windows 7 Home Premium Service Pack 1 Computer ASUS N56V Screen resolution: 1920x1080 (recommended) Theme :Windows Classic