If you’re using Notepad to copy/paste the script above…
-> in the Menu bar, click on File, then Save As… and the Save As dialog box will appear
-> near the bottom of the dialog box, click on the Save as type: dropdown box and change it from Text documents (*.txt) to All Files (.)
-> in the File name: box just above, enter myWoWscript.ahk or whatever you want to name it, but regardless, you should now be able to save the file with an .ahk extension.