I have used the Logitech g15 for many years and you won't be able to bind a macro like that.
You can make a macro in a game and bind the macro to the keyboard, but it won't work with mouse movements. You can also bind keystrokes and map those.
Also Wow is very lax about addons, plugin, macros ect. I don't think AHK would be a problem, but you should check the EUA.