Yes. After recoding a macro rename the usermacro.lua to whatever.lua (keep the file extension). You can move the file to different location if you like.
It would be great if Dorico remembered last used folder to open a script. Haven’t tried it lately, but it used to default to program files everytime.