I requested that CA add an NCM GUI under this idea Spectrum NCM GUI. This would help reduce coding/scripting required by admins and allow more flexibility.
I created a very generic script, based off the NX-OS script, that will work with any device. The script has many variables such as prompt character, show command, port, term length command, and more. It has worked for ASAs, WLCs, proprietary appliances, proxy servers, Cisco IOS, Cisco NX-OS, H3C devices, and more. Using variables will help you produce a generic script and since you have experience modifying the current script, you should be able to add variables easily.
I am not able to share the script I developed, but it's fairly easy to do. You just need to add more input variables, $ARGV, along with the variable the input stores to. It's important to keep the order the same, otherwise you could be passing incorrect variables. I am not a perl programmer, but through various searches I was able to produce what was needed.