You mean i can build artificial intelligence? lol i do not think so

but i will try...
I do not know what i will need to use in next moment outside of standart rotation, i can not know what my raid leader will say, so i can not create fully automated script, i can create some number of functions and switch between them, but it requires an appropriate amount of hotkeys, but i also always hated profile management through predefined keys (left or right control, alt, shift, etc.) as is usual in most profiles. For this reason, in my PQR profile, i did rotation management by means of macros. I could not change the code to add or remove a spell from the rotation or activate \ deactivate more complex conditions ...
it was enough to simply click a macro that i could attach to any key at any time ... and if i will use SPQR then i will really miss it very much.
But I do not mean full compliance, for example, after PQR in T800 i could not use "/commands", but was able to recreate this system with read\write global variables. Perhaps interaction with addons to assign hotkeys or may be SPQR have own hotkey system... or perhaps there is another way ... you are more experienced programmer, what do you suggest?