Check for sitting
/if "$char(state)"=="SIT"
if you aren't sitting, the book isn't open, if you are, just stand up
/stand or /sit off
and do your thing, then hit either
/sit or /book #
if you want to go back to sitting or having the book open.
This would be an always on macro. If I'm memming a spell, want to check if the spell book is open so I don't stand to forage and interrupt the spell mem. Things like that.
Ah for that, I'd add Events to check for "You start to memorize" and "You have finished memorizing" (or whatever the exact text is). If first event has triggered, but second has not, you are still memorizing, put everything else on hold.