{"id":1216,"date":"2024-07-29T08:00:00","date_gmt":"2024-07-29T00:00:00","guid":{"rendered":"http:\/\/www.wyrcad.com\/?p=1216"},"modified":"2024-07-29T08:50:56","modified_gmt":"2024-07-29T00:50:56","slug":"vbscript-%e7%ae%80%e4%bb%8b","status":"publish","type":"post","link":"https:\/\/www.wyrcad.com\/?p=1216","title":{"rendered":"VBScript \u7b80\u4ecb"},"content":{"rendered":"\n<p>VBS \u662f\u4e00\u79cd Windows \u811a\u672c\uff0c\u5b83\u7684\u5168\u79f0\u662f Microsoft Visual Basic Script Editon( \u5fae\u8f6f\u516c\u53f8\u53ef\u89c6\u5316 BASIC \u811a\u672c\u7248 ) \uff0c VBS \u662f Visual Basic \u7684\u7684\u4e00\u4e2a\u62bd\u8c61\u5b50\u96c6\uff0c\u662f\u7cfb\u7edf\u5185\u7f6e\u7684\uff0c\u7528\u5b83\u7f16\u5199\u7684\u811a\u672c\u4ee3\u7801\u4e0d\u80fd\u7f16\u8bd1\u6210\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u76f4\u63a5\u7531 Windows \u7cfb\u7edf\u6267\u884c\uff0c\u4e5f\u5c31\u662f\u4e00\u4e2a\u53eb\u505a\u5bbf\u4e3b host \u7684\u89e3\u91ca\u6e90\u4ee3\u7801\u5e76\u6267\u884c\uff0c\u9ad8\u6548\u3001\u6613\u5b66\uff0c\u4e14\u5927\u90e8\u5206\u9ad8\u7ea7\u8bed\u8a00\u80fd\u5e72\u7684\u4e8b\u60c5\uff0c\u5b83\u57fa\u672c\u4e0a\u90fd\u5177\u5907\uff0c\u5b83\u53ef\u4ee5\u4f7f\u5404\u79cd\u5404\u6837\u7684\u4efb\u52a1\u81ea\u52a8\u5316\uff0c\u53ef\u4ee5\u4f7f\u4f60\u4ece\u91cd\u590d\u7410\u788e\u7684\u5de5\u4f5c\u4e2d\u89e3\u8131\u51fa\u6765\uff0c\u6781\u5927\u7684\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u3002<\/p>\n\n\n\n<p>VBS \u811a\u672c\u53ef\u4ee5\u7406\u89e3\u4e3a\u5176\u5b9e\u5c31\u662f\u4e00\u79cd\u8ba1\u7b97\u673a\u7f16\u7a0b\u8bed\u8a00\uff0c\u4f46\u662f\u7531\u4e8e\u7f3a\u5c11\u8ba1\u7b97\u673a\u7a0b\u5e8f\u8bbe\u8ba1\u8bed\u8a00\u4e2d\u7684\u90e8\u5206\u8981\u7d20\uff0c\u5bf9\u4e8e\u4e8b\u4ef6\u7684\u63cf\u8ff0\u80fd\u529b\u8f83\u5f31\uff0c\u6240\u4ee5\u79f0\u4e3a\u811a\u672c\uff0c\u5b83\u6700\u65b9\u4fbf\u7684\u5730\u65b9\u5c31\u662f\u63d0\u4f9b\u4e86\u5bf9 COM \u5bf9\u8c61\u7684\u7b80\u4fbf\u652f\u6301\u3002\u90a3\u4e48\u4ec0\u4e48\u662f COM \u5bf9\u8c61\u5462\uff1f<\/p>\n\n\n\n<p>COM \u5bf9\u8c61\u5c31\u662f\u4e00\u4e9b\u5177\u6709\u7279\u5b9a\u51fd\u6570\u529f\u80fd\u9879\u7a0b\u5e8f\u6a21\u5757\uff0c\u4ed6\u4eec\u4e00\u822c\u4ee5 ocx \u6216\u8005 dll \u4f5c\u4e3a\u6269\u5c55\u540d\uff0c\u53ea\u8981\u627e\u5230\u5305\u542b\u6709\u6240\u9700\u529f\u80fd\u7684\u6a21\u5757\u6587\u4ef6\uff0c\u5e76\u5728\u811a\u672c\u4e2d\u89c4\u8303\u7684\u5f15\u7528\uff0c\u5c31\u53ef\u4ee5\u5b9e\u73b0\u7279\u5b9a\u7684\u529f\u80fd\uff0c\u4e5f\u5c31\u662f\u8bf4 VBS \u811a\u672c\u5c31\u662f\u8c03\u7528\u73b0\u6210\u7684\u201c\u63a7\u4ef6\u201d\u4f5c\u4e3a\u5bf9\u8c61\uff0c\u7528\u5bf9\u8c61\u7684\u5c5e\u6027\u548c\u65b9\u6cd5\u5b9e\u73b0\u76ee\u7684\uff0c\u5b8c\u5168\u514d\u53bb\u4e86\u7f16\u5199\u4ee3\u7801\u3001\u8bbe\u8ba1\u7b97\u6cd5\u7b49\u7b49\u9ebb\u70e6\u3002\u8bf4\u767d\u4e86\uff0c\u5c31\u662f\u5229\u7528\u8bf8\u591a\u7684\u9ed1\u5323\u5b50\uff0c\u524d\u63d0\u662f\u4e86\u89e3\u9ed1\u5323\u5b50\u7684\u63a5\u53e3\u3002<\/p>\n\n\n\n<p>\u6700\u65b9\u4fbf\u7684\u662f\u5b83\u751a\u81f3\u4e0d\u9700\u8981\u4e13\u95e8\u7684\u5f00\u53d1\u73af\u5883\uff0c\u5728\u8ba1\u7b97\u673a\u4e2d\uff0c\u53ea\u8981\u6709 notepad \uff0c\u5c31\u53ef\u4ee5\u7f16\u5199 VBS \u811a\u672c\u4e86\uff0c\u5e76\u4e14\u53ef\u4ee5\u76f4\u63a5\u6267\u884c\u3002<\/p>\n\n\n\n<p>\u4e00\u3001\u53d8\u91cf<\/p>\n\n\n\n<p>1 \u3001\u6240\u6709\u5355\u5f15\u53f7\u540e\u9762\u7684\u5185\u5bb9\u90fd\u88ab\u89e3\u91ca\u4e3a\u6ce8\u91ca\u3002<\/p>\n\n\n\n<p>2 \u3001\u5728 VBScript \u4e2d\uff0c\u53d8\u91cf\u7684\u547d\u540d\u89c4\u5219\u9075\u5faa\u6807\u51c6\u7684\u547d\u540d\u89c4\u5219\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\uff1a\u5728 VBScript \u4e2d\u5bf9\u53d8\u91cf\u3001\u65b9\u6cd5\u3001\u51fd\u6570\u548c\u5bf9\u8c61\u7684\u5f15\u7528\u662f\u4e0d\u533a\u5206\u5927\u5c0f\u5199\u7684\u3002\u5728\u7533\u660e\u53d8\u91cf\u65f6\uff0c\u8981\u663e\u5f0f\u5730\u7533\u660e\u4e00\u4e2a\u53d8\u91cf\uff0c\u9700\u8981\u4f7f\u7528\u5173\u952e\u5b57 Dim \u6765\u544a\u8bc9 VBScript \u4f60\u8981\u521b\u5efa\u4e00\u4e2a\u53d8\u91cf\uff0c\u5e76\u5c06\u53d8\u91cf\u540d\u79f0\u8ddf\u5728\u5176\u540e\u3002\u7533\u660e\u591a\u4e2a\u540c\u7c7b\u578b\u53d8\u91cf\uff0c\u53ef\u4ee5\u7528\u9017\u53f7\u5206\u9694\u3002\u6ce8\u610f\uff1a VBScript \u4e2d\u4e0d\u5141\u8bb8\u5728\u7533\u660e\u53d8\u91cf\u7684\u65f6\u5019\u540c\u65f6\u7ed9\u53d8\u91cf\u8d4b\u503c\u3002\u4f46\u662f\u5141\u8bb8\u5728\u4e00\u884c\u4ee3\u7801\u5185\u540c\u65f6\u5bf9\u4e24\u4e2a\u53d8\u91cf\u8fdb\u884c\u8d4b\u503c\uff0c\u4e2d\u95f4\u7528\u5192\u53f7\u5206\u9694\u3002<\/p>\n\n\n\n<p>3 \u3001\u4f60\u53ef\u4ee5\u4f7f\u7528 Option Explicit \u6765\u544a\u8bc9\u5bbf\u4e3b\u53d8\u91cf\u5fc5\u987b\u5148\u58f0\u660e\u540e\u4f7f\u7528\u3002<\/p>\n\n\n\n<p>4 \u3001 VBScript \u5728\u5b9a\u4e49\u65f6\u53ea\u6709\u4e00\u79cd\u53d8\u91cf\u7c7b\u578b\uff0c\u5728\u5b9e\u9645\u4f7f\u7528\u4e2d\u9700\u8981\u4f7f\u7528\u7c7b\u578b\u8f6c\u6362\u51fd\u6570\u6765\u5c06\u53d8\u91cf\u8f6c\u6362\u6210\u76f8\u5e94\u7684\u53d8\u91cf\u7c7b\u578b\u3002<\/p>\n\n\n\n<p>CBool \u51fd\u6570\u5c06\u53d8\u91cf\u8f6c\u6362\u6210\u5e03\u5c14\u503c\uff1b<\/p>\n\n\n\n<p>CByte \u51fd\u6570\u5c06\u53d8\u91cf\u8f6c\u6362\u4e3a 0 \u5230 255 \u4e4b\u95f4\u7684\u6574\u6570\uff1b<\/p>\n\n\n\n<p>CCur \u51fd\u6570\u3001 CDbl \u51fd\u6570\u548c CSng \u51fd\u6570\u5c06\u53d8\u91cf\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\u503c\uff0c\u524d\u8005\u53ea\u7cbe\u786e\u5230\u5c0f\u6570\u70b9\u540e\u56db\u4f4d\uff0c\u540e\u4e24\u8005\u8981\u66f4\u52a0\u7cbe\u786e\uff0c\u6570\u503c\u7684\u8303\u56f4\u4e5f\u8981\u5927\u7684\u591a\uff1b<\/p>\n\n\n\n<p>CDate \u51fd\u6570\u5c06\u53d8\u91cf\u8f6c\u6362\u4e3a\u65e5\u671f\u503c\uff1b<\/p>\n\n\n\n<p>CInt \u51fd\u6570\u548c Clng \u51fd\u6570\u5c06\u53d8\u91cf\u8f6c\u6362\u4e3a\u6574\u6570\uff0c\u540e\u8005\u7684\u8303\u56f4\u6bd4\u524d\u8005\u8981\u5927\u7684\u591a\uff1b<\/p>\n\n\n\n<p>CStr \u51fd\u6570\u5c06\u53d8\u91cf\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\u3002<\/p>\n\n\n\n<p>\u4e8c\u3001\u6570\u7ec4<\/p>\n\n\n\n<p>\u6570\u7ec4\u7684\u5b9a\u4e49\u4e0e\u53d8\u91cf\u975e\u5e38\u7c7b\u4f3c\uff0c\u53ea\u9700\u8981\u5728\u53d8\u91cf\u540e\u63cf\u8ff0\u8fd9\u4e2a\u6570\u7ec4\u7684\u4e2a\u6570\u548c\u7ef4\u6570\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff1a\u6570\u7ec4\u7684\u4e0b\u6807\u603b\u662f\u4ece 0 \u5f00\u59cb\uff0c\u800c\u4ee5\u6570\u7ec4\u5b9a\u4e49\u4e2d\u6570\u503c\u51cf\u4e00\u7ed3\u675f\u3002\u4e5f\u5c31\u662f\u8bf4\u4f60\u4ee5\u8981\u5b9a\u4e49\u4e00\u4e2a\u6709\u5341\u4e2a\u6570\u636e\u7684\u6570\u7ec4\uff0c\u5c06\u8fd9\u6837\u4e66\u5199\u4ee3\u7801\uff1a dim array \uff08 9 \uff09\uff0c\u540c\u6837\uff0c\u5f53\u4f60\u8981\u8bbf\u95ee\u7b2c\u4e94\u4e2a\u5143\u7d20\u65f6\uff0c\u5b9e\u9645\u7684\u4ee3\u7801\u662f array(4) \u3002\u5f53\u7136\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u4e0d\u6307\u5b9a\u6570\u7ec4\u7684\u4e2a\u6570\u548c\u7ef4\u6570\u6765\u7533\u660e\u52a8\u6001\u6570\u7ec4\u3002\u7b49\u5230\u6570\u7ec4\u7684\u4e2a\u6570\u548c\u7ef4\u6570\u56fa\u5b9a\u540e\uff0c\u4f7f\u7528\u5173\u952e\u5b57 redim \u6765\u6539\u53d8\u6570\u7ec4\u3002\u6ce8\u610f\uff0c\u5728\u6539\u53d8\u6570\u7ec4\u7684\u5927\u5c0f\u65f6\uff0c\u6570\u7ec4\u7684\u6570\u636e\u4f1a\u88ab\u7834\u574f\uff0c\u4f7f\u7528\u5173\u952e\u5b57 preserve \u6765\u4fdd\u62a4\u6570\u636e\u3002\u4f8b\u5982\uff1aRedim \u7a7a\u683c preserve \u7a7a\u683c array \u62ec\u53f7\u4e2a\u6570\u9017\u53f7\u7ef4\u6570\u62ec\u53f7<\/p>\n\n\n\n<p>\u4e09\u3001\u64cd\u4f5c\u7b26<\/p>\n\n\n\n<p>\u5728 VBScript \u8fd0\u7b97\u7b26\u4e2d\uff0c\u52a0\u51cf\u4e58\u9664\u90fd\u662f\u6211\u4eec\u5e38\u7528\u7684\u7b26\u53f7\uff0c\u4e58\u65b9\u4f7f\u7528\u7684\u662f ^ \uff0c\u53d6\u6a21\u4f7f\u7528\u7684 Mod \u3002<\/p>\n\n\n\n<p>\u5728\u6bd4\u8f83\u64cd\u4f5c\u7b26\u4e2d\uff0c\u7b49\u4e8e\u3001\u5c0f\u4e8e\u3001\u5927\u4e8e\u3001\u5c0f\u4e8e\u7b49\u4e8e\u3001\u5927\u4e8e\u7b49\u4e8e\u90fd\u4e0e\u6211\u4eec\u5e38\u7528\u7684\u7b26\u53f7\u662f\u4e00\u81f4\u7684\uff0c\u800c\u4e0d\u7b49\u4e8e\u662f\u5c0f\u4e8e\u548c\u5927\u4e8e\u8fde\u7528\u3002<\/p>\n\n\n\n<p>\u903b\u8f91\u8fd0\u7b97\u7b26\u4e3a\uff1a\u548c\u64cd\u4f5c\u2014 &gt;AND \u975e\u64cd\u4f5c\u2014 &gt;NOT \u6216\u64cd\u4f5c\u2014 &gt;OR \uff1b<\/p>\n\n\n\n<p>\u4f60\u53ef\u4ee5\u4f7f\u7528\u64cd\u4f5c\u7b26 + \u548c\u64cd\u4f5c\u7b26 &amp; \u6765\u8fde\u63a5\u5b57\u7b26\u4e32\uff0c\u4e00\u822c\u4f7f\u7528 &amp; \u64cd\u4f5c\u7b26\uff1b<\/p>\n\n\n\n<p>\u53e6\u5916\u8fd8\u6709\u4e00\u4e2a\u6bd4\u8f83\u7279\u6b8a\u7684\u64cd\u4f5c\u7b26 Is \u7528\u6765\u6bd4\u8f83\u5bf9\u8c61\uff0c\u4f8b\u5982\u6309\u94ae\u5bf9\u8c61\uff0c\u5982\u679c\u5bf9\u8c61\u662f\u540c\u4e00\u7c7b\u578b\uff0c\u7ed3\u679c\u5c31\u662f\u771f\uff0c\u5982\u679c\u5bf9\u8c61\u4e0d\u662f\u540c\u4e00\u7c7b\u578b\uff0c\u7ed3\u679c\u5c31\u662f\u5047\u3002<\/p>\n\n\n\n<p>\u56db\u3001\u6761\u4ef6\u8bed\u53e5\u4e3b\u8981\u6709 if \u2026\u2026 then \u8bed\u53e5\u548c select case \u8bed\u53e5\u4e24\u79cd\u5f62\u5f0f<\/p>\n\n\n\n<p>\u5728 if \u2026\u2026 then \u8bed\u53e5\u4e2d\uff0c\u5176\u57fa\u672c\u5f62\u5f0f\u4e3a\uff1a<\/p>\n\n\n\n<p>If \u6761\u4ef6 then<\/p>\n\n\n\n<p>\u2018\u5904\u7406\u6761\u4ef6\u7684\u8bed\u53e5<\/p>\n\n\n\n<p>Else<\/p>\n\n\n\n<p>\u2018\u5904\u7406\u4e0d\u6ee1\u8db3\u6761\u4ef6\u7684\u8bed\u53e5<\/p>\n\n\n\n<p>Endif<\/p>\n\n\n\n<p>\u5982\u679c\u8fd8\u6709\u66f4\u591a\u7684\u6761\u4ef6\u9700\u8981\u9a8c\u8bc1\uff0c\u5219\u9700\u8981\u6dfb\u52a0\u8bed\u53e5<\/p>\n\n\n\n<p>Elseif \u6761\u4ef6 then<\/p>\n\n\n\n<p>\u2018\u5904\u7406\u6761\u4ef6\u8bed\u53e5<\/p>\n\n\n\n<p>\u5728 select case \u8bed\u53e5\u4e2d\uff0c\u5176\u57fa\u672c\u5f62\u5f0f\u4e3a\uff1a<\/p>\n\n\n\n<p>Select case \u53d8\u91cf<\/p>\n\n\n\n<p>Case \u6761\u4ef6\u503c\u4e00<\/p>\n\n\n\n<p>\u2018\u5904\u7406\u6761\u4ef6\u4e00\u8bed\u53e5<\/p>\n\n\n\n<p>Case \u6761\u4ef6\u503c\u4e8c<\/p>\n\n\n\n<p>\u2018\u5904\u7406\u6761\u4ef6\u4e8c\u8bed\u53e5<\/p>\n\n\n\n<p>case else<\/p>\n\n\n\n<p>\u2018\u5904\u7406\u8bed\u53e5<\/p>\n\n\n\n<p>End select<\/p>\n\n\n\n<p>\u6ce8\u610f\uff1a\u5728\u6267\u884c\u5b57\u7b26\u4e32\u6bd4\u8f83\u65f6\uff0c\u9700\u8981\u7279\u522b\u6ce8\u610f\u5927\u5c0f\u5199\uff0c\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u5728\u6bd4\u8f83\u524d\uff0c\u4f7f\u7528 lcase \u51fd\u6570\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u6210\u5c0f\u5199\uff0c\u4f7f\u7528 ucase \u51fd\u6570\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u6210\u5927\u5199\u3002<\/p>\n\n\n\n<p>\u4e94\u3001\u5faa\u73af\u63a7\u5236\u8bed\u53e5<\/p>\n\n\n\n<p>\u5faa\u73af\u63a7\u5236\u8bed\u53e5\u6709 for \u2026\u2026 next \u5faa\u73af\u3001 for \u2026\u2026 each \u5faa\u73af\u3001 do \u2026\u2026 while \u5faa\u73af\u3001 do \u2026\u2026 until \u5faa\u73af\u3001 while \u5faa\u73af\u4e94\u79cd\u5f62\u5f0f\u3002<\/p>\n\n\n\n<p>\u5728\u4f7f\u7528\u5faa\u73af\u63a7\u5236\u8bed\u53e5\u524d\uff0c\u9996\u5148\u8981\u5bf9\u5faa\u73af\u6761\u4ef6\u8fdb\u884c\u5224\u65ad\uff0c\u5982\u679c\u5faa\u73af\u6b21\u6570\u662f\u6709\u56fa\u5b9a\u6b21\u6570\u7684\uff0c\u90a3\u4e48\u4f7f\u7528 For \u2026\u2026 next \u5faa\u73af\uff0c\u5176\u7ed3\u6784\u4e3a\uff1a<\/p>\n\n\n\n<p>For \u8ba1\u6570\u5668\u53d8\u91cf\uff1d\u5f00\u59cb\u8ba1\u6570\u503c to \u6700\u540e\u8ba1\u6570\u503c<\/p>\n\n\n\n<p>\u2018\u6267\u884c\u5faa\u73af\u4f53<\/p>\n\n\n\n<p>Next<\/p>\n\n\n\n<p>\u5982\u679c\u662f\u9700\u8981\u5bf9\u6570\u7ec4\u6216\u5bf9\u8c61\u96c6\u5408\u4e2d\u7684\u6bcf\u4e00\u4e2a\u5143\u7d20\u8fdb\u884c\u5224\u65ad\uff0c\u5219\u9700\u8981\u4f7f\u7528 for \u2026\u2026 each \u5faa\u73af\uff0c\u5176\u7ed3\u6784\u4e3a\uff1a<\/p>\n\n\n\n<p>For each \u5faa\u73af\u8ba1\u6570\u53d8\u91cf in \u8981\u67e5\u770b\u7684\u5bf9\u8c61\u6216\u6570\u7ec4<\/p>\n\n\n\n<p>\u2018\u6267\u884c\u5904\u7406\u8bed\u53e5<\/p>\n\n\n\n<p>Next<\/p>\n\n\n\n<p>\u6ce8\u610f\uff1a\u5728\u4e0a\u8ff0\u4e24\u79cd\u5faa\u73af\u4e2d\u968f\u65f6\u53ef\u4ee5\u4f7f\u7528 exit for \u6765\u9000\u51fa\u5faa\u73af\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u4f60\u5e0c\u671b\u5728\u6761\u4ef6\u6ee1\u8db3\u65f6\u6267\u884c\u4e00\u6bb5\u4ee3\u7801\u5219\u4f7f\u7528 do \u2026\u2026 while \u8bed\u53e5\uff0c\u7ed3\u6784\u4e3a\uff1a<\/p>\n\n\n\n<p>Do while \u6761\u4ef6<\/p>\n\n\n\n<p>\u2018\u6267\u884c\u5faa\u73af\u4f53<\/p>\n\n\n\n<p>Loop<\/p>\n\n\n\n<p>\u5982\u679c\u4f60\u5e0c\u671b\u5728\u6761\u4ef6\u4e0d\u6ee1\u8db3\u65f6\u6267\u884c\u4ee3\u7801\uff0c\u5219\u4f7f\u7528 do \u2026\u2026 until \u8bed\u53e5\uff0c\u7ed3\u6784\u4e3a\uff1a<\/p>\n\n\n\n<p>Do \u3000 until \u3000\u6761\u4ef6<\/p>\n\n\n\n<p>\u2018\u6267\u884c\u5faa\u73af\u4f53<\/p>\n\n\n\n<p>Loop<\/p>\n\n\n\n<p>\u5f53\u7136\uff0c\u5728\u8fd9\u4e24\u79cd\u5faa\u73af\u8bed\u53e5\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528 exit do \u6765\u9000\u51fa\u5faa\u73af<\/p>\n\n\n\n<p>\u6700\u540e\u4e00\u79cd\u5faa\u73af\u8bed\u53e5\u662f\u6761\u4ef6\u6ee1\u8db3\u65f6\u4e00\u76f4\u6267\u884c\u5faa\u73af\uff0c<\/p>\n\n\n\n<p>While \u6761\u4ef6<\/p>\n\n\n\n<p>\u2018\u6267\u884c\u5faa\u73af\u4f53<\/p>\n\n\n\n<p>Wend<\/p>\n\n\n\n<p>\u516d\u3001\u4f7f\u7528\u8fc7\u7a0b<\/p>\n\n\n\n<p>\u5e38\u7528\u7684\u8fc7\u7a0b\u6709\u4e24\u79cd\uff0c\u4e00\u79cd\u4e3a\u51fd\u6570\uff0c\u7ed9\u8c03\u7528\u8005\u8fd4\u56de\u503c\uff0c\u4e00\u79cd\u4e3a\u5b50\u7a0b\u5e8f\uff0c\u65e0\u8fd4\u56de\u503c\uff0c\u8fd8\u6709\u4e00\u79cd\u53eb\u4e8b\u4ef6\u7684\u7279\u6b8a\u5b50\u7a0b\u5e8f\uff0c\u7528\u7684\u6bd4\u8f83\u5c11\u3002<\/p>\n\n\n\n<p>\u51fd\u6570\u7684\u57fa\u672c\u5b9a\u4e49\u65b9\u6cd5\u4e3a\uff1a<\/p>\n\n\n\n<p>Function \u51fd\u6570\u540d\u79f0\uff08\u53c2\u6570\u5217\u8868\uff09<\/p>\n\n\n\n<p>\u2018\u51fd\u6570\u4ee3\u7801<\/p>\n\n\n\n<p>\u2018\u51fd\u6570\u540d\u79f0\uff1d\u67d0\u503c \u2018\u7528\u6765\u8fd4\u56de\u503c<\/p>\n\n\n\n<p>end function<\/p>\n\n\n\n<p>\u5b50\u7a0b\u5e8f\u7c7b\u4f3c\uff0c\u4e0d\u8fc7\u6ca1\u6709\u8fd4\u56de\u503c\u3002<\/p>\n\n\n\n<p>\u6ce8\u610f\uff1a\u5c3d\u7ba1\u5728\u5b9a\u4e49\u5b50\u7a0b\u5e8f\u7684\u65f6\u5019\uff0c\u53c2\u6570\u5217\u8868\u8981\u52a0\u62ec\u53f7\uff0c\u4f46\u5728\u8c03\u7528\u5b50\u7a0b\u5e8f\u7684\u65f6\u5019\uff0c\u53c2\u6570\u5217\u8868\u4e0d\u52a0\u62ec\u53f7\uff0c\u62ec\u53f7\u53ea\u5728\u51fd\u6570\u4e2d\u4f7f\u7528\u3002\u53e6\u5916\uff0c\u5b50\u7a0b\u5e8f\u4e0d\u80fd\u5728\u8868\u8fbe\u5f0f\u4e2d\u4f7f\u7528\u3002<\/p>\n\n\n\n<p>\u800c\u51fd\u6570\u53ea\u80fd\u51fa\u73b0\u5728\u8d4b\u503c\u8bed\u53e5\u7684\u53f3\u8fb9\uff0c\u6216\u8005\u8868\u8fbe\u5f0f\u4e2d\uff0c\u51fd\u6570\u4e0d\u80fd\u76f4\u63a5\u4f7f\u7528\uff0c\u5982\u679c\u5fc5\u987b\u76f4\u63a5\u4f7f\u7528\u51fd\u6570\uff0c\u5219\u5fc5\u987b\u4f7f\u7528 call \u8bed\u53e5\u8c03\u7528\uff0c\u5e76\u53d6\u6d88\u8fd4\u56de\u503c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>VBS \u662f\u4e00\u79cd Windows \u811a\u672c\uff0c\u5b83\u7684\u5168\u79f0\u662f Microsoft Visual Basic Script  &hellip; <a href=\"https:\/\/www.wyrcad.com\/?p=1216\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cVBScript \u7b80\u4ecb\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[24,21],"class_list":["post-1216","post","type-post","status-publish","format-standard","hentry","category-bianchengyuandi","tag-vb","tag-kepu"],"_links":{"self":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts\/1216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1216"}],"version-history":[{"count":5,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts\/1216\/revisions"}],"predecessor-version":[{"id":1451,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=\/wp\/v2\/posts\/1216\/revisions\/1451"}],"wp:attachment":[{"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wyrcad.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}