Any one use Mini Mouse Macro?


  1. Posts : 237
    windows 7 professional
       #1

    Any one use Mini Mouse Macro?


    I need help and thier forum is useless with the most recent posts being weeks old. Basically all i need is what to add to the end of the following macro script so that once it's doe running it's last function is to close the mini mouse macro script, If anyone knows i'd appreciate it. I googled it quite an while and cant find an answer. Thanks.


    1212 | 26 | 5 | Left Click

    839 | 525 | 9678 | Keypress `

    839 | 525 | 10 | Keypress o

    839 | 525 | 10 | Keypress p

    839 | 525 | 10 | Keypress e

    839 | 525 | 10 | Keypress n

    839 | 525 | 10 | Keypress SPACE
    839 | 525 | 10 | Keypress 1

    839 | 525 | 10 | Keypress ENTER
      My Computer


  2. Posts : 38
    Windows 7 Lite: Professional 64-bit
       #2

    Hello, iknowjohnny.

    I'm unsure about "Mini Mouse Macro" itself, but! There are quite a few (by that I mean: There are tons) of alternatives!

    • Visual Basic script (native to Windows)
    • AutoHotKey
    • AutoIt (branched expansion / spin-off of AutoHotKey)


    These are my three favorite go-to scripting languages when it comes to emulating mouse input (computer scripting).

    To emulate a mouse click with VBS (from start to finish):
    • Create a file and name it: "W7Forums.vbs"
    • Edit the newly created: "W7Forums.vbs" file with your favorite text editor (I usually use: Notepad++ or Notepad)
    • Copy and paste the script from below and edit it as needed


    This is copied from a StackOverflow post (sending key emulating is much shorter and doesn't require that you link against DLL API calls):
    Code:
    'Declare mouse events
    Public Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
    Public Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
    Public Const MOUSEEVENTF_LEFTDOWN = &H2
    Public Const MOUSEEVENTF_LEFTUP = &H4
    Public Const MOUSEEVENTF_RIGHTDOWN As Long = &H8
    Public Const MOUSEEVENTF_RIGHTUP As Long = &H10
    'Declare sleep
    Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
    
    ' Window location
    Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Public Declare Function GetWindowRect Lib "user32" (ByVal hWnd As Long, lpRect As RECT) As Long
    Type RECT
      Left As Long
      Top As Long
      Right As Long
      Bottom As Long
    End Type
    
    Public Function WindowHandle(ByVal sTitle As String) As Long
        WindowHandle = FindWindow(vbNullString, sTitle)
    End Function
    
    Public Sub SendClick(sWnd As String, b As Integer, x As Long, y As Long)
        Dim pWnd As Long, pRec As RECT
    
        pWnd = WindowHandle(sWnd)
        GetWindowRect pWnd, pRec
    
        SetCursorPos pRec.Left + x, pRec.Top + y
        Sleep 50
        If b = 2 Then
            mouse_event MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0
            Sleep 50
            mouse_event MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0
        ElseIf b <> -1 Then
            mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
            Sleep 50
            mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
        End If
    End Sub
    If you want to emulate mouse clicks with AutoIt: You will need to install AutoIt first.
    In terms of security: It opens another vector of attack (put bluntly). In practicality? It's not worth mentioning that.

    To do exactly what you have above with AutoIt:
    Code:
    MouseClick($MOUSE_CLICK_LEFT, 1212, 26, 5) ; Send the left mouse click 5 times (10ms delay) at: 1212, 26 (X, Y coordinates)
    Send("'open{SPACE}1{RETURN}") ; Sends the string of text
    Normally, you can find the answer on Google itself. There are typically answers all over the place.
    As with any form of research: You must filter out or modify the data you find from various sites.
      My Computer


  3. Posts : 237
    windows 7 professional
    Thread Starter
       #3

    Thanks, but i have no idea about code of any type. this was a WYSIWYG type of app. It;s pretty obvious they way it writes it out tho as in my post so i understand that. But the VBS code you wrote out i have no idea what it means or what to edit in it. I DID however assume you created it to mimic what i posted so i renamed it to the vbs extension and ran it and it gives me the error line 2, character 16, expected end of statement, code 800A0401, and microsoft VB script compilation error. By the way, i found the reason the MMM app won't close after using it....theres an option to do that but that feature is only functional if you buy the app.
      My Computer


  4. Posts : 38
    Windows 7 Lite: Professional 64-bit
       #4

    iknowjohnny said:
    Thanks, but i have no idea about code of any type. this was a WYSIWYG type of app. It;s pretty obvious they way it writes it out tho as in my post so i understand that. But the VBS code you wrote out i have no idea what it means or what to edit in it. I DID however assume you created it to mimic what i posted so i renamed it to the vbs extension and ran it and it gives me the error line 2, character 16, expected end of statement, code 800A0401, and microsoft VB script compilation error. By the way, i found the reason the MMM app won't close after using it....theres an option to do that but that feature is only functional if you buy the app.
    It helps to read persons posts all the way through. I didn't write it to look cool or for someone else to read. I wrote it for you to read in all it's entirety.

    The VB script loads the user32.dll function addresses and copies them to a temporary variable (to be called later).
    It then invokes those functions when you need them and where you need them. It's a fairly simple script.

    I'd suggest you download AutoItv3 instead and learn how to write simple scripts for mouse/keyboard emulation.
    The AutoIt forums are super active the last time I checked years ago.

    I am a huge fan of AutoIt if you can't tell. I seldom use it, but it is a very powerful scripting language.
    The online documentation is also incredibly useful. I believe there's even an offline copy if you desire it.

    They normally provide full fledged examples (in the event you can't decipher the man pages).
      My Computer


  5. Posts : 2,798
    Windows 7 x64, Vista x64, 8.1 smartphone
       #5

    I found this, Close mmm automatically | MMM

    I can see from the photo, that the easiest way to acomplish your request is to tick the checkbox called Exit and close after Macro end, found in the options tab.
      My Computer


  6. Posts : 237
    windows 7 professional
    Thread Starter
       #6

    Thanks. I used that kill process line in that link, but it only works with the newer version so i downloaded that.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 11:10.
Find Us