The problem seems to be that AHP/SmartMacro developers are confused about how XML works. You can see what is going on by looking at the MyHome.ahx file after editing. I see TWO problems. One is very clearly a bug in the Smart Macros editor, and the other is more of a fundamental confusion about XML.
1) When editing a macro and adding an EXECUTE command, the commands are stored in what is called a USER ELEMENT. These are assigned ID numbers. The first is assigned 101. The second is assigned 102. The two USER ELEMENTS are indeed created with those ID numbers. But if you look back at the reference to the user element where the EXECUTE command is stored, if there is more than one EXECUTE command, they are BOTH attributed to 102. Where what SHOULD be happening is the first EXECUTE should be attributed to 101, and the second one is attributed to 102.
2) While it appears the MyHome.ahx is intended to be XML-like, it is not. The rules seem to vary slightly. The data for each element is stored in a quoted string. But AHP seems to have no way of representing double quotes within the data. If this were TRUE XML, it would be using something called ENTITIES to represent certain kinds of characters that are themselves part of the XML syntax. An example is the double quote itself, which is used to delimit the text for data associated with an attribute. For example
< tag attr="this is the data" />
As you can see, if you have a double quote as part of the data, it confuses delimitation of the text data
< tag attr="this data " contains a double quote between data and contains" />
The industry answer is to use something called "entities". Entities are essentially a way to place a special character within textual data. For example " means double quote. From the earlier example, this would look like:
< tag attr="this data " contains a double quote between data and contains" />
The XML writer must be smart enough to translate these "escapes" when writing the file, and the reader must be smart enough to translate them back when reading.
If AHP were implemented upon Microsoft XML, then this would not be a problem. AHP decided INSTEAD to develop their own, but it is NOT implemented correctly, and obviously has problems representing anything a user can enter into the AHP program.
Another demonstration of the VERY SAME problem. Create a new room. Make the name be
This is my "test room"
Save, and exit AHP.
Start AHP again, and look at the room list. The room's name has changed to
This is my
This is pretty basic stuff when using XML, so this really needs to be fixed, and should be a simple thing to do. The XML parsers and writers need to consider ALL characters that should be escaped, not just double quotes. Or else the AHP application should prevent entry of text that would interfere with XML parsing. I have written XML parsers/writers myself, and it is not difficult. We just need to get someone's attention to fix it.
Once corrected THEN you will be able to use EXECUTE and add parameters in a quoted string after the path to the EXE file.
Once the user-element ID confusion is corrected, then you should be able to have multiple (yet different) EXECUTE commands in a single macro.
Let's hope AHP developers see this and will make the corrections for us in the next release, which I hope is soon. I have several uses for EXECUTE commands, and as is, without the ability to use several per macro, and without the ability to specify arguments, it is about as close to useless as it can be.