Henry Puppet
New member
As a beginner, I've struggled a bit to understand dictionaries and arrays so I decided to write myself a macro that creates one of each from scratch and explain what I'm doing step by step.
The result is a dictionary of Toybox commands along with usage information retrieved via the help command for each command.
I thought perhaps this might be useful for others wanting to learn how to create and use an array or dictionary or maybe just curious about Toybox commands. The macro does the following:
Gets a list of available Toybox commands on your device
Creates an array of the commands
Creates a dictionary of commands where the name of the command is a key and the value is the usage information returned by 'command --help'.
If you're interested in how to create and use a dictionary or an array, there are no doubt more advanced examples around. This macro was designed to be simple and (I hope) clear for beginners like myself.
The macro does not execute any Toybox commands other than requests for help plus the general 'toybox' command to get a list of commands.
BE CAREFUL USING TOYBOX COMMANDS AS THEY CAN AFFECT SYSTEM SETTINGS AND POSSIBLY BRICK YOUR DEVICE.
I hope you find the macro useful and I welcome any suggestion for improvement.
Link to macro in the MacroDroid store
The result is a dictionary of Toybox commands along with usage information retrieved via the help command for each command.
I thought perhaps this might be useful for others wanting to learn how to create and use an array or dictionary or maybe just curious about Toybox commands. The macro does the following:



If you're interested in how to create and use a dictionary or an array, there are no doubt more advanced examples around. This macro was designed to be simple and (I hope) clear for beginners like myself.
The macro does not execute any Toybox commands other than requests for help plus the general 'toybox' command to get a list of commands.
BE CAREFUL USING TOYBOX COMMANDS AS THEY CAN AFFECT SYSTEM SETTINGS AND POSSIBLY BRICK YOUR DEVICE.
I hope you find the macro useful and I welcome any suggestion for improvement.

Link to macro in the MacroDroid store