无忧启动论坛

标题: 最简易的DIY菜单 [打印本页]

作者: buypro    时间: 2013-9-24 09:18
标题: 最简易的DIY菜单
本帖最后由 buypro 于 2013-9-26 09:17 编辑

适合ramos和PE,可无限扩展多层。命名为HTArunscriptsmenugggg.hta,然后放到目录"%systemdrive%\imenu\中,以后只需要COPY这个目录到任何需要移植的window系统的"%systemdrive%\imenu\目录中就可以了



<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0"><meta name="ProgId" content="FrontPage.Editor.Document">
<title>工具栏</title><style><!--body, table, p, td, div,select { font:menu}.button {boder:0; HEIGHT: 20px;width:60px;cursor:hand;font:menu}--></style>
</head><body>

<script language=JavaScript>
var clientHeighti=0;
function resizeClient(h){  
width=280;height=530;clientHeighti=clientHeighti+h;
window.resizeBy( width - document.body.clientWidth,height - document.body.clientHeight+clientHeighti );}
//调用方法:resizeClient(25)

window.onload =resizeClient;

</script>



<SCRIPT language=JavaScript>

function Run(strPath) {

exe.value=strPath;try {var objShell = new ActiveXObject("wscript.shell");objShell.Run(strPath);
objShell = null;}catch (e){alert('找不到文件"'+strPath+'"(或它的组件之一)。请确定路径和文件名是否正确,而且所需的库文件均可用。')}

self.close();
}


</SCRIPT>

<p>请保存为HTA文件,再运行<br>请输入要运行的程序:<br><input name=exe type=text size=20 value="regedit"><BUTTON class=button onclick="Run(exe.value)">确定</BUTTON>


<BUTTON class=button onclick=exe.value="";>重新输入</BUTTON><br><BUTTON class=button onclick="Run('notepad')">记事本</BUTTON><br>
<BUTTON class=button onclick="Run('mspaint')">画图板</BUTTON><br><BUTTON class=button onclick="Run('calc')">计算器</BUTTON><br>
<BUTTON class=button onclick="Run('cmd')">cmd</BUTTON><br><BUTTON class=button onclick="Run('Regedit')">Regedit</BUTTON><br>
<BUTTON class=button onclick="Run('Msconfig')">Msconfig</BUTTON><br>
<BUTTON class=button onclick="Run('file:///D:/Program%20Files/Winamp/WINAMP.EXE')">WINAMP</BUTTON>
<br><BUTTON class=button onclick="Run('IEXPLORE.EXE')">IE</BUTTON><br>
<BUTTON class=button onclick="Run('..')">..</BUTTON><br><BUTTON class=button onclick="Run('%windir%')">%windir%</BUTTON><br>
<BUTTON class=button onclick="Run('%temp%')">%temp%</BUTTON><br>
<br><br><br>
<br><BUTTON class=button onclick="Run('http://bbs.wuyou.net/forum.php?mod=forumdisplay&fid=34')">wuyou</BUTTON><br>


</p>
</body>
作者: buypro    时间: 2013-9-24 09:19
可能是你所能找到的最简单的最易用的菜单了。


请保存为HTA格式文件
作者: 。林先生    时间: 2013-9-24 09:27
找攻击传奇的师傅 真心想学,以前被骗过两次!
作者: buypro    时间: 2013-9-26 09:12
本帖最后由 buypro 于 2013-9-26 09:13 编辑
  1. 为简易菜单建立键盘热键和快捷键 shortcut hotkey  vbs 版
复制代码
Set oWS = WScript.CreateObject("WScript.Shell")
userProfilePath = oWS.ExpandEnvironmentStrings("%UserProfile%")
USERNAME = oWS.ExpandEnvironmentStrings("%USERNAME%")
sLinkFile = userProfilePath+"\Desktop\"+USERNAME+"\HTArunscriptsmenugggg9xx.LNK"
Set oLink = oWS.CreateShortcut(sLinkFile)
   
oLink.TargetPath = "%systemdrive%\imenu\HTArunscriptsmenugggg.hta"
   '        oLink.Arguments = ""
            oLink.Description = "MyProgram"
            oLink.HotKey = "F1"
   ' oLink.HotKey = "ALT+CTRL+F"
        oLink.IconLocation = "%SystemRoot%\system32\SHELL32.dll, -322"
   '        oLink.WindowStyle = "1"
   '        oLink.WorkingDirectory = "C:\Program Files\MyApp"
   oLink.Save  




欢迎光临 无忧启动论坛 (http://bbs.c3.wuyou.net/) Powered by Discuz! X3.3