Finally!
In Illustrator 2018 windows, when I assign a custom script to an action and then close Illustrator and re-open it the action retains the script. This was not true in previous versions.
This means you can now assign a script to an action and then assign a keyboard shortcut to the actions and it will still work when you re-boot Illustrator.