Script result to textbox

Item($dataWeapons[$gameVariables.value(10)], 1, false); Script call gets me a random weapon, (10)-is a random variable of all my weapons.
What I would like to do is pass this result into a textbox saying what i got. Some plugins will show it in its own box, but for a proper look it should be with a textbox.
Not sure if this is what you're asking, but you can store a weapon's name in a variable via Control Variables > Set > Script:
Code:
$dataWeapons[$gameVariables.value(10)].name
Show Text replaces \v[x] with the value of variable ID x, so you could do something like this:
Code:
◆Control Variables:#0001 v1 = Random 1..5
◆Control Variables:#0002 v2 = $dataWeapons[$gameVariables.value(1)].name
◆Script:$gameParty.gainItem($dataWeapons[$gameVariables.value(1)], 1);
◆Text:None, Window, Bottom
:    :You got a \v[2]!
Thank you, I can get it in the textbox now. Very useful for Random loot.

Original thread: https://forums.rpgmakerweb.com/threads/script-result-to-textbox.109882/