command rename: #2 trigger: loop all files in directory "/Gods": set {_newName} to file name of loop-value set {_newName} to convert text {_newName} to lowercase replace all "_" with "." in {_newName} rename loop-value to {_newName} command sounds: #3 trigger: set {_name::*} to all the files from directory "Gods/" loop {_name::*}: set {_t::*} to "%loop-value%" set {_t::1} to name of file "%{_t::*}%" wait 1 real second send {_t::*} in lower case replace every "_" in {_t::*} with "." set line {Line1} of file "sounds/sounds.json" to " ""custom.%{_t::*}%"": {" in lower case set line {Line2} of file "sounds/sounds.json" to " ""sounds"": [" set line {Line3} of file "sounds/sounds.json" to " ""custom/%{_t::*}%""" in lower case set line {Line4} of file "sounds/sounds.json" to " ]" set line {Line5} of file "sounds/sounds.json" to " }," add 5 to {Line1}, {Line2}, {Line3}, {Line4} and {Line5} on script load: #1 set {Line1} to 492 set {Line2} to 493 set {Line3} to 494 set {Line4} to 495 set {Line5} to 496 #command sounds: # trigger: # file "sounds/" doesn't exist: # create file "sounds" # else: # stop