Mechanical devices are just different interfaces. They all send generic HID data to your OS.
Razer Mice have drivers that can optionally enable post-hardware modification of that data. That is pretty identical to your script, and my feelings about it are similar.
I do feel that if you are clever enough to setup macros, you deserve to be able to use them, but I do think it's cheating. I'm conflicted about this point.
Personally I use a Razer High DPI mouse, but I turn the sensitivity down. Normally it translates every little move I make into giant sweeping arcs. I play with the settings on it a lot, but I don't feel it affords me much advantage over my other computer (old microsoft optical mouse, sensitivity maxed).
Different people like different interfaces and will have different hardware. The issue of cheating can't afford to be that pedantic. I think the bottom line is that it is really not difficult to discern when you are 'cheating'. In my mind cheating requires some kind of feedback. Aimbots generally search frame-data for a target. They pull data directly from the game to make decisions.
As others have said before me, as long as you have the human making decisions, the hardware is less important (within reason). The lines get blurred with things like key-macros (starcraft, etc). Bottom line: If you are doing something that people with common knowledge of computers and the game probably couldn't do, it might be time to think about stopping.