MacroKeybind

MacroKeybind is a Liteloader mod for various versions with lots of macro, keybind, keyboard, mouse, command and potential for players to use.

All the necessary information, screenshots, videos and downloads can be found on the Minecraftforum.net page for the mod.

Features
Bind chat commands and scripts to keyboard keys, mouse buttons and custom menus

Easy to use GUI. Just activate the mod then just press the key you want to bind. No complicated commands to remember!

Bind keys which are already used for something else! Want to put a macro on the number keys, mouse buttons or WASD? Using the override function you can use these keys for both their normal function or as macros when you need them.

Edit keybinds quickly. Change your binds whenever you want. You can even copy and move macros from key to key with drag 'n drop.

Multiple configurations. Different binds in different servers? No problem! It even switches automatically.

In-game text editor. Want to make a complex macro? No need to alt-tab to notepad, create and edit text files inside minecraft.

Lots of easy-to-use parameters. Lists of friends, automatic responses, warp points, towns, you name it.

Scripting! Build custom auto-announcers, time-delay messages, or create your own auto-walk, toggleable-sneak or sprint keys.

Custom GUIs! Create your own custom GUI and hook up your macros for instant in-game menus

Permissions System Server admins can lock down chosen features of the mod using the easy-to-setup Client Permissions plugin, allowing seamless integration with the server's existing rank system.

How to Install
Install LiteLoader

Download the .litemod file for your version of minecraft here and save it into your "mods" folder (create the "mods" folder if it does not already exist) NOTE: Some browsers will change the file extension to .zip when downloading, if this happens be sure to change it back to .litemod or LiteLoader will not find the mod!

Run the Minecraft client

Check the Controls screen in the Minecraft configuration to make sure there are no conflicts with other keys you use. This mod adds pages to the Controls screen for enhanced configuration of any mods which add custom keys

How to Bind Keys
To bind keys:

In-game, simply press [SNEAK KEY]+GRAVE (change the key in the options if this doesn't work for you) and you will be prompted to press a key.

Press the key you would like to bind or click it on the on-screen keyboard

Enter the chat command (including the / at the start), separate multiple commands with pipe "|"

Press ENTER to save the keybind, press ESC to cancel it. To edit a keybind repeat the same process.

If the key doesn't have any other function (eg. it is not bound to any other built-in command or function) then just press the key

If the key is bound to another function (such as the WASD keys or T,I etc) press your [MACRO ACTIVATE] key (as you set in the options) followed by the key.

Alternatively if the key is bound to another function press [MACRO OVERRIDE]+[KEY] (again, you can set this in the Controls screen)

To use Keybinds
If the key doesn't have any other function (eg. it is not bound to any other built-in command or function) then just press the key

If the key is bound to another function (such as the WASD keys or T,I etc) press your [MACRO ACTIVATE] key (as you set in the options) followed by the key.

Alternatively if the key is bound to another function press [MACRO OVERRIDE]+[KEY] (again, you can set this in the Controls screen)

Advanced Keybinding Features
To get started using the mod, you can find an list of commands and keycodes and guide to the other features in the mod in the readme.txt

Language Packs
As of version 0.8.5 language packs are no longer required as the supported languages are directly integrated into the main download and will automatically switch based on the chosen Minecraft language. If you would like to provide a language pack for your language please contact me via PM.

Current language packs in the mod:

German Language pack by AJFire and Gorlem French Language pack by Chokapix Polish Language pack by kamild1996 Dutch Language pack by Dyon123 Spanish Language pack by agubelu and C4BR3R4 Ukrainian Language pack by eXtendedZero Russian Language pack by boroda-ua, LastLife919 Norwegian Language pack by glitchdetector Japanese Language pack by Lemon_cmd

For historic language pack information expand the spoiler (info below):

Chokapix has provided a french translation for this mod. You can download it here.

AJFire kindly provided a german translation for this mod. You can download it here (direct link). Place the downloaded file in your minecraft folder or your mods folder.

Quote from AJFire » Die Deutsche Sprachdatei sollte nur benutzt werden, wenn ihr der Englischen Sprache nicht m?chtig seit. Einige Texte wurden 1 zu 1 von mir ?bersetzt.

Changelogs
Changes for 0.15.0 and 0.15.1

Updated to Minecraft 1.12 (0.15.0) and 1.12.1 (0.15.1)

Updated ACHIEVEMENTGET to show an Advancement Toast

Added TOAST command to display all types of available toast, see this post for details. Syntax is

TOAST([type],[icon],[text1],[text2],[ticks])

Added new globals UUID (constantly rotating GUID), BOWCHARGE (0 to 100) ITEMUSETICKS (all usable items increase this value once per tick) ITEMUSEPCT (previous value as percent of total usage time)

Fix PICK to correctly work with enchanted items

Added japanese translations thanks to Lemon_cmd

Fix display of minecarts in VEHICLE global, fix SEED in single player

Fix bug with using i (item) type hint in user-defined param lists

Add bindable key for REPL in the main bindings, allows direct access to console

Added dot as alias for RUN command in REPL, eg. use .foo to run foo.txt

Added autocompletion for RUN command

Added REPL commands KILL and SHUTDOWN

Added support for exporting and importing GUI xml, allows GUIs to be backed up, shared and duplicated

API version is now 26

Changes for 0.14.3 and 0.14.4

Fixed a crash bug with the item $​$i param

Fixed a bug with assign parser where value contains a colon

Fixed FILTER action not stopping the macro when used in onSendChatMessage event

Fixed minor highlighting bug in text editor when moving cursor using the mouse

Fixed durability watchers so that onDurabilityChanged and onArmourDurabilityChanged work again

Fixed a crash with the FILTERABLECHAT gui

Added support for ?% VARNAME in REPL as "quick expand"

Added hotkeys for GUI Editor (Ctrl+G), page selection (Ctrl+1, Ctrl+2, Ctrl+3), and Icon Editor (Ctrl+I) in main binding GUI

Added more hotkeys in text editor (save, open)

Added optional dark colour scheme for text editor

Fixed a bug with custom sounds not working in PLAYSOUND script action

Fixed an alignment bug when using any variant of align bottom with the Custom Layout control

Fixed an issue with loading default bindings when the "Save slot assignments" option is unchecked in the Gui Manager

Fixed a registration bug with module events which could cause event IDs to overlap

Added an option to allow binding keys to work on any bind page (events and buttons)

Fixed a bug with the config panel which meant all mouse clicks (right click, middle click, scroll) were treated as left click

Improved copy/paste of control properties and control creation

CTRL+clicking a property name adds it to control's "property mask", if properties are selected, only those properties will be pasted to target controls

When creating controls, if a control is selected as a copy source, new controls will have selected (or all) properties auto-pasted to them

Added keyboard navigation support to the "gui bindings" screen. Can now use arrow keys to navigate and bind screens to slots

Added some extra keyboard navigation to "macro edit" screen, can now switch macro types using Ctrl+Tab

Changes for 0.14.2

Updated to Minecraft 1.11.2

Changes for 0.14.1

Updated to Minecraft 1.11

Added TITLE action to display Minecraft titles

Added POPUPMESSAGE action to display Minecraft action bar popup messages

Added CAMERA action, call with no arguments to cycle camera modes (same as F5), or call with 0, 1, 2 to set specific mode

Added CAMERA environment variable, returns current camera mode

Updated Spanish (es_ES) translation thanks to C4BR3R4

Added SCREENNAME environment variable with display name of current custom GUI

Added BACKSPACE as a supported key for deleting controls when in edit mode for custom GUIs

Fixed SHOWGUI not closing current custom screen when called with no arguments

Added third argument to SHOWGUI to allow macro keys to still function when a custom GUI is displayed

Added REGEXREPLACE action with identical sematics to REPLACE except regexps are supported (including backreferences)

Added Icon custom control which allows hud display of items and custom textures

Max custom texture size 1024

Use item name to choose display, append : to choose variant, eg. wool:14

Place custom textures in macros/icons/custom, file names must be lowercase, files must be png, transparency supported

Icons assumed to be 16x16, larger files will be scaled, use the scale setting to adjust draw size (eg. scale=2 == 32x32)

Added Layout (Custom GUI) custom control which allows layouts to be embedded within other layouts

Recursion prohibited, embedding a layout in itself will render error

Layout size limited to larger of 16x16 or min allocated fixed with (eg. if fixed width colums == 200px then layout will not render below that size)

Layout alignment possible, allows "fixed size" GUI elements for the first time

Added ability to choose the initial configuration, right-click a config and choose "Set as startup config" to set config as default

Fixed bug with TRACE which meant that X, Y, Z coords were not available when trace hit an entity

Added live display of macro condition in conditional macro GUI

Added RUNNING iterator to iterate over running macros, provides MACROID, MACRONAME, MACROTIME

Added ISRUNNING action, takes the name or ID of a macro and returns whether the macro is currently running

Add background colour property to Icon control

Fix a bug with HITNAME not working for players

Restore old behaviour of delete mode for controls, attempting to delete an unbound control will attempt to delete the control

Fix bug with opening the chat filter editor

Added RELOADRESOURCES action, equivalent to F3+T

Fixed bug with syntax highlighting in the text editor

Fixed onModeChange only firing when switching to/from creative mode

Textarea log messages now correctly time out even when textarea is not being displayed

Added LOGRAW action which mimics tellraw command and allows JSON chat to be injected to the local chat

Updated Russian translation thanks to LastLife919

Fixed a bug which caused EXEC parameter requests to "leak" into macros using PROMPT

Fixed EXEC variable provider so that variables actually have the correct type (eg. &var1, #var2)

More script actions actually return a relevant value

Added SET shorthand syntax similar to pascal assignment operator: #var := "value" performs a SET assignment (RHS coerced, not evaluated)

Fixed a rendering bug with the override popup being rendered even when HUD is disabled

Added ability to disable the override popup entirely

Added experimental REPL interface

Added binding decoration for conditional and keystate macros

Changes for 0.13.2

Updated for Minecraft 1.10.2, also supports Minecraft 1.10

Updated russian translation thanks to LastLife919

Fixed localisations for event help and scripting help not being loaded

Added slider gui control

Added border option for label control

Fixed PLAYSOUND for sounds which have underscores in their name

Added option to suppress macro override functionality in command block gui

Fixed pickup item amount always registering zero in single player

Display rubberband when resizing gui controls to improve visual feedback

Improved behaviour of right-click context menus in custom gui hosts

Playback Status can now be added as a control, doing so disables the normal playback status overlay

Fixed arrowheads not drawing on some control widgets

Added new iterator CONTROLS to iterate over existing controls, provides CONTROLID, CONTROLNAME and CONTROLTYPE variables (details)

Changes for 0.13.0

Updated for Minecraft 1.10

Fixed onJoinGame occasionally not working

Changes for 0.12.2

Fixed Russian and Ukrainian language translation loading

Removed beta expiry check which was accidentally left enabled

Fixed accessing the settings screen from the liteloader mods menu

Changes for 0.12.1

Updated for Minecraft 1.9 and 1.9.4

The following environment variables now have off-hand equivalents:

ITEM => OFFHANDITEM

ITEMIDDMG => OFFHANDITEMIDDMG

ITEMCODE => OFFHANDITEMCODE

ITEMNAME => OFFHANDITEMNAME

DURABILITY => OFFHANDDURABILITY

ITEMDAMAGE => OFFHANDITEMDAMAGE

STACKSIZE => STACKSIZE

The following environment variables were added

COOLDOWN - applies to chorus fruit, shields, ender pearls, etc.

OFFHANDCOOLDOWN - same as COOLDOWN but for items in off hand

ATTACKPOWER - 0 to 100 scale of current weapon power based on attack cooldown

ATTACKSPEED - representation of entity attack rate (ticks), range from 0 to 20480

A complete rewrite of auto-crafting, the CRAFT and CRAFTANDWAIT commands are now available again. Crafting will be slower than the old system but much, much more reliable. It can cope with a lot more crap than the old version.

Calling CRAFT now queues the crafting requests, queued requests are shown on the HUD

A new command CLEARCRAFTING which cancels the current crafting job and any queued crafting jobs

Calling SHOWGUI with the name of a custom screen which doesn't exist now creates the screen

All designable BUTTON controls now have an assignable hotkey:

In custom screens, the hotkey can be used with no modifiers

In the Chat screen, the hotkey can be used if you hold down ALT

The hotkey is inactive in other screens (ingame, indebug)

Changes to the command reference screen:

If you press F1 in the macro editor, the command reference will open on the command under the cursor now

You can now type to filter the commands list

Added ability to set the step value for FOR loops:

Use syntax FOR(var, from, to, step)

Alternatively use FOR(#var = 1 to 10 step 2)

Added TRACE command which executes a raytrace of specified length, takes two parameters: distance (3-256 metres) and entities (true or false to trace only blocks or include entities). Executing a TRACE makes the variables TRACETYPE, TRACENAME, TRACEID, TRACEX, TRACEY, TRACEZ, TRACESIDE, TRACEUUID, TRACEDATA available in the local scope.

Changes for 0.11.3

Updated to Minecraft 1.8

Internal updates to parameter parsing, may break things

Added $​$s for shader list

Added GETPROPERTY to get property values from GUI controls

Added SIGNTEXT environment array

Added UUID, HITUUID, DISPLAYNAME, DIFFICULTY, LOCALDIFFICULTY, DAY

Added GAMEMODE which contains game mode name, unlike MODE which contains the mode ID

Added CARDINALYAW, which is the yaw relative to north (eg. 180 degrees away from "real" yaw where 0 degrees points south)

Added all new "block properties" as environment vars, prefixed with HIT_, eg. "variant" can be accessed via HIT_VARIANT

SHADERGROUP command now supports "-" to step backwards through shaders

Updated CRAFT and CRAFTANDWAIT commands to use new internal algorithm, now much slower but much more reliable than before

Changes for 0.10.12

Updated for minecraft 1.7.10

Internal support for synchronous macros (that's right, like ChatFilter macros have been to date) which opens up some interesting possibilities, the first of which is

the FILTER and PASS commands from the chat filter can now be used in the onSendChatMessage event in order to allow the message to be sent or not (yes this is something I said was impossible for a long time and is actually now only possible because of the aforementioned improvements to liteloader).

The trade-off is that the onSendChatMessage event now runs synchronously. This is experimental and I may remove this if it causes too many problems such as game crashes or people's computers catching fire.

Fixed issue with multiple \ characters always being collapsed to a single \ because of a mistake in the escape handling

Fixed issue with using GUI to close container GUI's not actually closing the container.

Fixed type hints not working in inline list parameters since 1.7

STOP now parses its argument, so variables can be used

More things I probably forgot but I'm tired.

Old Changelog (no spacing)
Changes for 0.10.04

Updated to Minecraft 1.7.2 (seriously, recoding it from scratch might have been easier) Fixed label text being messed up with some formatting code arrangements Fixed amount and ID in the onPickupItem event Fixed mismatch between XPOS, YPOS, ZPOS vars and the position reported in the $​$p menu Added documentation entries for undocumented script commands Fixed key state macros not working correctly when set to always override Added descriptive message to uncollapsed stack error, eg. "DO expects LOOP, WHILE or UNTIL" Optional capturing subgroups now return empty string instead of throwing an error Hooked outbound messages to Forge ClientCommandHandler if present to support client commands in Forge mods Fixed broken help display in conditional event macros Fixed broken help display in "simple gui" mode Outgoing chat splitter now trims leading and trailing whitespace on partial messages UCASE and LCASE commands returns string converted to upper and lower case respectively No more custom controls GUI, plug in to the new 1.7 controls GUI and consolidate some options ("direct mode" setting now accessible via controls list) Added abiility to support environment variables that are arrays, used for RESOURCEPACKS and SHADERGROUPS Removed TEXTUREPACK and RESOURCEPACK Added RESOURCEPACKS command which takes comma-separated list of pack identifiers Addded RESOURCEPACKS environment variable which contains comma-separated list of current resource packs Addded RESOURCEPACKS[] array environment variable which contains active resource packs as an array Added SHADERGROUPS[] array environment variable containing the names of all available shader groups Added SHADERGROUP environment variable containing the name of the currently selected shader group Added SHADERGROUP command to select a specific shader group, accepts the group name, file name or full path: SHADERGROUP("fxaa"); SHADERGROUP("fxaa.json"); SHADERGROUP("minecraft:shaders/post/fxaa.json"); SHADERGROUP(+); // Select next shader Added RECORDVOLUME, WEATHERVOLUME, BLOCKVOLUME, HOSTILEVOLUME, NEUTRALVOLUME, PLAYERVOLUME, AMBIENTVOLUME environment variables containing current volume settings VOLUME command now accepts second parameter to specify the sound category eg. VOLUME(50,"WEATHER") FOG command can now accept a numeric argument which is the chunk distance to select (also still supports "far", "tiny" etc.) Chat filter now built in and uses different scripting context to the main scripting engine to prevent use of potentially fatal commands onSendChatMessage event added GETID supports minecraft-style relative locations by prepending tilde to coords KEY supports "screenshot" and "smoothcamera" KEYUP, KEYDOWN and TOGGLEKEY support "playerlist" and "sprint" All numeric item and block IDs removed Item and block IDs and commands which require them will now require item names instead Added ITEMID and TILEID commands to get legacy IDs of items and tiles respectively from their names. Note that these commands are temporary to allow a smoother transition to the 1.7 system and will be removed in 1.8 when numeric ID's are completely removed from the game Example usage: #oldid = ITEMID("golden_sword"); Added ITEMNAME and TILENAME commands to get the new name identifiers for items and tiles respectively from their legacy IDs. Label controls can now accept a fully-expandable value for their "binding" instead of just a single var name SERVERNAME now contains the save name in single player Macros config screen accessible via the liteloader config panel as well CONTAINERSLOTS environment variable containing the number of slots in the currently open container Added CHUNKSUPDATED environment variable

Changes for 0.9.11

Updated to Minecraft 1.6.4 and tweak system 1.8 Large internal overhaul of the events system, might be bugs please let me know. API Version to 13, now supports modules providing custom events. Added experimental filterablechat gui and corresponding event, for science. Disabled by default. All script actions that logically ought to return a value now return a value. Added return value info to the command reference screen Fixed issue with using expansion operator as an array index not working as expected Fixed durability change event on shears

Changes for 0.9.10

Updated for Minecraft 1.6.2, and believe me this was no picnic Kick/disconnect now properly triggers onJoinGame when rejoining Improvements to macro enqueue/dequeue which should prevent CoModificationException when calling STOP inside an EXEC'd task Fixed ECHO not working inside UNSAFE when flood protection is enabled (still prevented when flood protection is off) Improved escaping for | inside script actions, \| should now work as expected in regex and ECHO Fixed issue with array iterator position var Improved SETRES to work more reliably than the old version Added RESOURCEPACK command as an alias of TEXTUREPACK, both versions work for compatibility purposes Added environment var iterator "env" with iterator variable VARNAME API Version bump to 12 Online player list $​$u is now sorted again Fixed issue with numpad enter not being recognised on Macs Use fixed custom font in binding screen to avoid display being messed up   INDEXOF now takes a fourth parameter which when set to TRUE will perform a case-sensitive lookup (default is case-insensitive) Added ENCODE and DECODE which perform base64 encode and decode, you're welcome Bagline Added SQRT function with signature SQRT(input,#outvar); Only works on integers Added CALCYAWTO (calc yaw to) function which provides functionality of old POLARXZ. This function returns the YAW value (in minecraft degrees, 0 points SOUTH) that points to the specified X/Z coordinate pair File include limit is now configurable (previously hard-coded limit was 10 includes) Added SPLIT and JOIN which can explode and implode arrays:

SPLIT(delimiter,string,&outarray[]); JOIN(glue,inarray,&outstring);

Updated Russian translation by boroda_ua Updated Ukranian translation by eXtendedZero

Changes for 0.9.9

Updated to Minecraft 1.5.2 Added UNSAFE blocks which disable the execution rate limit normally applied to macros Added GUI for assigning custom GUI's to available "slots" such as ingame, inchat, etc.   Added "scoreboard" and "indebug" slots for ingame GUI's    Added SHOWGUI command for displaying arbitrary custom GUI's: SHOWGUI("somecustomgui"); Added BINDGUI command for assigning GUI's to slots via script: BINDGUI("ingame","somecustomgui"); Added armour item max damage vars: BOOTSDAMAGE, LEGGINGSDAMAGE, CHESTPLATEDAMAGE, HELMDAMAGE containing the total damage the armour item can take Added armour item name vars: BOOTSNAME, LEGGINGSNAME, CHESTPLATENAME, HELMNAME containing the name of the armour item equipped Added CHATVISIBLE, CHATOPACITY, CHATSCALE, CHATWIDTH, CHATHEIGHT, CHATHEIGHTFOCUSED commands for setting chat options Added vertical style to progress bar control Added support for using expressions in progressbar min and max fields Fixed auto-craft for recipes with wildcard block types in the recipe Modified auto-crafting status GUI to display failure reasons when auto-crafting fails Auto-crafting now returns NORECIPE if a recipe is not found (previously returned NOTSTARTED). NOTSTARTED now indicates a recipe was found but sufficient items to craft the recipe were not. Added SERVERMOTD, SERVERNAME, MAXPLAYERS, ONLINEPLAYERS, HITPROGRESS, DISPLAYWIDTH, DISPLAYHEIGHT, CANFLY and FLYING environment variables Added HITPROGRESS variable (block breaking progress (range 0-9)   Added SCREEN environment variable containing currently displayed custom GUI    Allowed sorting of parameter lists using CTRL+S    API revisions, API version now 10    GETSLOT, GETSLOTITEM and SLOTCLICK now act upon the hotbar if no container is currently open using virtual slot ID's 1-9    Added command reference screen to in-game text editor    Added SETPROPERTY command for setting GUI control properties via script: SETPROPERTY(controlname,propertyname,value)    Added "visible" property to all controls, only settable using SETPROPERTY currently

Changes for 0.9.8.2

Updated for Minecraft 1.5.1 Compatibility with Forge's new runtime deobfuscation More consistent handling of array-type specifiers Scripting API improvements PLAYSOUND now takes a volume value as the second argument (range 0-100) GAMMA/FOV and other settings commands parse variables correctly Nonexistent environment vars no longer return "False" and will return their name, as per previous behaviour Environment vars update more quickly ProgressBar control with dynamic expression parsing Enchantments on enchanted books can be iterated using the enchantments iterator Updated Ukranian translation provided by eXtendedZero and Alexemov Updated Russian translation provided by boroda_ua EXEC doesn't unexpectedly add quotes to string variables any more Changed handling of quotes inside IF and IIF to avoid messing up string comparisons Added BREAK for escaping loops Added DAYTIME and DAYTICKS variables

Changes for 0.9.8

Updated to MC 1.4.7 even though I didn't really need to   Added VEHICLE variable, which contains the currently ridden entity name Added SATURATION variable containing current food saturation variable (rounded to nearest integer) Fixed the following issues Iterator bug, iterator not removing provider from stack when eval'd inside non-executed conditional blocks CHATCLEAN in incoming chat messages causing inifinite loop Escaped quotes in the text area messing up highlighting/not being recognised Permissions mask not protecting onChat and onJoinedGame Undefined variables cause entire string to be blanked out String variables in conditions not working correctly Crash when using mouse with more than 5 buttons Threading issue when adding text to a TextArea Item pickup event triggering for nearby players as well as the player Bug when assigning strings containing colour codes to a label Issue with configs drop-down not being clickable on events or buttons panel Added iterator for player effects called "effects" which provides the following iterator vars:

EFFECTID // Internal effect ID number EFFECT // Bare effect name eg. "SPEED" EFFECTNAME // Effect name eg. "Speed II" EFFECTPOWER // Effect multiplier, eg. 2 EFFECTTIME // Remaining effect time in seconds

Added new options to GUI command, can now use "macroplayback" and "texteditor" as options Added debounce compatibility setting to help combat key event duplication on slow computerss Added reserved key detection for Rei Minimap, VoxelPlayer and VoxelFlight Added onConfigChange event Added option to tell flood protection to ignore messages starting with / Changed the way that %-expansions are handled inside conditions so that %-expanded variables are consistently treated as strings. Russian language pack supplied by boroda-ua Norwegian language pack supplied by glitchdetector Added $​$k parameter which lists available texture packs Updated item enumeration method, should more reliably detect all types of item in the game now, including potions Enchantments iterator now has ENCHANTMENTNAME and ENCHANTMENTPOWER as well

Changes for 0.9.7.3

Fixed FML causing event handler VariableProviders to not load Fixed the "store sent messages in local chat history" option which was broken

Changes for 0.9.7.2

Fixed UNSET that was broken by the variables system rewrite Fixed GETSLOTITEM returning items from the survival inventory all the time

Changes for 0.9.7

Updated for Minecraft 1.4.6 Variable support completely rewritten, should be more faster and more flexible, may be some bugs please let me know if you find any Added array support, all variable types can now be suffixed with indices in square brackets [] New commands for handling arrays:

PUSH(arrayname,value); POP(arrayname,var); PUT(arrayname,value); ARRAYSIZE(arrayname,var); INDEXOF(arrayname,var,searchvalue);

Added support to UNSET to unset array values Local variables now stored in a separate XML file .vars.txt Syntax of FOREACH extended to support arrays:

FOREACH(array,var); FOREACH(array,var,#pos);

Fixed problem with ITEM not returning the correct localisation for some items Added option to show/hide shadow under label text Labels now accept \n as a newline delimiter like buttons do   Added navigation shortcuts to binding screen Fixed cut/copy/paste in parameter prompts Configs can now be switched with a drop-down list instead of needing to go via the settings menu German translation updated thanks to Gorlem Fixed escaping for quotation marks in strings, literal quotes can now be escaped with \ Added php-style array push syntax to assignment expressions Added configurable foreground & background colours to button controls PROMPT now supports an optional fifth parameter "default" which is returned if the user presses ESC in the prompt GUI.

Changes for 0.9.6.1

Updated for Minecraft 1.4.5 Added parameter parsing to KEY, KEYUP, KEYDOWN and TOGGLEKEY Added FPS global variable containing current FPS Fixed derpy behaviour when setting label backgrounds to fully transparent Fixed graphical glitch when placing new controls at certain resolutions

Changes for 0.9.6

Updated for Minecraft 1.4.4 Added context-sensitive help to in-game text editor, displays syntax for script commands as you type Added support for creative inventory to GETSLOT, GETSLOTITEM and SLOTCLICK using virtual slot ID system Added SETSLOTITEM script command with syntax

SETSLOTITEM([itemid[:damage]],[slot],[count])

Only works in creative mode! If "slot" is omitted sets the currently selected slot. Added buttons/controls support to the "chat" screen Added configurable message lifespan to textarea Fixed a issue with STOP which caused the macro to sometimes run on for an extra few ticks Fixed a bug with LOOK caching arguments when it shouldn't   Fixed bugs with the parameter list perceiving phantom double-clicks, and fixed right arrow key function in preset text lists

Changes for 0.9.5.2

Fixed onChat event Fixed faulty registration of SETLABEL action, now works correctly in release Removed relative syntax from GETID because it broke the ability to use negative X and Z coordinates! Added GETIDREL which works the same as GETID but uses relative coordinates Added new global variables HITX, HITY and HITZ, HITSIDE which correspond to the world coordinates of the hit block. Added support in MODE variable to return adventure modes => now returns 2 when in adventure Fixed slight mouse position detection error on macro stop buttons, added highlighting to make it clearer which macro will be stopped Added additional usage for item parameter, can now insert the selected damage using $​$d:

/give Mumfrey $​$i $​$[amount] $​$d

Added experimental command PROMPT with syntax:

PROMPT(&targetvar,"$​$u","Prompt message",true);

Parameters 3 and 4 are optional. The fourth flag specifies whether the prompt is allowed to override another GUI if another GUI is open when PROMPT is invoked. Note that this command is experimental at the moment, use with care a please report bugs ITT

Changes for version 0.9.5

Updated for Minecraft 1.4.2 Added ITEMIDDMG variable which always contains the held item's ID and damage values in the format : GETID now supports 2 extra functions: Can now accept a fifth parameter which will retrieve the block metadata:

GETID(100,72,100,#blockid,#blockmeta);

Can specify relative coordinates by prefixing + and - to the supplied coords:

GETID(+0,-1,+0,#blockunderfeet);

Added extra internal hook to support the ChatFilter module Fixed a bug with preset text lists not submitting properly Compiler flags can now be set during macro playback on a per-macro basis! Pre-filled parameter values are now highlighted to make typing over them much easier

Changes for version 0.9.4

Updated to support Minecraft 1.4 Parameters system has been almost completely rewritten - may still be some bugs. The main visible change is that parameters now have a proper text field for entry instead of the old prompt. Permissions support, server owners can install the ClientPermissions plugin to remotely control mod features. Flood protection module with configurable flood protection behaviour - excess messages can be queued, discarded or logged to the console. Improvements to the Label component and better binding support Textarea components now support configurable foreground colour, can also now be added in the designer. Initial version of general-purpose GUI designer, currently only supports designing the "ingame" GUI overlay. GUI Designers allow column widths to be specified ingame TEXTUREPACK, CRAFT, CRAFTANDWAIT and PICK now allow variables to be used SETLABEL action can set a label component's text and binding:

SETLABEL(labelname,text); or   SETLABEL(labelname,text,binding)

SETRES action can set the window size, useful for recording video or taking cubemap screenshots

SETRES(width,heigh)

Fixed a compatibility issue with Forge when running under MacOS or Linux API revision incremented to 5 Added "mini" macro override prompt (optional, replaces the old "Press a macro key to execute" prompt) Added ACHIEVEMENTGET("message",itemidforicon) script command WAITs can now be specified in ticks using the syntax WAIT(10t)

Changes for version 0.9.3

Fix for the forge mod loader (FML) classloader issue, should happily work with forge now Fixed XP global variable Fixed conflict highlighting in the "Controls" screen Added LMOUSE, RMOUSE and MIDDLEMOUSE variables to VariableProviderInput Ukrainian language support thanks to eXtendedZero

Changes for version 0.9.2

Support for Minecraft 1.3.2 ModLoader deprecated in favour of LiteLoader

Changes for version 0.9.1

Added conditional macros, a new type of macro which supports a single pre-compilation conditional expression Improved error handling in the script engine initialisation routines, should stop WorldEditCUI and other mods from breaking this mod Added CRAFTANDWAIT script action, which blocks until the requested craft process has completed Fixed a serious bug which meant that auto-discovery didn't work properly most of the time Added binding screen colours to the config file as an accessibility measure Added mouse wheel binding capability LOGTO can now log to text files as well as text areas, specify a file name (ending with .txt) as the target GUI controls now stored in a treemap so they are serialised in a more sensible order Added option to hide the minecraft chat Added CLEARCHAT script command API version is now 4 Added startup message if there were errors loading modules Added DATE, TIME and DATETIME variables containing current system time Added formatting-code stripping to onPlayerJoined Delete mode can now be used to delete buttons if they are already unbound Added spanish language support thanks to agubelu!

Changes for version 0.9

Added "buttons" functionality to create macro-able buttons on the macro playback screen STACKSIZE variable gets the size of stack in hand Improved handling of multi-line chat messages Made improvements to the JInput module, MOUSE3 and MOUSE4 now properly supported, and nodes configurable for use under linux and mac. onChat event now have CHATCLEAN, CHATPLAYER, CHATMESSAGE which uses experimental "guess" algorithm to split inbound chat. Be aware these variables may not contain what you expect, so experiment!!! Added STRIP command to remove colour codes from strings, syntax is:

STRIP(&outputvar,"String to remove colour codes from")

Improved API module loading Fixed a crash when updating item names from mods which don't correctly support item names Added FOR...NEXT loop, syntax is

FOR(#counter,1,10); // Do stuff NEXT;

Automatic crafting using CRAFT, and inventory management using SLOTCLICK

CRAFT(35); CRAFT(35:1); CRAFT(35:1,32); CRAFT(35,32,true); // Throw crafted stacks SLOTCLICK(12); SLOTCLICK(12,r); // right mouse SLOTCLICK(12,l,true); // simulate holding shift

CRAFT is still a bit experimental, you must be aiming at a crafting bench to craft recipes requiring a crafting bench, recipes which can be crafted in the inventory will open the inventory gui New option to display slot ID's as a tooltip. You will likely need to use this if you wish to construct scripts that use SLOTCLICK. Note that slot id's vary between GUI's so you will need to check the GUI variable before executing any inventory management! Added GETSLOT command to find items in slots. Syntax:

GETSLOT(35,#var); // gets the slot containing wool into variable #var GETSLOT(35:4,#var); // gets the slot containing blue wool GETSLOT(35,#var,10); // gets the slot containing wool but starts at slot 10

PICK now supports multiple item id's and also damage values Fixed bug with onPlayerJoined event triggering for every player on a server when joining Huge improvements to text editor: copy/paste, selection, basic syntax highlight, minimise editor, choose file Dutch language support thanks to to Dyon123 MATCH can now store multiple matches in multiple variables:

MATCH(%CHAT%,"(.+?):(.+)$",{&beforecolon,&aftercolon})

IFMATCHES can now store the match

IFMATCHES(%CHAT%,"pattern",&store,1); // store subpattern 1 in &store

Parameters to EXEC are now expanded allowing variables to be passed in as arguments Can now use extended formatting codes in LOG messages GUI variable, get the name of the currently display GUI screen Can now do basic arithmetic and assignment of flags and counters in scripts (not strings yet!)

#counter = HEALTH * 10

Arithmetic supported in conditional expressions Fixed crashes with some variable providers when invalid data is stored Replaced large COPY, MOVE, DELETE buttons with neater buttons on the binding bar, added option to put them back in case people prefer them Added FOREACH iterator function for iterating enchantments, more iterators to come

FOREACH(enchantments); LOG("Held item has enchantment %ENCHANTMENT%"); NEXT;

Added "first run" dialog box to prompt users to set the keys, and confirm correct installation onPickupItem now includes an instance variable PICKUPAMOUNT to get the size of the collected stack Made improvements to the macro edit text fields to support cut/copy/paste and (should) fix cursor positioning issues caused by Optifine and others Can now specify a port with server-named configs to support auto-switch on servers with multiple ports Added debug log container in-game, can now write log messages to separate text area using

LOGTO("debug","Text to log to debug container")

Added option to resize keyboard layout display for use in higher resolutions onShowGui event, raised whenever a different GUI is displayed, access name of the current GUI with the GUI global variable Added a status display for auto-crafting Added onArmourDurabilityChange event Added variables for worn armour ID and durability: BOOTSID, BOOTSDURABILITY, LEGGINGSID, LEGGINGSDURABILITY, CHESTPLATEID, CHESTPLATEDURABILITY, HELMID, HELMDURABILITY Added onAutoCraftingComplete event Added "don't close gui" option to buttons Buttons which don't close the GUI no longer accept parameters More stuff I probably forgot but this changelog is long enough already

Changes for version 0.8.7:

Updated for Minecraft 1.2.5 Added option to log sent messages in the local chat history (defaults to off) Added RANDOM, TIME and PLAYSOUND script actions Added optional 5th parameter to MATCH to specify default value to use if the match fails Event bind buttons now have icons Event-specific help content added when editing an event binding Added YAW, PITCH and DIRECTION global variables Added onPickupItem and onPlayerJoined events Fixed list parameters not retriggering macro compilation Made some improvements to the key injection subsystem to support more reliable injection of key events

Changes for version 0.8.6.3:

Fixed a crash bug when executing a macro with the cursor over another player

Changes for version 0.8.6.2:

Fixed cursor movement in some text fields Added some additional variable parsers to some script actions so it's now possible to pass variable values into more script commands, mainly anything that takes a numeric value as an argument Mouse wheel now scrolls the pane under the cursor in the Macro Options screen Added an option to disable the Macro Override function in the Chat GUI specifically, stops the mod overriding copy and paste commands when X, C or V keys are macro'd

New features in version 0.8.6:

Updated to minecraft 1.2.4 List parameters, define lists using $​$this,is,a,list,of,items Added item overrides setting to force inclusion of items that aren't normally enumerated automatically, such as snow block String variable support added, prefix string variables with & Added HIT, HITNAME, HITID and HITDATA variables Added FOV, GAMMA, SENSITIVITY, MUSIC and SOUND variables Added STORE and STOREOVER commands, currently only supports storing coords using STORE("place",placename); STOREOVER overwrites an entry if it already exists Override key now toggles forced overrides Added GETID script command, assigns the ID of a block at the specified coordinates to the specified variable: GETID(10,72,10,#blockid) Added MATCH script command, assigns the result of a regex capture to the supplied variable to be used elsewhere: MATCH(subject,pattern,&varname,group) Varname and group are optional, if varname is omitted the function spits the match into the log buffer. Group allows a capturing subgroup to be specified in the regex (default captures the entire match (eg. group 0)   Switched onChat event to use ModLoader's new chat hook, this means locally-generated chat events will no longer trigger onChat    Added RESPAWN script command, which respawns the player if they are dead.    Small optimisations to the inner macro playback loop, also added some extra stats to the debug menu    Added optional argument to FOG script command, specify "far", "normal", "short" or "tiny" to set render distance

New features in version 0.8.5:

Automatic language selection for supported languages: english, french, german, polish Fixed some crashes caused by forge and a few other mods Added event support, only limited selection of events for now, this is mainly adding scaffholding for features planned for 0.9 New loop constructs: DO...WHILE and DO...UNTIL New script commands VOLUME and MUSIC New script action EXEC allows scripts to be spun off, very useful with events: EXEC("script.txt","task_name") New player variables: XPOS, ZPOS, ARMOUR, INVSLOT "Always override" function now checks for an open GUI screen (oops!) DISCONNECT function shouldn't crash game when using other mods Refactored script extensions API to be considerably simpler It's now possible to use variables inside DO declarations and SET statements, eg. DO(%#counter%) Added LOOK script action to set player's orientation with LOOKS (look smooth) variant for smooth interpolation Improved interpolation for FOV, GAMMA, LOOK and LOOKS so that transitions are smoother Added the ability to delete configurations Added global counters using prefix @# Thumbnail manager now has a scroll bar so that all thumbnails can be accessed even at low resolution Added RAIN, OXYGEN, ITEM, DURABILITY, SERVER variables Fixed macro edit box cursor positioning when using narrow (kerned) fonts Added button to access macro config in Controls... screen Added new conditional script actions: IFCONTAINS, IFBEGINSWITH, IFENDSWITH, IFMATCHES which can be used in place of the normal IF   Added "all" option for STOP script action. Specify "all" or "*" to stop all active macros.

New features in version 0.8.2:

Updated to support Minecraft 1.1 Items in the items selection list now rendered with shading rather than fullbright Fixed a bug with pipe characters inside scripts which cause IF statements with the OR operator "||" to not work properly, fixing this also means you can use | inside ECHO commands to output multiple lines of text with a single ECHO command Fixed a small bug when adding new entries to a preset text listbox which meant that the selected item wasn't always remembered Added the item-with-damage param $​$i:d to the in-game help

New features in version 0.8.1:

Fixed a bug with parsing script actions which contain parentheses!

New features in version 0.8:

New JInput subsystem to provide MOUSE3 and MOUSE4 (side buttons) support under Windows "Always override" option per-macro Improved the "Items" listbox, now icons instead of a long list Support for supplying damage values with $​$i use $​$i:d to insert an item/damagevalue pair New quick-access buttons for "Edit File" and "Settings" and also to access the "Bindings" screen from playback mode Configuration overlay support, merge configurations for even more advanced config setups. Use the new IMPORT and UNIMPORT script functions Improved macro text editor fields, full cursor movement and mouse support User Face images in the online user ($​$u) list Icon manager, take your own custom screenshots in-game for use in the homes, towns and warps lists Global flags in scripts. Prefix a flag name with @ to make it accessible to multiple macros. Counter variables in scripts. Prefix counter variables with # and use the new INC and DEC script commands to increment and decrement them Improved Text Editor GUI: Delete and rename text files in the text editor screen IIF conditional echo script command to make toggles and conditional echo commands much more compact ELSEIF conditional script construct GAMMA and SENSITIVITY script commands to alter brightness and mouse sensitivity respectively Ability to include variable values in ECHO and LOG commands, simply surround the variable name with %, for example $​${ECHO("Current health = %HEALTH%")}$​$ Added new global variables LIGHT, TEXTUREPACK, SEED, DIMENSION, YPOS Added macro invoke-time input variables, retains the state of all keyboard keys at the point the macro is invoked. For example ~CTRL for the state of the Ctrl key when invoking the macro Added popup display when switching configs to show the currently selected config and overlay

New features in version 0.7.2:

Fixed a bug with uppercase conditional statements Fixed a bug with having to press a macro twice if it included a parameter

New features in version 0.7:

Updated for Minecraft 1.0 Improved override support! Improved compatibility with zombes and other mods which ignore the old override method. Support for binding mouse buttons as well as keys Alternate display names for warps, homes and towns Conditionals in scripts: IF, ELSE, ENDIF as well as flag commands New script actions: TexturePack - Switch texture packs on-the-fly

Type - Pump keys into the keyboard buffer as if you typed them

Press - Pump a single (non-alphanumeric) key into the keyboard buffer: eg. PRESS(ESCAPE)

PlaceSign - Place a sign from your inventory and automatically set the text!

Invert SNEAK key function for macros: [activate] to bind, [sneak][activate] to play back On-screen debug display Additional options: compatible mode (disables new keybind engine) Fixed a bug which meant that attack and use key commands wouldn't work as expected Fixed a bug with named parameter values not saving correctly

New in version 0.6

Key-State Macros: Bind different commands to the key down, key held, and key up events Loops! Both infinite and finite loops now supported within scripts List and include files now stored in a separate directory /mods/macros/ - Note to previous users, you will need to move your old scripts!! New script actions: InventoryDown, InventoryUp, Pick, Slot, Sprint, Unsprint, Log, Stop see readme.txt for details Improved existing script actions, see the readme.txt Selectively terminate macros - bind to a key or access via GUI Lots more options! "Simple" GUI mode and a lot of others Per-config home/friend/town/preset lists - have your lists track your server Added $​$w parameter for warps - with auto-discovery support! Added $​$p "place" parameter, save your locations for use with /tppos and others Configurable "reserved keys", to provide better compatibility with other mods Configurable (via config file) options for Online User list - trim characters, include self User list ($​$u) now sorted alphabetically For avanced users, compiler directives to alter macro compilation Defaults to enabled in single player Improved singleplayer/multiplayer detection code Made the Colour Code Helper key configurable Fixed a bug with the disconnect script action causing OpenGL weirdness Fixed a bug with listboxes activating entries when scrolling with the mouse

New in version 0.5

Modified controls screen with pages to make binding keys easier Added $​$u parameter to select from online users Added named parameters $​$[name] Added basic scripting support (see the readme.txt for more details) Added multiple configurations functionality with per-server auto-switch Added global keys which are the same for all configurations Text editor now correctly renders more characters and invalid code points are highlighted Can now create new text files in the "edit file" window Added localisation file macros.lang to support different languages Added colour-code helper when editing macros (use the OVERRIDE key to activate) Key display glyphs now stored in the config file

New in version 0.4

On-screen keyboard when binding keys: quickly see which keys are bound as well as being able to move, copy, delete macros quickly and easily. Configure the macro activate and macro override keys in the normal Minecraft "Controls" GUI Set modifiers on your key binds, require CTRL, ALT and SHIFT or any combination to prevent accidental usage Extra parameters: $​$h for homes, $​$t for towns, $​$m for text file list, plus ten configurable parameter lists $​$0 through $​$9 Auto-discover functionality for friends, towns and homes (may require some settings tweaking for best results) Drag and drop to rearrange friends, towns and homes Edit text files within minecraft Recursive parsing of files and parameters, put parameters in your parameters! Increased macro edit length in the GUI (can now edit macros longer than the screen width) Prevent macros from remembering previous parameter values Much better 'override' function Complete re-vamp and improvement of settings file, format is now much clearer.

New in version 0.3

Added support for single player

New in version 0.2

Include files within macros Friends list Items list On-screen help $​$! terminate macro modifier

Copyright
The Macro / Keybind Mod is Copyright © 2011-2016 Mumfrey

You may include this mod in compilation packs or mod collections provided it is unmodified

You may redistribute the mod, provided it is umodified

If you redistribute the mod, I would appreciate it if you provide appropriate attribution where possible and include the above copright message, but this is not a requirement

You may decompile the mod for personal use but you may not redistribute modified or recompiled versions

Thanks
Thanks to the MCP team and everyone who's given suggestions and feedback. Special thanks to AJFire for making the original mod logo and providing the german translation. Thanks also to Chokapix for the french translation, kamild1996 for the Polish translation, Dyon123 for the dutch translation, agubelu for the spanish translation, eXtendZero for the Ukrainian translation, and Gorlem for updating the german translation for 1.4!

Enjoy! Please post feedback, comments, abuse here.