{"id":24,"date":"2007-12-28T22:50:13","date_gmt":"2007-12-28T22:50:13","guid":{"rendered":""},"modified":"2007-12-28T22:50:13","modified_gmt":"2007-12-28T22:50:13","slug":"24","status":"publish","type":"post","link":"https:\/\/www.poloo.org\/?p=24","title":{"rendered":"\u4e00\u4e2a\u6807\u51c6\u7684HTML\u5e94\u7528\u7a0b\u5e8fHTA\u5b9e\u4f8b"},"content":{"rendered":"<p>\u4e0b\u9762\u7684\u4e00\u4e2a\u6807\u51c6\u7684HTML\u5e94\u7528\u7a0b\u5e8f\uff1a <\/p>\n<div class=\"UBBPanel\">\n<div class=\"UBBTitle\"><img decoding=\"async\" src=\"images\/html.gif\" style=\"margin:0px 2px -3px 0px\"> HTML\u4ee3\u7801<\/div>\n<div class=\"UBBContent\"><TEXTAREA rows=\"8\" id=\"temp50016\"><br \/>\n<HTML><br \/>\n<HEAD><br \/>\n<TITLE>HTA Demo<\/TITLE><br \/>\n<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=gb2312\" \/><br \/>\n<HTA:APPLICATION ID=\"oHTA\" \nAPPLICATIONNAME=\"LOCK\" \nBORDER=\"thin\" \nBORDERSTYLE=\"normal\" \nCAPTION=\"yes\" \nICON=\"MSN.ICO\" \nMAXIMIZEBUTTON=\"no\" \nMINIMIZEBUTTON=\"no\" \nSHOWINTASKBAR=\"yes\" \nINGLEINSTANCE=\"yes\" \nSYSMENU=\"yes\" \nVERSION=\"1.0\" \nWINDOWSTATE=\"normal\"><br \/>\n<\/HEAD><br \/>\n<BODY SCROLL=\"no\"><br \/>\n<H1>HELLO, WORLD!<\/H1><br \/>\n<\/BODY><br \/>\n<\/HTML><br \/>\n<\/TEXTAREA><br \/><INPUT onclick=\"runEx('temp50016')\"  type=\"button\" class=\"userbutton\" value=\"\u8fd0\u884c\u6b64\u4ee3\u7801\"\/> <INPUT onclick=\"doCopy('temp50016')\"  type=\"button\" class=\"userbutton\" value=\"\u590d\u5236\u6b64\u4ee3\u7801\"\/> <INPUT onclick=\"saveCode('temp50016')\" type=\"button\" class=\"userbutton\" value=\"\u4fdd\u5b58\u6b64\u4ee3\u7801\"><br \/> [Ctrl+A \u5168\u90e8\u9009\u62e9 \u63d0\u793a\uff1a\u4f60\u53ef\u5148\u4fee\u6539\u90e8\u5206\u4ee3\u7801\uff0c\u518d\u6309\u8fd0\u884c]<\/div>\n<\/div>\n<p>\u5b83\u591a\u4e86HTA:APPLICATION\u6807\u7b7e\u3002\u5176\u5b9e\u5c31\u662f\u8fd9\u4e2a\u6807\u7b7e\u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217\u9762\u5411\u5e94\u7528\u7a0b\u5e8f\u7684\u529f\u80fd\u3002 <\/p>\n<p>\u5b83\u7684\u5404\u79cd\u5c5e\u6027\uff1a <\/p>\n<p>APPLICATIONNAME\u5c5e\u6027(applicationName) <br \/>\u6b64\u5c5e\u6027\u4e3a\u8bbe\u7f6eHTA\u7684\u540d\u79f0\u3002 <\/p>\n<p>BORDER\u5c5e\u6027(border) <br \/>\u6b64\u5c5e\u6027\u4e3a\u8bbe\u7f6e\u4e3aHTA\u7684\u7a97\u53e3\u8fb9\u6846\u7c7b\u578b\uff0c\u9ed8\u8ba4\u503c\u4e3a thick\u3002 <br \/>\u5b83\u53ef\u4ee5\u8bbe\u4e3a thick \u6307\u5b9a\u7a97\u53e3\u4e3a\u7c97\u8fb9\u6846 <br \/>dialog window \u6307\u5b9a\u7a97\u53e3\u4e3a\u5bf9\u8bdd\u6846 <br \/>none \u6307\u5b9a\u7a97\u53e3\u65e0\u8fb9\u6846 <br \/>thin \u6307\u5b9a\u7a97\u53e3\u4e3a\u7a84\u8fb9\u6846 <\/p>\n<p>BORDERSTYLE\u5c5e\u6027(borderStyle) <br \/>\u6b64\u5c5e\u6027\u4e3a\u8bbe\u7f6eHTA\u7a97\u53e3\u7684\u8fb9\u6846\u683c\u5f0f\uff0c\u9ed8\u8ba4\u503c\u4e3a normal\u3002 <br \/>\u5b83\u53ef\u4ee5\u8bbe\u4e3a <br \/>normal \u666e\u901a\u8fb9\u6846\u683c\u5f0f <br \/>complex \u51f9\u51f8\u683c\u5f0f\u7ec4\u5408\u8fb9\u6846 <br \/>raised \u51f8\u51fa\u76843D\u8fb9\u6846 <br \/>static 3D\u8fb9\u6846\u683c\u5f0f <br \/>sunken \u51f9\u8fdb\u76843D\u8fb9\u6846 <\/p>\n<p>CAPTION\u5c5e\u6027(caption) <br \/>\u6b64\u5c5e\u6027\u4e3a\u8bbe\u7f6eHTA\u7a97\u53e3\u662f\u5426\u663e\u793a\u6807\u9898\u680f\u6216\u6807\u9898\uff0c\u9ed8\u8ba4\u503c\u4e3a yes\u3002 <\/p>\n<p>ICON\u5c5e\u6027(icon) <br \/>\u6b64\u5c5e\u6027\u4e3a\u8bbe\u7f6e\u5e94\u7528\u7a0b\u5e8f\u7684\u56fe\u6807\u3002 <\/p>\n<p>MAXIMIZEBUTTON\u5c5e\u6027(maximizeButton) <br \/>\u6b64\u5c5e\u6027\u4e3a\u8bbe\u7f6e\u662f\u5426\u5728HTA\u7a97\u53e3\u4e2d\u663e\u793a\u6700\u5927\u5316\u6309\u94ae\uff0c\u9ed8\u8ba4\u503c\u4e3a yes\u3002 <\/p>\n<p>MINIMIZEBUTTON\u5c5e\u6027(minimizeButton) <br \/>\u6b64\u5c5e\u6027\u4e3a\u8bbe\u7f6e\u662f\u5426\u5728HTA\u7a97\u53e3\u4e2d\u663e\u793a\u6700\u5c0f\u5316\u6309\u94ae\uff0c\u9ed8\u8ba4\u503c\u4e3a yes\u3002 <\/p>\n<p>SHOWINTASKBAR\u5c5e\u6027(showInTaskBar) <br \/>\u6b64\u5c5e\u6027\u4e3a\u8bbe\u7f6e\u662f\u5426\u5728\u4efb\u52a1\u680f\u4e2d\u663e\u793a\u6b64\u5e94\u7528\u7a0b\u5e8f\uff0c\u9ed8\u8ba4\u503c\u4e3a yes\u3002 <\/p>\n<p>SINGLEINSTANCE\u5c5e\u6027(singleInstance) <br \/>\u6b64\u5c5e\u6027\u4e3a\u8bbe\u7f6e\u662f\u5426\u6b64\u5e94\u7528\u7a0b\u5e8f\u540c\u65f6\u53ea\u80fd\u8fd0\u884c\u4e00\u6b21\u3002\u6b21\u5c5e\u6027\u4ee5APPLICATIONNAME\u5c5e\u6027\u4f5c\u4e3a\u6807\u8bc6\uff0c\u9ed8\u8ba4\u503c\u4e3a no\u3002 <\/p>\n<p>SYSMENU\u5c5e\u6027(sysMenu) <br \/>\u6b64\u5c5e\u6027\u4e3a\u8bbe\u7f6e\u662f\u5426\u5728HTA\u7a97\u53e3\u4e2d\u663e\u793a\u7cfb\u7edf\u83dc\u5355\uff0c\u9ed8\u8ba4\u503c\u4e3a yes\u3002 <\/p>\n<p>VERSION\u5c5e\u6027(version) <br \/>\u6b64\u5c5e\u6027\u4e3a\u8bbe\u7f6e\u5e94\u7528\u7a0b\u5e8f\u7684\u7248\u672c\uff0c\u9ed8\u8ba4\u503c\u4e3a\u7a7a\u3002 <\/p>\n<p>WINDOWSTATE\u5c5e\u6027(windowState) <br \/>\u6b64\u5c5e\u6027\u4e3a\u8bbe\u7f6eHTA\u7a97\u53e3\u7684\u521d\u59cb\u5927\u5c0f\uff0c\u9ed8\u8ba4\u503c\u4e3a normal\u3002 <br \/>\u5b83\u53ef\u4ee5\u8bbe\u4e3a normal \u9ed8\u8ba4\u5927\u5c0f <br \/>minmize \u6700\u5c0f\u5316 <br \/>maximize \u6700\u5927\u5316&nbsp;&nbsp;<\/p>\n<p>\u4ee5\u4e0a\u62ec\u53f7\u4e2d\u7684\u662f\u5728\u811a\u672c\u5f15\u7528\u7684\u5c5e\u6027\u3002\u5728\u811a\u672c\u4e2d\u4ee5\u4e0a\u5c5e\u6027\u7686\u4e3a\u53ea\u8bfb\u5c5e\u6027\u3002\u6b64\u5916\uff0c\u5728\u811a\u672c\u4e2d\u8fd8\u53ef\u4ee5\u4f7f\u7528commandLine\u5c5e\u6027\u6765\u68c0\u7d22\u5e94\u7528\u7a0b\u5e8f\u542f\u52a8\u65f6\u7684\u53c2\u6570\u3002 <br \/>\u5728HTA\u4e2d\u8fd8\u53ef\u4ee5\u4f7f\u7528html\u4e2d\u7684\u7edd\u5927\u591a\u6570\u6807\u7b7e\u3001\u811a\u672c\u7b49\u3002 <\/p>\n<p>\u5c06\u7528\u4e86fso\u7684\u9875\u9762\u4f5c\u6210hta\uff0c\u53cc\u51fb\u8fd0\u884c\u65f6\u5c31\u6ca1\u6709\u5b89\u5168\u8b66\u544a\u7684 <br \/><code><br \/>var Controller = WScript.CreateObject(\"WSHController\"); <br \/>var RemoteScript = Controller.CreateScript(\"test.js\", \"remoteserver\"); <br \/>WScript.ConnectObject(RemoteScript, \"remote_\"); <br \/>RemoteScript.Execute(); <\/p>\n<p>while (RemoteScript.Status != 2) { <br \/>WScript.Sleep(100); <br \/>} <\/p>\n<p>WScript.DisconnectObject(RemoteScript); <\/p>\n<p>function remote_Error() <br \/>{ <br \/>var theError = RemoteScript.Error; <br \/>WScript.Echo(\"Error \" + theError.Number + \" - Line: \" + theError.Line + \", Char: \" + theError.Character + \"<br \/>\nDescription: \" + theError.Description); <br \/>WScript.Quit(-1); <br \/>}<br \/><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0b\u9762\u7684\u4e00\u4e2a\u6807\u51c6\u7684HTML\u5e94\u7528\u7a0b\u5e8f\uff1a HTML\u4ee3\u7801 HTA Demo &#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-24","post","type-post","status-publish","format-standard","hentry","category-Dream"],"_links":{"self":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=24"}],"version-history":[{"count":0,"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/24\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}