// ScriptUI实现输入提示 v1.0.0 2022-02-19
// Raymond Yan 2022 (RaymondClr@outlook.com / QQ: 1107677019)
var mainWindow = new Window("palette", "主界面");
var inputTips = "请输入内容";
var inputControl = mainWindow.add("edittext", [0, 0, 100, 25], inputTips);
inputControl.onActivate = function () {
if (this.textCache === inputTips) return;
if (this.text === inputTips) this.text = "";
};
inputControl.addEventListener("blur", function () {
this.textCache = this.text;
if (this.text === "") this.text = inputTips;
});
mainWindow.show();