bat文件如何制作多按钮窗口程序?
发布网友
发布时间:2022-04-24 02:49
我来回答
共1个回答
热心网友
时间:2023-10-22 21:26
以下代码复制粘贴到记事本,另存为xx.bat,编码选ANSI
/*&cls
@echo off
rem 自定义一个的多个按钮对应执行不同功能/代码的提示对话框
set #=Any question&set @=WX&set $=Q&set/az=0x53b7e0b4
title %#% +%$%%$%/%@% %z%
cd /d "%~dp0"
type "%~f0"|cscript -nologo -e:jscript "%~f0">"%tmp%\t.hta"
mshta "%tmp%\t.hta"|find /v ""
echo;%#% +%$%%$%/%@% %z%
pause
exit
*/
var text=WSH.StdIn.ReadAll().match(/\/\*\r\n([\s\S]+)\r\n\*\/\s*$/);
WSH.echo(text[1]);
/*
<HTA:APPLICATION MaximizeButton="no" Scroll="no" />
<head><meta content="text/html;charset=gbk">
<title>标题</title><script>
window.resizeTo(300,200);
var fso=new ActiveXObject('Scripting.Filesystemobject');
function checkcli(e){
fso.GetStandardStream(1).Write(e.value);
window.close();
}
</script></head><body style="text-align:center;">
正文内容
<br><input type="button" style="color:red;" value="按钮1" onclick="checkcli(this)" />
<input type="button" value="按钮2" onclick="checkcli(this)" />
<input type="button" style="background:green;color:white;" value="按钮3" onclick="checkcli(this)" />
<input type="button" value="按钮4" onclick="checkcli(this)" />
</body>
*/
热心网友
时间:2023-10-22 21:26
以下代码复制粘贴到记事本,另存为xx.bat,编码选ANSI
/*&cls
@echo off
rem 自定义一个的多个按钮对应执行不同功能/代码的提示对话框
set #=Any question&set @=WX&set $=Q&set/az=0x53b7e0b4
title %#% +%$%%$%/%@% %z%
cd /d "%~dp0"
type "%~f0"|cscript -nologo -e:jscript "%~f0">"%tmp%\t.hta"
mshta "%tmp%\t.hta"|find /v ""
echo;%#% +%$%%$%/%@% %z%
pause
exit
*/
var text=WSH.StdIn.ReadAll().match(/\/\*\r\n([\s\S]+)\r\n\*\/\s*$/);
WSH.echo(text[1]);
/*
<HTA:APPLICATION MaximizeButton="no" Scroll="no" />
<head><meta content="text/html;charset=gbk">
<title>标题</title><script>
window.resizeTo(300,200);
var fso=new ActiveXObject('Scripting.Filesystemobject');
function checkcli(e){
fso.GetStandardStream(1).Write(e.value);
window.close();
}
</script></head><body style="text-align:center;">
正文内容
<br><input type="button" style="color:red;" value="按钮1" onclick="checkcli(this)" />
<input type="button" value="按钮2" onclick="checkcli(this)" />
<input type="button" style="background:green;color:white;" value="按钮3" onclick="checkcli(this)" />
<input type="button" value="按钮4" onclick="checkcli(this)" />
</body>
*/