Solved Any one use Mini Mouse Macro?

iknowjohnny

New member
Power User
VIP
Local time
9:12 PM
Messages
237
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

OS
windows 7 professional
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

Computer type
Laptop
OS
Windows 7 Lite: Professional 64-bit
CPU
Intel amd64
Memory
4GB DDR3
Screen Resolution
1366 x 768
Hard Drives
5400 RPM
Browser
Google Chrome
Other Info
Computer programmer enthusiast and hobbyist
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

OS
windows 7 professional
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

Computer type
Laptop
OS
Windows 7 Lite: Professional 64-bit
CPU
Intel amd64
Memory
4GB DDR3
Screen Resolution
1366 x 768
Hard Drives
5400 RPM
Browser
Google Chrome
Other Info
Computer programmer enthusiast and hobbyist
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

Computer type
PC/Desktop
OS
Windows 7 x64, Vista x64, 8.1 smartphone
CPU
Intel E8400 65W 64-bit
Motherboard
Gigabyte EP45-UD3LR
Memory
DDR2 2 x 2GB, 1GB x 2
Graphics Card(s)
XFX Radeon HD5750
Sound Card
AMD High Definition Audio; Realtek High Definition Audio
Monitor(s) Displays
iiyama prolite X2377HDS
Screen Resolution
1920 x 1080
Hard Drives
500GB 7200 rpm Seagate ST3500413AS 16MB, 500GB 5400 rpm Toshiba MQ02ABF050H 32MB, 200GB 7200 rpm Seagate ST3200820AS 8MB, 2TB 7200 rpm Western Digital WD20EZRX 64MB
PSU
Enermax Liberty Modular
Case
Antec P193 Midi Tower
Keyboard
Mionix ZIBAL 60
Mouse
Razer USB 2.0 Diamondback Mouse or Huion Graphics Tablet
Browser
Internet Explorer, Lunascape, Firefox, Opera, Avast Safezone
Thanks. I used that kill process line in that link, but it only works with the newer version so i downloaded that.
 

My Computer

OS
windows 7 professional
Back
Top