LMB := "left mouse button"
RMB := "right mouse button"
(And I also dont understand what exactly you mean.)
The game cant possibly know which spell you believe to be "appropriate".
Okay, I'll try to make this as simple as I possibly can. How do I make spells available for each mouse button??
In the GUI near the bottom of the screen there are buttons labeled with 'L' (for left mouse button) and 'R' (right mouse button). If you right-click on one of these you get a popup where you can select an action. Note that the potential actions for 'L' may be severly limited.
Also note that I am (unlike previous poster) not an expert at this game so I may be missing something.
Also note that using hotkeys may be better than mouse button - especially if you want to use more than one spell in combat.