Quickly assign material / object from a library

Hello, I'm looking for a script where, when I activate it, a pop-up box appears near my mouse, similar to the global search one that is built into max, I enter a number, for example 13, click enter, and it assigns to the objects or faces selected the 13th material from a premade vray material library file.

Also, could it be possible to have a similar script but for geometry too? You select a couple of objects, enter a number or name, and it replaces the objects with an fbx or 3ds file you have stored somewhere with the same name as what you wrote.

Something like that would increase my speed when modeling immensely and I would be extremely grateful if anyone could help me.