Hi, all. I've been checking the documentation, and I think I might be out of luck, but I thought I'd throw the question out to any modders out there in case someone's managed it, or seen a mod that manages it.

Is there any way to script things to get a ref of an arbitrary item that the player selects from their inventory (or drops on the ground and select it from there)? I tried writing a script-effect spell that runs on touch, but they appear to only target actors, not items, even when combined with a telekinesis effect.

Secondly, is there any way to get the ref of a spell without hard-coding the spell's name? At all? Ideally, I'd love to get the player's current spell, but anything that allows a script to get a spell would do.

The only thing that I've seen that comes close is a spell selection mod that allows you to drill down through menus to select a spell, but at the bottom that's all hard-coded spell IDs for the standard spells in the game.

(If you're wondering why I'm asking - I'm trying to write a hotkey expander mod. In fact, my true ideal would be some way for a script to examine and set the hotkey slots, but I'm nearly 100% certain there's no way to do that.)

Thanks for any clues!