Author Topic: Introduction  (Read 7096 times)

0 Members and 1 Guest are viewing this topic.

Offline Administrator

  • Administrator
  • Newbie
  • *****
  • Posts: 13
  • Karma: +0/-0
    • View Profile
    • Macromonkey
Introduction
« on: December 30, 2014, 11:17:03 PM »
Introduction

MacroMonkey™ is a free, feature packed macro/botting scripting system for Windows. Intended to be a friendly scripting environment to make MMO macros and bots from the simple to the complex.
Aimed mostly towards MMO games, but can be used to automate almost any windows program.

You can send simulated key presses, mouse moves and clicks, read screen pixels, interact with windows and processes at a low level, talk between other MacroMonkey instances, and much more.

Uses the powerful, fast, lightweight, and easy to learn Lua scripting language, with addition of many extensions for automation needs.
In development for several years, coded in optimized C/C++. Built for high performance and low resource use to run well on anything from a Pentium III to the latest Windows machines.

Extensions include:
  • Direct Window and process, access and manipulation.
  • Timer support.
  • Simulated mouse and keyboard inputs.
  • Screen pixel and color space support.
  • Unique scriptable GUI system.
  • Custom network library for transmitting data between multiple instances over LAN, or Internet.
  • Support for communication with external processes.
  • Windows registry, "INI" and XML file support.
  • Audio support.
  • Text to speech system.

Getting started

The best way to start and see if MacroMonkey is the tool for you, is to try some of the examples in the "examples" directory.

A good visual example, the GUI (Graphical User Interface) sample:
Examples\GUI\GuiTest.mms



Another visual example, a simple TUI (Text User Interface):
Examples\TUI.mms




Server and client network communication example:
1) Open a server connection.
Examples\Network\Network Server.mms

2) Open one or more client connections.
Examples\Network\Network Client.mms

3) Press a key in any of the consoles to send a packet, and get one back.




Try the IPC (Inter-Process Communication) system:
Examples\IPC Test.mms
Creates an instance of Examples\Data\TestProcess.exe with DLL Examples\Data\TestInject.DLL injected.
1) Press '1' or '2' in the console window to send an IPC message to the process.
2) Press '1' or '2' in the process window to send an IPC message event to the script (console window).



And try the many more examples/samples/tests in the "examples" directory..
There are samples for most of not all of MM's libraries.


Scripting

MacroMonkey uses the powerful, fast, lightweight, and easy to learn Lua scripting language.
Lua version: 5.1.4 as of September 2009.
See: About Lua
Wikipedia, Lua programming language
Learning Lua

Lua is a tried and true language used by many for industrial applications, video game logic, configuration, etc.
It's first release was fifteen years ago. Since then it has been banged on (tested) a lot and lot of bright minds have worked on it.

If you used any other programming language then Lua will probably come easy to you.
Sirmabus: I found it similar in syntax to the C language. And it's easy for me to switch between C/C++ and Lua.

Lua example:
Code: [Select]
-- Classic hello world
print("Hello World!")


Lua allows you to create your own object oriented language features through the use of meta-mechanisms instead of implementing these features directly in the language.
It's very flexible and allows you to create your own "class"/object concepts with inheritance, encapsulation, etc.
See: Object-oriented programming (OOP) and Lua Metatables - Classes.

Building C/C++ extensions/libraries is easy. Just include a single header and library file from the MM SDK folder.
And use the Lua C API (see "The Application Program Interface") or one of the many binding setups like "Binding Code To Lua" et al.

To communicate to a service DLL (a remote/injected DLL that provides "services") the MM IPC facility can be used. This way communication is done via raw data (with the help of the MM Pack library). No need to create a go-between extension DLL, nor even learn the Lua C API.


Extensions

MM has the base Lua Standard library (with some improvements), in addition it has many libraries to facilitate automation use and added script utility.
MM with simplicity in mind, uses Lua tables, metatables, and metamethods to make it's libraries more object oriented and modular.


Libraries:

bit   Bitwise operators
console   MM console support.
win   Windows lib.
color   Color space support.
audio   Audio lib.
time   Time lib.
process   Processes support.
input   User Input, both actual and simulated.
ini   INI file support.
registry   Windows registry support.
hash   Data hash and checksum (MD5, etc.) lib.
lxp   LuaExpat XML lib.
xml   LuaXml XML file lib.
vector2, vector3   Vector math.
speech   Text to speech engine.
server, client, ClientConnection   Lan/Wan network communication system.
ipc   IPC (Inter-Process Communication) system.
gui   GUI lib.
gui.Window, gui.Menu, gui.TabControl, ...    GUI window system and controls.

Library gui example:

Code: [Select]
-- Show a simple GUI message box with "Yes", "No", and "Cancel" buttons.
gui.MessageBox("Test", "This is a message box", gui.MB_YESNOCANCEL)