Code: Select all
[h:newEntry = '[h:weapons = json.append(weapons, json.set("{}", "index", json.length(weapons), "name", "' + name + '", "subtype", "", "damage", ' + damage + ', "qualities", json.append("", "' + list + '")))]']
[h:output = concat(substring(command, 0, index - 1), newEntry, substring(command, index - 1, length(command)))]
[h:setMacroCommand(macroIndex, output)]
I would like the resulting macro to look decently readable with new lines in the right places. How can I add a newline character to the macro command? I experimented with \n, but couldn't quite get the result that I am going for.