The menus (layers, tools etc) are easy: just close them on the screen before beginning playback. Tool changes are recorded, but not the menus themselves.
Tracing and reference images:
If you add these before you start the script, and don't tick 'include current painting', then they won't be shown in the script playback.
To remove them after a script has been saved, then:
1. Ctrl + F for 'Reference' and 'tracing'
2. Remove the command line section and the giant block of image data after it.
Wait: 1.916s EvType: Command CommandID: LoadReferenceImage Idx: 0 Reference Image: {
╰▒▘┭╮◒╅╞┶►╽●▆╶◾▉▽◙◮┷◖▫◕▕◖▵◙╟▭╍▣╒╡●◚◧┟▿◙┞▬╿╩╊╢◤◷╳▏◝ ╬▍▟▽┡┚◯◕◖◵◵▿╚●▖╗╆◳◰╫┛◒◩┲┛◑◥◻◙┤╯╜◶▒┦┉◗▒◀╙┒┷▿▤┽┟◾╜◳◮ ┌╨╷▹┵╻▱╌◢╼┊┡▄┐╂┈┡▄┐╂╜▬◔▬╙┻┈◠╚┵◯▶▚┵◮▶╛▫◝╩◕▪◞╡╷╄╥△◧◎ ▱◓▖┑╱┢┓◲▧┢┬▀▶┹▓▞▊◒╔◝▓□┮◇▩►▩◔▏╉╓◗▝╍◪╼▊◴▲◤┾█◢◅┳ ╓▧◌▰◒
[continues for ages]
} // End of reference image binary data.
Script editing tips:
- the tool/menu name will always be in the script file, so you can just search for it.
- create a test script with JUST that action/tool/feature if you're not sure what you're looking for.