so i was just poking around with the GetSpellLink() stuff...
it looks like you can pass it a 2nd argument. as long as that 2nd argument isn't false, then the first argument seems to be the index from your spellbook starting with the first spell on the first tab and proceeding thru pages and tabs without any gaps for non-assigned spell slots.
i wonder how these spellid's would work with tradeskills. like you can /cast tailoring to open the tailor window. if you could get spellid's for tailoring or smelting, then you could have id's for tradeskill names.
i'd also be neat if you could use the getspellinfo mechanism to determine which tradeskill a recipe belongs to.