Simple Macro Maker - v0.3

Simple Macro Maker - v0.3

I have done a fair bit of tweaking of the Simple Macro Maker lately. As the title suggests I have uploaded v0.3 to the SMM section. I also moved the memory reading example from the SMM section (which has nothing to do with memory reading) to the resource mapping section (which has a lot to do with it).

Here's a list of some of the changes:

  • Pixels have been added. They are read by assigning a location as the value for a variable with set_variable. The variable will then contain a pound sign (#) followed by 8 digits (a.k.a. the color).
  • A while tag has been added, it acts like a normal while loop. The format is explained below.
  • An end tag has been added, the macro will end if it executes such a tag.
  • The UI will now resize properly.
  • The random attribute is now optional for the wait tag (default is 0).
  • An ini file has been added to keep track of the last opened macros, window dimensions and options.
  • Varius bug fixes and improved error handling/messages.

Things that only affect the source code:

  • The keyboard module that controls all the keyboard simulations has been replaced with a better one (which I partly made for the Resource Radar). It no longer depends on hooking the keyboard but rather it just goes through the API.
  • Vartype as a set property for variables has been removed, the vartype is now calculated based on the current value of the variable.
  • The XML tree searching has been cleaned up in the source.

The formats for the new tags:

<while condition="">      A while block with a boolean expression condition.

<break>                   Breaks the current for or while loop.

<end>                     Ends the macro. The macro automatically ends when it
                          runs out of lines so no need to place it in the end.

Note that the break tag is not in yet, it is on the to do list for the next versions.

A news entry about SMM wouldn't be complete without an example so here is one *smiles*. It shows how while loops, pixel recording and the end tag can be used. PixelToWatch is a location, InitialPixelColor and PixelColor are variables.

<set_variable>
    <set_variable-name>InitialPixelColor</set_variable-name>
    <set_variable-value>PixelToWatch</set_variable-value>
</set_variable>
<while condition="True">
    <set_variable>
        <set_variable-name>PixelColor</set_variable-name>
        <set_variable-value>PixelToWatch</set_variable-value>
    </set_variable>
    <choose>
        <choose-if condition="$PixelColor!=$InitialPixelColor">
            <end/>
        </choose-if>
    </choose>
    <wait base="500"/>
</while>

It will watch a pixel and end the macro (or do anything else that one wants) when that pixel changes color.