this post is aimed at people who are happy enough writing their own scripts.
this little snippet allows you to present the user with a text input box, save this text and use it in your scripts.

javascript doesn't have a text input box but vbscript does so i found this code online to do the work. it has to be saved in an external file and we can call it using WshShell.Run.
first of you need my modified version of the script from that link. save this as "input.wsf" in your "scripts" directory...
<?xml version="1.0" encoding="ISO-8859-1"?>
<job id="IncludeExample">
<script language="VBScript">
<![CDATA[
Function WSHInputBox(Message, Title, Value)
WSHInputBox = InputBox(Message, Title, Value)
End Function
]]>
</script>
<script language="JScript">
<![CDATA[
args = WScript.Arguments;
var WshShell = WScript.CreateObject("WScript.Shell");
var fso = new ActiveXObject("Scripting.FileSystemObject");
try {
ts = fso.OpenTextFile(args(2), 1, false, -1);
s = ts.ReadLine();
ts.close();
} catch(e) {
s = ''
}
var result = WSHInputBox(args(1), args(0), s);
if (result != null) {
try {
ts = fso.OpenTextFile(args(2), 2, true, -1);
ts.WriteLine(result);
ts.close();
} catch(e) {
Wscript.Echo("Error saving data!");
}
}
]]>
</script>
</job>
this is the script to go in your panel. i'm pretty crap at explaining things so i hope the comments make some sort of sense. it's pretty simple really....
var DT_CENTER = 0x00000001;
var DT_VCENTER = 0x00000004;
var DT_WORDBREAK = 0x00000010;
var DT_CALCRECT = 0x00000400;
var DT_NOPREFIX = 0x00000800;
function RGB(r,g,b) {
return (0xff000000|(r<<16)|(g<<8)|(b));
}
function text_input_box(title, message, filename) {
WshShell.Run("\"" + wsf + "\" \"" + title + "\" \"" + message + "\" \"" + filename + "\"", 0, true);
return read(filename);
}
function read(fn) {
try {
var f = fso.OpenTextFile(fn, 1, false, -1);
var s = f.Readline();
f.Close()
return s;
} catch(e) {
return '';
}
}
///////this is the bit you'll want to customise for your own usage//////
var WshShell = new ActiveXObject("WScript.Shell");
var fso = new ActiveXObject("Scripting.FileSystemObject");
var wsf = fb.FoobarPath + "scripts\\input.wsf";
//need to be somewhere with "write" access
var settings_path = fb.ProfilePath + "text_input_settings\\";
if(!fso.FolderExists(settings_path)) fso.CreateFolder(settings_path);
//each variable you want to use needs an associated file.
//the input box saves input to this file and then WSH panel mod can read it.
g_text_file = settings_path + "g_text";
//check to see if a value already exists and use it
g_text = read(g_text_file);
//now we a need a function to trigger our input
function on_mouse_lbtn_up(x, y) {
//the text_input box will read the file and present the current value as the default text.
//when you click ok, the external script will then save the result to the text file
//wsh panel mod can then read this updated file and return the new value
//in this simple example, it will just be updating the display using window.Repaint().
g_text = text_input_box("Message Title", "Enter some text:", g_text_file);
window.Repaint();
}
function on_size() {
ww = window.Width;
wh = window.Height;
}
function on_paint(gr) {
gr.FillSolidRect(0, 0, ww, wh, RGB(255,255,255));
gr.GdiDrawText(g_text, gdi.Font("Segoe UI", 16), RGB(0,0,0), 0, 0, ww, wh, DT_VCENTER | DT_CENTER | DT_WORDBREAK | DT_CALCRECT | DT_NOPREFIX);
}