<span style="color: #F000FF;">#include</span> <Misc.au3><BR><span style="color: #F000FF;">#include</span> <GUIMenu.au3><BR><span style="color: #F000FF;">#include</span> <Constants.au3><BR><span style="color: #F000FF;">#include</span> <GuiListView.au3><BR><span style="color: #F000FF;">#include</span> <ComboConstants.au3><BR><span style="color: #F000FF;">#include</span> <WindowsConstants.au3><BR> <BR><span style="color: #000090;">Opt</span>('TrayIconHide', 1)<BR><span style="color:#AA0000;">$sGuiName</span> = '软件菜单 — Beta 1.8.5'<BR><span style="color: #0000FF;">If</span> <span style="color: #000090;">WinExists</span>(<span style="color:#AA0000;">$sGuiName</span>) <span style="color: #0000FF;">Then</span><BR> <span style="color: #000090;">WinActivate</span>(<span style="color:#AA0000;">$sGuiName</span>)<BR> <span style="color: #0000FF;">Exit</span><BR><span style="color: #0000FF;">EndIf</span><BR> <BR><span style="color: #000090;">HotKeySet</span>('{Enter}', 'Enter')<BR><span style="color: #000090;">AdlibRegister</span>('Memory', 3000) <span style="color: #009933;">;注册一个 Adlib 函数 AdlibRegister ( "函数" [, 时间] )</span><span style="color: #009933;"></span><BR><span style="color: #000090;">Opt</span>('TrayIconHide', 0)<BR><span style="color: #000090;">Opt</span>("TrayMenuMode", 1)<BR><span style="color: #000090;">Opt</span>("GUICloseOnESC", 0)<BR><span style="color: #000090;">Opt</span>("TrayOnEventMode", 1)<BR> <BR><span style="color: #009933;">;~ Global Const $WM_DROPFILES = 0x0233</span><span style="color: #009933;"></span><BR><span style="color: #0000FF;">Global</span> <span style="color:#AA0000;">$aDroppedFiles</span>[1]<BR><span style="color: #0000FF;">Global</span> <span style="color:#AA0000;">$hListView</span>[6], <span style="color:#AA0000;">$hType</span>, <span style="color:#AA0000;">$Combo1</span>, <span style="color:#AA0000;">$Radio1</span>, <span style="color:#AA0000;">$Radio2</span>, <span style="color:#AA0000;">$Radio3</span>, <span style="color:#AA0000;">$Radio4</span>, <span style="color:#AA0000;">$oSkin</span><BR><span style="color: #0000FF;">Global</span> <span style="color:#AA0000;">$iGroupID</span>, <span style="color:#AA0000;">$iPage</span> = 0<BR><span style="color: #0000FF;">Global</span> <span style="color:#AA0000;">$avArray</span>[6] = ['全部', '娱乐', '影音', '办公', '工具', '其他']<BR><span style="color: #0000FF;">Global</span> <span style="color:#AA0000;">$sConversion</span> = '(\(|\))'<BR> <BR><span style="color:#AA0000;">$sConfigPath</span> = <span style="color: #FF33FF;">@ScriptDir</span> & '\config1.8.ini'<BR><span style="color: #AA0000;">$MyGui</span> = <span style="color: #000090;">GUICreate</span>(<span style="color: #AA0000;">$sGuiName</span>, 800, 600, -1, -1, -1, <span style="color: #AA0000;">$WS_EX_ACCEPTFILES</span>) <span style="color: #009933;">;$WS_OVERLAPPEDWINDOW = 最大化可用</span><span style="color: #009933;"></span><BR><span style="color: #000090;">GUIRegisterMsg</span>(<span style="color: #AA0000;">$WM_NOTIFY</span>, "WM_NOTIFY")<span style="color: #009933;">;已知的Windows 消息代码(WM_MSG)注册一个用户自定义的函数.GUIRegisterMsg ( msgID, "函数" ) </span><span style="color: #009933;"></span><BR><span style="color: #000090;">GUIRegisterMsg</span>(<span style="color:#AA0000;">$WM_COMMAND</span>, "WM_COMMAND")<BR><span style="color: #000090;">GUIRegisterMsg</span>(<span style="color:#AA0000;">$WM_DROPFILES</span>, "WM_DROPFILES")<BR><span style="color: #000090;">TraySetOnEvent</span>(<span style="color: #AA0000;">$TRAY_EVENT_PRIMARYUP</span>, "SpecialEvent")<span style="color: #009933;">;当系统托盘发生一个特殊事件就执行一个用户自定义函数. </span><span style="color: #009933;"></span><BR> <BR>Dim <span style="color:#AA0000;">$aX</span>[6] = [115, 1000, 1000, 1000, 1000, 1000]<BR><span style="color: #0000FF;">For</span> <span style="color:#AA0000;">$i</span> = 0 <span style="color: #0000FF;">To</span> 5<BR> <span style="color:#AA0000;">$hListView</span>[$i] = <span style="color: #000090;">GUICtrlCreateListView</span>("", <span style="color:#AA0000;">$aX</span>[$i], 5, 680, 500, -1, <span style="color:#AA0000;">$WS_EX_CLIENTEDGE</span>)<BR> <span style="color: #000090;">GUICtrlSetState</span>(-1, 8) <span style="color: #009933;">;$GUI_DROPACCEPTED = 8 即控件支持拖拽</span><span style="color: #009933;"></span><BR> <span style="color: #000090;">GUICtrlSetColor</span>(-1, 0x0080C0)<span style="color: #009933;">;设置控件中的文本色</span><span style="color: #009933;"></span><BR> <BR> <span style="color:#AA0000;">$iBkColor</span> = <span style="color: #000090;">Number</span>(<span style="color: #000090;">IniRead</span>(<span style="color:#AA0000;">$sConfigPath</span>, 'BkColor', <span style="color:#AA0000;">$i</span>, '12639424'))<BR> <span style="color: #000090;">_GUICtrlListView_SetColumnWidth</span>(<span style="color: #AA0000;">$hListView</span>[$i], 0, 200) <span style="color: #009933;">;更改列宽</span><span style="color: #009933;"></span><BR> <span style="color: #000090;">_GUICtrlListView_SetExtendedListViewStyle</span>(<span style="color: #AA0000;">$hListView</span>[$i], <span style="color: #000090;">BitOR</span>(<span style="color: #AA0000;">$LVS_EX_FULLROWSELECT</span>, <span style="color: #AA0000;">$LVS_EX_DOUBLEBUFFER</span>))<span style="color: #009933;">;设置扩展样式</span><span style="color: #009933;"></span><BR> <span style="color: #000090;">_GUICtrlListView_SetBkColor</span>(<span style="color:#AA0000;">$hListView</span>[$i], <span style="color:#AA0000;">$iBkColor</span>)<BR> <span style="color: #000090;">_GUICtrlListView_SetTextBkColor</span>(<span style="color:#AA0000;">$hListView</span>[$i], <span style="color:#AA0000;">$iBkColor</span>)<BR> <span style="color: #000090;">_GUICtrlListView_SetOutlineColor</span>(<span style="color: #AA0000;">$hListView</span>[$i], <span style="color: #AA0000;">$iBkColor</span>) <span style="color: #009933;">;设置边框颜色</span><span style="color: #009933;"></span><BR> <span style="color: #000090;">_GUICtrlListView_SetView</span>(<span style="color: #AA0000;">$hListView</span>[$i], 1) <span style="color: #009933;">;设置控件的视图</span><span style="color: #009933;"></span><BR><span style="color: #0000FF;">Next</span><BR><span style="color: #000090;">Switcha</span>(<span style="color: #AA0000;">$hListView</span>[0], <span style="color: #AA0000;">$avArray</span>[0])<span style="color: #009933;">;$avArray[6] = ['全部', '娱乐', '影音', '办公', '工具', '其他']</span><span style="color: #009933;"></span><BR> <BR><span style="color: #AA0000;">$Combo1</span> = <span style="color: #000090;">GUICtrlCreateCombo</span>(<span style="color: #AA0000;">$avArray</span>[1], 60, 540, 80, 21, <span style="color: #AA0000;">$CBS_DROPDOWNLIST</span>) <span style="color: #009933;">;$CBS_DROPDOWNLIST = 控件不可编辑</span><span style="color: #009933;"></span><BR><span style="color: #000090;">GUICtrlSetData</span>(-1, <span style="color:#AA0000;">$avArray</span>[2] & '|' & <span style="color:#AA0000;">$avArray</span>[3] & '|' & <span style="color:#AA0000;">$avArray</span>[4] & '|' & <span style="color:#AA0000;">$avArray</span>[5])<BR><span style="color:#AA0000;">$Input1</span> = <span style="color: #000090;">GUICtrlCreateInput</span>("", 210, 540, 230, 21)<BR><span style="color:#AA0000;">$Input2</span> = <span style="color: #000090;">GUICtrlCreateInput</span>("", 620, 540, 100, 21)<BR> <BR><span style="color:#AA0000;">$Buta</span> = <span style="color: #000090;">GUICtrlCreateButton</span>("添加", 720, 538, 60, 25, <span style="color:#AA0000;">$WS_GROUP</span>)<BR><span style="color:#AA0000;">$Butb</span> = <span style="color: #000090;">GUICtrlCreateButton</span>("浏览", 440, 538, 50, 25, <span style="color:#AA0000;">$WS_GROUP</span>)<BR> <BR><span style="color: #000090;">GUICtrlCreateGroup</span>("", 5, 0, 100, 280)<BR><span style="color: #AA0000;">$But0</span> = <span style="color: #000090;">GUICtrlCreateButton</span>(<span style="color: #AA0000;">$avArray</span>[0], 15, 15, 80, 30, <span style="color: #AA0000;">$WS_GROUP</span>)<span style="color: #009933;">;此样式的控件被指定为控件组的第一个控件.</span><span style="color: #009933;"></span><BR> <span style="color: #009933;">;控件组由第一个控件和其后定义的所有控件组成, 直到下一个带有 WS_GROUP 样式的控件为止.</span><span style="color: #009933;"></span><BR><span style="color:#AA0000;">$But1</span> = <span style="color: #000090;">GUICtrlCreateButton</span>(<span style="color:#AA0000;">$avArray</span>[1], 15, 60, 80, 30, <span style="color:#AA0000;">$WS_GROUP</span>)<BR><span style="color:#AA0000;">$But2</span> = <span style="color: #000090;">GUICtrlCreateButton</span>(<span style="color:#AA0000;">$avArray</span>[2], 15, 105, 80, 30, <span style="color:#AA0000;">$WS_GROUP</span>)<BR><span style="color:#AA0000;">$But3</span> = <span style="color: #000090;">GUICtrlCreateButton</span>(<span style="color:#AA0000;">$avArray</span>[3], 15, 150, 80, 30, <span style="color:#AA0000;">$WS_GROUP</span>)<BR><span style="color:#AA0000;">$But4</span> = <span style="color: #000090;">GUICtrlCreateButton</span>(<span style="color:#AA0000;">$avArray</span>[4], 15, 195, 80, 30, <span style="color:#AA0000;">$WS_GROUP</span>)<BR><span style="color:#AA0000;">$But5</span> = <span style="color: #000090;">GUICtrlCreateButton</span>(<span style="color:#AA0000;">$avArray</span>[5], 15, 240, 80, 30, <span style="color:#AA0000;">$WS_GROUP</span>)<BR> <BR><span style="color: #000090;">GUICtrlCreateGroup</span>("图标排列方式", 5, 300, 100, 135)<BR><span style="color:#AA0000;">$Radio1</span> = <span style="color: #000090;">GUICtrlCreateRadio</span>("大 图 标", 20, 325, 68, 17)<BR><span style="color:#AA0000;">$Radio2</span> = <span style="color: #000090;">GUICtrlCreateRadio</span>("小 图 标", 20, 350, 68, 17)<BR><span style="color:#AA0000;">$Radio3</span> = <span style="color: #000090;">GUICtrlCreateRadio</span>("平 铺", 20, 375, 68, 17)<BR><span style="color:#AA0000;">$Radio4</span> = <span style="color: #000090;">GUICtrlCreateRadio</span>("列 表", 20, 400, 68, 17)<BR><span style="color: #000090;">GUICtrlSetState</span>(<span style="color:#AA0000;">$Radio1</span>, 1)<BR> <BR><span style="color:#AA0000;">$sDefaultSkin</span> = <span style="color: #000090;">IniRead</span>(<span style="color:#AA0000;">$sConfigPath</span>, 'Skin', 'Default', '去掉皮肤')<BR><span style="color: #0000FF;">If</span> <span style="color:#AA0000;">$sDefaultSkin</span> <> '' And <span style="color:#AA0000;">$sDefaultSkin</span> <> '去掉皮肤' <span style="color: #0000FF;">Then</span><BR> <span style="color:#AA0000;">$Skin</span> = '去掉皮肤' & '|'<BR><span style="color: #0000FF;">Else</span><BR> <span style="color:#AA0000;">$sDefaultSkin</span> = '去掉皮肤'<BR> <span style="color:#AA0000;">$Skin</span> = ''<BR><span style="color: #0000FF;">EndIf</span><BR> <BR><span style="color:#AA0000;">$search</span> = <span style="color: #000090;">FileFindFirstFile</span>(<span style="color: #FF33FF;">@ScriptDir</span> & '\Skin\*.she')<BR><span style="color: #0000FF;">While</span> 1<BR> <span style="color:#AA0000;">$file</span> = <span style="color: #000090;">FileFindNextFile</span>(<span style="color:#AA0000;">$search</span>)<BR> <span style="color: #0000FF;">If</span> <span style="color: #FF33FF;">@error</span> <span style="color: #0000FF;">Then</span> ExitLoop<BR> <span style="color:#AA0000;">$Skin</span> &= <span style="color: #000090;">StringRegExpReplace</span>(<span style="color:#AA0000;">$file</span>, '\.she', '') & '|'<BR><span style="color: #0000FF;">WEnd</span><BR> <BR><span style="color: #000090;">GUICtrlCreateGroup</span>("皮肤设置", 5, 445, 100, 60)<BR><span style="color:#AA0000;">$hSkin</span> = <span style="color: #000090;">GUICtrlCreateCombo</span>(<span style="color:#AA0000;">$sDefaultSkin</span>, 15, 470, 80, 21, <span style="color: #000090;">BitOR</span>(0x2, 0x40, 0x00200000, 0x3, <span style="color:#AA0000;">$CBS_DROPDOWNLIST</span>))<BR><span style="color: #000090;">GUICtrlSetData</span>(-1, <span style="color:#AA0000;">$Skin</span>)<BR> <BR><span style="color: #0000FF;">Global</span> <span style="color:#AA0000;">$aMenuItemText</span>[10] = ['运行程序', '程序目录', '刷新图标', '修改名称', '删除项目', '', '颜色设置', '设置当页背景色', '设置当页文本色', '恢复当页默认色']<BR><span style="color: #AA0000;">$iMenu</span> = <span style="color: #000090;">GUICtrlCreateContextMenu</span>(<span style="color: #000090;">GUICtrlCreateDummy</span>())<span style="color: #009933;">;在GUI上创建一个 Dummy 控件</span><span style="color: #009933;"></span><BR><span style="color:#AA0000;">$hMenu</span> = <span style="color: #000090;">GUICtrlGetHandle</span>(-1)<BR> <BR><span style="color:#AA0000;">$iMenuItem1</span> = <span style="color: #000090;">GUICtrlCreateMenuItem</span>(<span style="color:#AA0000;">$aMenuItemText</span>[0] & '(&A)', <span style="color:#AA0000;">$iMenu</span>)<BR><span style="color:#AA0000;">$iMenuItem2</span> = <span style="color: #000090;">GUICtrlCreateMenuItem</span>(<span style="color:#AA0000;">$aMenuItemText</span>[1] & '(&P)', <span style="color:#AA0000;">$iMenu</span>)<BR><span style="color:#AA0000;">$iMenuItem3</span> = <span style="color: #000090;">GUICtrlCreateMenuItem</span>(<span style="color:#AA0000;">$aMenuItemText</span>[2] & '(&R)', <span style="color:#AA0000;">$iMenu</span>)<BR><span style="color:#AA0000;">$iMenuItem4</span> = <span style="color: #000090;">GUICtrlCreateMenuItem</span>(<span style="color:#AA0000;">$aMenuItemText</span>[3] & '(&S)', <span style="color:#AA0000;">$iMenu</span>)<BR><span style="color:#AA0000;">$iMenuItem5</span> = <span style="color: #000090;">GUICtrlCreateMenuItem</span>(<span style="color:#AA0000;">$aMenuItemText</span>[4] & '(&D)', <span style="color:#AA0000;">$iMenu</span>)<BR><span style="color: #000090;">GUICtrlCreateMenuItem</span>(<span style="color:#AA0000;">$aMenuItemText</span>[5], <span style="color:#AA0000;">$iMenu</span>)<BR><span style="color:#AA0000;">$iColor</span> = <span style="color: #000090;">GUICtrlCreateMenu</span>(<span style="color:#AA0000;">$aMenuItemText</span>[6] & '(&C)', <span style="color:#AA0000;">$iMenu</span>)<BR><span style="color:#AA0000;">$iMenuItem6</span> = <span style="color: #000090;">GUICtrlCreateMenuItem</span>(<span style="color:#AA0000;">$aMenuItemText</span>[7], <span style="color:#AA0000;">$iColor</span>)<BR><span style="color:#AA0000;">$iMenuItem7</span> = <span style="color: #000090;">GUICtrlCreateMenuItem</span>(<span style="color:#AA0000;">$aMenuItemText</span>[8], <span style="color:#AA0000;">$iColor</span>)<BR><span style="color:#AA0000;">$iMenuItem8</span> = <span style="color: #000090;">GUICtrlCreateMenuItem</span>(<span style="color:#AA0000;">$aMenuItemText</span>[9], <span style="color:#AA0000;">$iColor</span>)<BR> <BR><span style="color: #000090;">GUICtrlCreateGroup</span>("添加程序", 5, 515, 790, 60)<BR><span style="color: #000090;">GUICtrlCreateLabel</span>("类型:", 20, 543, 40, 24)<BR><span style="color: #000090;">GUICtrlCreateLabel</span>("目录:", 170, 543, 40, 24)<BR><span style="color: #000090;">GUICtrlCreateLabel</span>("软件名(可省略):", 515, 543, 100, 24)<BR> <BR><span style="color: #000090;">GUICtrlCreateLabel</span>("查看位置:", 10, 583, 62, 17)<BR><span style="color:#AA0000;">$hType</span> = <span style="color: #000090;">GUICtrlCreateLabel</span>(<span style="color:#AA0000;">$avArray</span>[0], 70, 583, 60, 17)<BR><span style="color: #000090;">GUICtrlCreateLabel</span>("系统版本:" & <span style="color: #FF33FF;">@OSVersion</span>, 250, 583, 150, 17)<BR><span style="color: #000090;">GUICtrlCreateLabel</span>("系统日期:" & <span style="color: #FF33FF;">@YEAR</span> & "-" & <span style="color: #FF33FF;">@MON</span> & "-" & <span style="color: #FF33FF;">@MDAY</span>, 450, 583, 150, 17)<BR><span style="color: #000090;">GUICtrlCreateLabel</span>("By:水木子", 720, 583, 80, 17)<BR> <BR><span style="color: #000090;">Read</span>()<BR><span style="color: #000090;">Readall</span>()<span style="color: #009933;">;皮肤</span><span style="color: #009933;"></span><BR><span style="color: #000090;">Skin</span>(<span style="color: #000090;">IniRead</span>(<span style="color:#AA0000;">$sConfigPath</span>, 'Skin', 'Default', ''))<BR><span style="color: #000090;">GUISetState</span>()<span style="color: #009933;">;调整窗口的状态.</span><span style="color: #009933;"></span><BR><span style="color: #000090;">_ReduceMemory</span>(<span style="color: #FF33FF;">@AutoItPID</span>)<BR> <BR><span style="color: #0000FF;">While</span> 1<BR> <span style="color: #AA0000;">$nMsg</span> = <span style="color: #000090;">GUIGetMsg</span>() <span style="color: #009933;">;捕获窗口消息.</span><span style="color: #009933;"></span><BR> <span style="color: #0000FF;">Switch</span> <span style="color:#AA0000;">$nMsg</span><BR> <span style="color: #0000FF;">Case</span> -3<BR> <span style="color: #000090;">GUIDelete</span>(<span style="color:#AA0000;">$MyGui</span>)<BR> <span style="color: #0000FF;">Exit</span><BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$But0</span> <span style="color: #0000FF;">To</span> <span style="color:#AA0000;">$But5</span><BR> <span style="color:#AA0000;">$iControlID</span> = <span style="color:#AA0000;">$nMsg</span> - 15<BR> <span style="color: #0000FF;">If</span> <span style="color:#AA0000;">$iPage</span> <> <span style="color:#AA0000;">$iControlID</span> <span style="color: #0000FF;">Then</span><BR> <span style="color: #000090;">Switcha</span>(<span style="color:#AA0000;">$iPage</span>, <span style="color:#AA0000;">$avArray</span>[$iControlID])<BR> <span style="color:#AA0000;">$iPage</span> = <span style="color:#AA0000;">$iControlID</span><BR> <span style="color: #000090;">Switchb</span>(<span style="color:#AA0000;">$iControlID</span>)<BR> <span style="color: #0000FF;">EndIf</span><BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$Buta</span><BR> <span style="color: #000090;">AddItem</span>(<span style="color: #000090;">GUICtrlRead</span>(<span style="color:#AA0000;">$Combo1</span>), <span style="color: #000090;">GUICtrlRead</span>(<span style="color:#AA0000;">$Input1</span>), <span style="color: #000090;">GUICtrlRead</span>(<span style="color:#AA0000;">$Input2</span>))<BR> <span style="color: #000090;">GUICtrlSetData</span>(<span style="color:#AA0000;">$Input1</span>, '')<BR> <span style="color: #000090;">GUICtrlSetData</span>(<span style="color:#AA0000;">$Input2</span>, '')<BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$Butb</span><BR> <span style="color:#AA0000;">$Folder</span> = <span style="color: #000090;">FileOpenDialog</span>("查找", '', "可执行文件(*.*)")<BR> <span style="color: #0000FF;">If</span> Not <span style="color: #FF33FF;">@error</span> <span style="color: #0000FF;">Then</span> <span style="color: #000090;">GUICtrlSetData</span>(<span style="color:#AA0000;">$Input1</span>, <span style="color:#AA0000;">$Folder</span>)<BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$Radio1</span> <span style="color: #0000FF;">To</span> <span style="color:#AA0000;">$Radio4</span><BR> <span style="color: #000090;">_GUICtrlListView_SetView</span>(<span style="color:#AA0000;">$hListView</span>[$iPage], <span style="color:#AA0000;">$nMsg</span> - 21)<BR> <span style="color: #0000FF;">Case</span> -13<BR> <span style="color: #0000FF;">For</span> <span style="color:#AA0000;">$i</span> = 1 <span style="color: #0000FF;">To</span> <span style="color: #000090;">UBound</span>(<span style="color:#AA0000;">$aDroppedFiles</span>) - 1<BR> <span style="color:#AA0000;">$SoftwareName</span> = <span style="color: #000090;">StringRegExpReplace</span>(<span style="color:#AA0000;">$aDroppedFiles</span>[$i], '.+\\|\.\w+$', '')<BR> <span style="color: #000090;">AddItem</span>(<span style="color: #000090;">GUICtrlRead</span>(<span style="color:#AA0000;">$Combo1</span>), <span style="color:#AA0000;">$aDroppedFiles</span>[$i], <span style="color:#AA0000;">$SoftwareName</span>)<BR> <span style="color: #0000FF;">Next</span><BR> <span style="color: #000090;">GUICtrlSendMsg</span>(<span style="color: #AA0000;">$hListView</span>[$iPage], <span style="color: #AA0000;">$LVM_SETCOLUMNWIDTH</span>, 0, -1) <span style="color: #009933;">;发送一个消息到控件.</span><span style="color: #009933;"></span><BR> <span style="color: #0000FF;">EndSwitch</span><BR><span style="color: #0000FF;">WEnd</span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">WM_NOTIFY</span>(<span style="color:#AA0000;">$hWnd</span>, <span style="color:#AA0000;">$iMsg</span>, <span style="color:#AA0000;">$iwParam</span>, <span style="color:#AA0000;">$ilParam</span>)<BR> <span style="color: #0000FF;">Switch</span> <span style="color:#AA0000;">$iwParam</span><BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$hListView</span>[0] <span style="color: #0000FF;">To</span> <span style="color:#AA0000;">$hListView</span>[5]<BR> <span style="color: #0000FF;">Local</span> <span style="color:#AA0000;">$tBuffer</span> = <span style="color: #000090;">DllStructCreate</span>(<span style="color:#AA0000;">$tagNMHDR</span>, <span style="color:#AA0000;">$ilParam</span>)<BR> <span style="color: #0000FF;">Switch</span> <span style="color: #000090;">DllStructGetData</span>(<span style="color:#AA0000;">$tBuffer</span>, 'Code')<BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$NM_DBLCLK</span><BR> <span style="color: #000090;">RunProgram</span>(1)<BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$NM_RCLICK</span><BR> <span style="color:#AA0000;">$iMenuIndex</span> = <span style="color: #000090;">Number</span>(<span style="color:#AA0000;">$iwParam</span> - <span style="color:#AA0000;">$hListView</span>[0] + 1)<BR> <span style="color:#AA0000;">$hMenu</span> = <span style="color: #000090;">GUICtrlGetHandle</span>(<span style="color:#AA0000;">$iMenu</span>)<BR> <span style="color: #000090;">_SetMenuStatus</span>(<span style="color:#AA0000;">$hListView</span>[<span style="color:#AA0000;">$iMenuIndex</span> - 1], <span style="color:#AA0000;">$hMenu</span>)<BR> <span style="color: #0000FF;">Local</span> <span style="color:#AA0000;">$iMenuId</span> = <span style="color: #000090;">_GUICtrlMenu_TrackPopupMenu</span>(<span style="color:#AA0000;">$hMenu</span>, <span style="color:#AA0000;">$MyGui</span>, -1, -1, 1, 1, 2)<BR> <span style="color: #0000FF;">Switch</span> <span style="color:#AA0000;">$iMenuId</span><BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$iMenuItem1</span><BR> <span style="color: #000090;">RunProgram</span>(1)<BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$iMenuItem2</span><BR> <span style="color: #000090;">RunProgram</span>(2)<BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$iMenuItem3</span><BR> <span style="color: #000090;">Refresh</span>()<BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$iMenuItem4</span><BR> <span style="color: #000090;">Rename</span>()<BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$iMenuItem5</span><BR> <span style="color: #000090;">Delete</span>()<BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$iMenuItem6</span><BR> <span style="color:#AA0000;">$iBkColor</span> = <span style="color: #000090;">_ChooseColor</span>(0, 255, 0, <span style="color:#AA0000;">$MyGui</span>)<BR> <span style="color: #0000FF;">If</span> <span style="color:#AA0000;">$iBkColor</span> <> -1 <span style="color: #0000FF;">Then</span><BR> <span style="color: #000090;">_GUICtrlListView_BeginUpdate</span>(<span style="color:#AA0000;">$hListView</span>[$iPage])<BR> <span style="color: #000090;">_GUICtrlListView_SetBkColor</span>(<span style="color:#AA0000;">$hListView</span>[$iPage], <span style="color:#AA0000;">$iBkColor</span>)<BR> <span style="color: #000090;">_GUICtrlListView_SetTextBkColor</span>(<span style="color:#AA0000;">$hListView</span>[$iPage], <span style="color:#AA0000;">$iBkColor</span>)<BR> <span style="color: #000090;">_GUICtrlListView_EndUpdate</span>(<span style="color:#AA0000;">$hListView</span>[$iPage])<BR> <span style="color: #000090;">IniWrite</span>(<span style="color:#AA0000;">$sConfigPath</span>, 'BkColor', <span style="color:#AA0000;">$hListView</span>[$iPage] - 3, <span style="color:#AA0000;">$iBkColor</span>)<BR> <span style="color: #0000FF;">EndIf</span><BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$iMenuItem7</span><BR> <span style="color:#AA0000;">$nTextColor</span> = <span style="color: #000090;">_ChooseColor</span>(0, 255, 0, <span style="color:#AA0000;">$MyGui</span>)<BR> <span style="color: #0000FF;">If</span> <span style="color:#AA0000;">$nTextColor</span> <> -1 <span style="color: #0000FF;">Then</span><BR> <span style="color: #000090;">_GUICtrlListView_SetTextColor</span>(<span style="color:#AA0000;">$hListView</span>[$iPage], <span style="color:#AA0000;">$nTextColor</span>)<BR> <span style="color: #000090;">IniWrite</span>(<span style="color:#AA0000;">$sConfigPath</span>, 'BkColor', 'TextColor', <span style="color:#AA0000;">$nTextColor</span>)<BR> <span style="color: #0000FF;">EndIf</span><BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$iMenuItem8</span><BR> <span style="color: #0000FF;">If</span> <span style="color: #000090;">MsgBox</span>(32 + 1, '恢复颜色值', '你确定要恢复当页颜色值吗?') = 1 <span style="color: #0000FF;">Then</span><BR> <span style="color: #000090;">_GUICtrlListView_SetTextColor</span>(<span style="color:#AA0000;">$hListView</span>[$iPage], 12615680)<BR> <span style="color: #000090;">_GUICtrlListView_BeginUpdate</span>(<span style="color:#AA0000;">$hListView</span>[$iPage])<BR> <span style="color: #000090;">_GUICtrlListView_SetBkColor</span>(<span style="color:#AA0000;">$hListView</span>[$iPage], <span style="color:#AA0000;">$CLR_MONEYGREEN</span>)<BR> <span style="color: #000090;">_GUICtrlListView_SetTextBkColor</span>(<span style="color:#AA0000;">$hListView</span>[$iPage], <span style="color:#AA0000;">$CLR_MONEYGREEN</span>)<BR> <span style="color: #000090;">_GUICtrlListView_SetOutlineColor</span>(<span style="color:#AA0000;">$hListView</span>[$iPage], <span style="color:#AA0000;">$CLR_MONEYGREEN</span>)<BR> <span style="color: #000090;">_GUICtrlListView_EndUpdate</span>(<span style="color:#AA0000;">$hListView</span>[$iPage])<BR> <span style="color: #000090;">IniWrite</span>(<span style="color:#AA0000;">$sConfigPath</span>, 'BkColor', <span style="color:#AA0000;">$hListView</span>[$iPage] - 3, '12639424')<BR> <span style="color: #000090;">IniWrite</span>(<span style="color:#AA0000;">$sConfigPath</span>, 'BkColor', 'TextColor', '12615680')<BR> <span style="color: #0000FF;">EndIf</span><BR> <span style="color: #0000FF;">EndSwitch</span><BR> <span style="color: #0000FF;">EndSwitch</span><BR> <span style="color:#AA0000;">$tBuffer</span> = 0<BR> <span style="color: #0000FF;">EndSwitch</span><BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>WM_NOTIFY</span><span style="color: #009933;"></span><BR> <BR><span style="color: #F000FF;">Func</span> <span style="color: #000090;">Readall</span>() <span style="color: #009933;">;皮肤</span><span style="color: #009933;"></span><BR> <span style="color: #000090;">_GUICtrlListView_BeginUpdate</span>(<span style="color:#AA0000;">$hListView</span>[0])<BR> <span style="color: #000090;">_GUICtrlListView_DeleteAllItems</span>(<span style="color:#AA0000;">$hListView</span>[0])<BR> <span style="color: #0000FF;">For</span> <span style="color:#AA0000;">$i</span> = 1 <span style="color: #0000FF;">To</span> <span style="color: #000090;">UBound</span>(<span style="color:#AA0000;">$avArray</span>) - 1<BR> <span style="color:#AA0000;">$iNumber</span> = <span style="color: #000090;">IniReadSection</span>(<span style="color:#AA0000;">$sConfigPath</span>, <span style="color:#AA0000;">$avArray</span>[$i])<BR> <span style="color: #0000FF;">If</span> Not <span style="color: #FF33FF;">@error</span> <span style="color: #0000FF;">Then</span><BR> <span style="color: #0000FF;">For</span> <span style="color:#AA0000;">$ii</span> = 1 <span style="color: #0000FF;">To</span> <span style="color:#AA0000;">$iNumber</span>[0][0]<BR> <span style="color: #000090;">CreateGroup</span>(<span style="color:#AA0000;">$hListView</span>[0], <span style="color:#AA0000;">$i</span>, <span style="color:#AA0000;">$avArray</span>[$i], <span style="color:#AA0000;">$iNumber</span>[$ii][1], <span style="color:#AA0000;">$iNumber</span>[$ii][0])<BR> <span style="color: #0000FF;">Next</span><BR> <span style="color: #0000FF;">EndIf</span><BR> <span style="color: #0000FF;">Next</span><BR> <span style="color: #000090;">_GUICtrlListView_EndUpdate</span>(<span style="color:#AA0000;">$hListView</span>[0])<BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>Readall</span><span style="color: #009933;"></span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">Read</span>()<BR> <span style="color: #0000FF;">For</span> <span style="color:#AA0000;">$i</span> = 1 <span style="color: #0000FF;">To</span> <span style="color: #000090;">UBound</span>(<span style="color:#AA0000;">$avArray</span>) - 1<BR> <span style="color: #000090;">_GUICtrlListView_BeginUpdate</span>(<span style="color:#AA0000;">$hListView</span>[$i])<BR> <span style="color: #000090;">_GUICtrlListView_DeleteAllItems</span>(<span style="color:#AA0000;">$hListView</span>[$i])<BR> <span style="color:#AA0000;">$iNumber</span> = <span style="color: #000090;">IniReadSection</span>(<span style="color:#AA0000;">$sConfigPath</span>, <span style="color:#AA0000;">$avArray</span>[$i])<BR> <span style="color: #0000FF;">If</span> Not <span style="color: #FF33FF;">@error</span> <span style="color: #0000FF;">Then</span><BR> <span style="color: #0000FF;">For</span> <span style="color:#AA0000;">$ii</span> = 1 <span style="color: #0000FF;">To</span> <span style="color:#AA0000;">$iNumber</span>[0][0]<BR> <span style="color: #000090;">CreateGroup</span>(<span style="color:#AA0000;">$hListView</span>[$i], 1, <span style="color:#AA0000;">$avArray</span>[$i], <span style="color:#AA0000;">$iNumber</span>[$ii][1], <span style="color:#AA0000;">$iNumber</span>[$ii][0])<BR> <span style="color: #0000FF;">Next</span><BR> <span style="color: #0000FF;">EndIf</span><BR> <span style="color: #000090;">_GUICtrlListView_EndUpdate</span>(<span style="color:#AA0000;">$hListView</span>[$i])<BR> <span style="color: #0000FF;">Next</span><BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>Read</span><span style="color: #009933;"></span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">RunProgram</span>(<span style="color:#AA0000;">$iEvent</span>)<BR> <span style="color:#AA0000;">$iItemIndex</span> = <span style="color: #000090;">GUICtrlRead</span>(<span style="color:#AA0000;">$hListView</span>[$iPage])<BR> <span style="color:#AA0000;">$sItemText</span> = <span style="color: #000090;">GUICtrlRead</span>(<span style="color: #000090;">Number</span>(<span style="color:#AA0000;">$iItemIndex</span>))<BR> <span style="color: #0000FF;">If</span> (<span style="color:#AA0000;">$iItemIndex</span>) <span style="color: #0000FF;">Then</span><BR> <span style="color:#AA0000;">$sFileText</span> = <span style="color: #000090;">FileRead</span>(<span style="color:#AA0000;">$sConfigPath</span>)<BR> <span style="color:#AA0000;">$aSoftPath</span> = <span style="color: #000090;">StringRegExp</span>(<span style="color:#AA0000;">$sFileText</span>, '(?<=' & <span style="color: #000090;">StringRegExpReplace</span>(<span style="color:#AA0000;">$sItemText</span>, <span style="color:#AA0000;">$sConversion</span>, '\\$1') & '=)' & '[^\r]+', 3)<BR> <span style="color:#AA0000;">$sWorkPath</span> = <span style="color: #000090;">StringRegExpReplace</span>(<span style="color:#AA0000;">$aSoftPath</span>[0], '(?<=\\)[^\\]+$', '')<BR> <span style="color: #0000FF;">If</span> <span style="color:#AA0000;">$iEvent</span> = 2 <span style="color: #0000FF;">Then</span> <span style="color: #000090;">ShellExecute</span>(<span style="color:#AA0000;">$sWorkPath</span>)<BR> <span style="color: #0000FF;">If</span> <span style="color:#AA0000;">$iEvent</span> = 1 <span style="color: #0000FF;">Then</span> <span style="color: #000090;">ShellExecute</span>(<span style="color:#AA0000;">$aSoftPath</span>[0], '', <span style="color:#AA0000;">$sWorkPath</span>)<BR> <span style="color: #0000FF;">EndIf</span><BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>RunProgram</span><span style="color: #009933;"></span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">Refresh</span>()<BR> <span style="color: #000090;">Read</span>()<BR> <span style="color: #000090;">Readall</span>()<BR> <span style="color: #AA0000;">$sFileText</span> = <span style="color: #000090;">FileRead</span>(<span style="color: #AA0000;">$sConfigPath</span>) <span style="color: #009933;">;从此前已打开的文本文件中读取指定数量的字符.</span><span style="color: #009933;"></span><BR> <span style="color: #0000FF;">If</span> (<span style="color:#AA0000;">$sFileText</span>) <span style="color: #0000FF;">Then</span><BR> <span style="color: #AA0000;">$handle</span> = <span style="color: #000090;">FileOpen</span>(<span style="color: #AA0000;">$sConfigPath</span>, 2)<span style="color: #009933;">;打开指定的文件以供读写. 2 = 写入模式(先删除之前的内容)</span><span style="color: #009933;"></span><BR> <span style="color: #000090;">FileClose</span>(<span style="color:#AA0000;">$handle</span>)<BR> <span style="color: #000090;">FileWrite</span>(<span style="color:#AA0000;">$sConfigPath</span>, <span style="color: #000090;">StringRegExpReplace</span>(<span style="color:#AA0000;">$sFileText</span>, '^\v+|\r?\n(?=\r?\n)|\r?\n$', ''))<BR> <span style="color: #0000FF;">EndIf</span><BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>Refresh</span><span style="color: #009933;"></span><BR> <BR><span style="color: #F000FF;">Func</span> <span style="color: #000090;">Rename</span>() <span style="color: #009933;">;检查是否已经载入软件快捷方式</span><span style="color: #009933;"></span><BR> <span style="color:#AA0000;">$iItemIndex</span> = <span style="color: #000090;">GUICtrlRead</span>(<span style="color:#AA0000;">$hListView</span>[$iPage])<BR> <span style="color:#AA0000;">$sItemText</span> = <span style="color: #000090;">GUICtrlRead</span>(<span style="color: #000090;">Number</span>(<span style="color:#AA0000;">$iItemIndex</span>))<BR> <span style="color:#AA0000;">$sNewName</span> = <span style="color: #000090;">InputBox</span>('重命名', '原文件名:' & <span style="color:#AA0000;">$sItemText</span> & <span style="color: #FF33FF;">@CRLF</span> & <span style="color: #FF33FF;">@CRLF</span> & '请输入新的名称!', <span style="color:#AA0000;">$sItemText</span>)<BR> <span style="color: #0000FF;">If</span> (<span style="color:#AA0000;">$sNewName</span>) <span style="color: #0000FF;">Then</span><BR> <span style="color: #0000FF;">If</span> <span style="color: #000090;">Detect</span>(<span style="color:#AA0000;">$sNewName</span>) <span style="color: #0000FF;">Then</span><BR> <span style="color: #000090;">MsgBox</span>(48, '提示!', <span style="color:#AA0000;">$sNewName</span> & ':已经存在,为避免出错,请勿重复设置!')<BR> <span style="color: #0000FF;">Else</span><BR> <span style="color: #000090;">GUICtrlSetData</span>(<span style="color:#AA0000;">$iItemIndex</span>, <span style="color:#AA0000;">$sNewName</span>)<BR> <span style="color:#AA0000;">$sFileText</span> = <span style="color: #000090;">FileRead</span>(<span style="color:#AA0000;">$sConfigPath</span>)<BR> <span style="color:#AA0000;">$handle</span> = <span style="color: #000090;">FileOpen</span>(<span style="color:#AA0000;">$sConfigPath</span>, 2)<BR> <span style="color: #000090;">FileClose</span>(<span style="color:#AA0000;">$handle</span>)<BR> <span style="color:#AA0000;">$sReplace</span> = <span style="color: #000090;">StringRegExpReplace</span>(<span style="color:#AA0000;">$sFileText</span>, <span style="color: #000090;">StringRegExpReplace</span>(<span style="color:#AA0000;">$sItemText</span>, <span style="color:#AA0000;">$sConversion</span>, '\\$1') & '=', <span style="color:#AA0000;">$sNewName</span> & '=')<BR> <span style="color: #000090;">FileWrite</span>(<span style="color:#AA0000;">$sConfigPath</span>, <span style="color:#AA0000;">$sReplace</span>)<BR> <span style="color: #0000FF;">If</span> <span style="color:#AA0000;">$iPage</span> = 0 <span style="color: #0000FF;">Then</span><BR> <span style="color: #000090;">Read</span>()<BR> <span style="color: #0000FF;">Else</span><BR> <span style="color: #000090;">Readall</span>()<BR> <span style="color: #0000FF;">EndIf</span><BR> <span style="color: #0000FF;">EndIf</span><BR> <span style="color: #0000FF;">EndIf</span><BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>Rename</span><span style="color: #009933;"></span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">Delete</span>()<BR> <span style="color:#AA0000;">$iItemIndex</span> = <span style="color: #000090;">GUICtrlRead</span>(<span style="color:#AA0000;">$hListView</span>[$iPage])<BR> <span style="color:#AA0000;">$sItemText</span> = <span style="color: #000090;">GUICtrlRead</span>(<span style="color: #000090;">Number</span>(<span style="color:#AA0000;">$iItemIndex</span>))<BR> <span style="color: #0000FF;">If</span> <span style="color: #000090;">MsgBox</span>(32 + 1, '温馨提示!', '你确定要删除 ' & <span style="color:#AA0000;">$sItemText</span> & ' 吗?') = 1 <span style="color: #0000FF;">Then</span><BR> <span style="color:#AA0000;">$sText</span> = <span style="color: #000090;">FileRead</span>(<span style="color:#AA0000;">$sConfigPath</span>)<BR> <span style="color: #000090;">GUICtrlDelete</span>(<span style="color:#AA0000;">$iItemIndex</span>)<BR> <span style="color:#AA0000;">$handle</span> = <span style="color: #000090;">FileOpen</span>(<span style="color:#AA0000;">$sConfigPath</span>, 2)<BR> <span style="color: #000090;">FileClose</span>(<span style="color:#AA0000;">$handle</span>)<BR> <span style="color: #000090;">FileWrite</span>(<span style="color:#AA0000;">$sConfigPath</span>, <span style="color: #000090;">StringRegExpReplace</span>(<span style="color:#AA0000;">$sText</span>, '(?i)' & <span style="color: #000090;">StringRegExpReplace</span>(<span style="color:#AA0000;">$sItemText</span>, <span style="color:#AA0000;">$sConversion</span>, '\\$1') & '=[a-z]:\\.+\r?\n?', ''))<BR> <BR> <span style="color: #0000FF;">If</span> <span style="color:#AA0000;">$iPage</span> = 0 <span style="color: #0000FF;">Then</span><BR> <span style="color: #000090;">Read</span>()<BR> <span style="color: #0000FF;">Else</span><BR> <span style="color: #000090;">Readall</span>()<BR> <span style="color: #0000FF;">EndIf</span><BR> <span style="color: #0000FF;">EndIf</span><BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>Delete</span><span style="color: #009933;"></span><BR> <BR><span style="color: #F000FF;">Func</span> <span style="color: #000090;">AddItem</span>(<span style="color: #AA0000;">$SoftwareType</span>, <span style="color: #AA0000;">$SoftwarePath</span>, <span style="color: #AA0000;">$SoftwareName</span> = '') <span style="color: #009933;">;读取快捷方式</span><span style="color: #009933;"></span><BR> <span style="color: #0000FF;">If</span> <span style="color:#AA0000;">$SoftwarePath</span> = '' <span style="color: #0000FF;">Then</span> <span style="color: #0000FF;">Return</span> <span style="color: #000090;">MsgBox</span>(48, '提示!', '请设置程序所在目录!')<BR> <BR> <span style="color: #0000FF;">If</span> <span style="color: #000090;">StringRegExp</span>(<span style="color:#AA0000;">$SoftwarePath</span>, '\.lnk') <span style="color: #0000FF;">Then</span><BR> <span style="color: #AA0000;">$aShortcut</span> = <span style="color: #000090;">FileGetShortcut</span>(<span style="color: #AA0000;">$SoftwarePath</span>) <span style="color: #009933;">;获取指定快捷方式的各种属性.</span><span style="color: #009933;"></span><BR> <span style="color:#AA0000;">$SoftwarePath</span> = <span style="color:#AA0000;">$aShortcut</span>[0]<BR> <span style="color: #0000FF;">EndIf</span><BR> <BR> <span style="color: #0000FF;">If</span> <span style="color:#AA0000;">$SoftwareName</span> = '' <span style="color: #0000FF;">Then</span> <span style="color:#AA0000;">$SoftwareName</span> = <span style="color: #000090;">StringRegExpReplace</span>(<span style="color:#AA0000;">$SoftwarePath</span>, '.+\\|\.\w+$', '')<BR> <span style="color: #0000FF;">If</span> <span style="color: #000090;">Detect</span>(<span style="color:#AA0000;">$SoftwareName</span>) <span style="color: #0000FF;">Then</span> <span style="color: #0000FF;">Return</span> <span style="color: #000090;">MsgBox</span>(48, '提示!', <span style="color:#AA0000;">$SoftwareName</span> & ':已经存在,为避免出错,请勿重复设置!')<BR> <BR> <span style="color: #0000FF;">Switch</span> <span style="color:#AA0000;">$SoftwareType</span><BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$avArray</span>[1]<BR> <span style="color:#AA0000;">$iGroupID</span> = 1<BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$avArray</span>[2]<BR> <span style="color:#AA0000;">$iGroupID</span> = 2<BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$avArray</span>[3]<BR> <span style="color:#AA0000;">$iGroupID</span> = 3<BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$avArray</span>[4]<BR> <span style="color:#AA0000;">$iGroupID</span> = 4<BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$avArray</span>[5]<BR> <span style="color:#AA0000;">$iGroupID</span> = 5<BR> <span style="color: #0000FF;">EndSwitch</span><BR> <BR> <span style="color: #000090;">CreateGroup</span>(<span style="color:#AA0000;">$hListView</span>[0], <span style="color:#AA0000;">$iGroupID</span>, <span style="color:#AA0000;">$SoftwareType</span>, <span style="color:#AA0000;">$SoftwarePath</span>, <span style="color:#AA0000;">$SoftwareName</span>)<BR> <span style="color: #000090;">CreateGroup</span>(<span style="color:#AA0000;">$hListView</span>[$iGroupID], 1, <span style="color:#AA0000;">$SoftwareType</span>, <span style="color:#AA0000;">$SoftwarePath</span>, <span style="color:#AA0000;">$SoftwareName</span>)<BR> <span style="color: #000090;">IniWrite</span>(<span style="color:#AA0000;">$sConfigPath</span>, <span style="color:#AA0000;">$SoftwareType</span>, <span style="color:#AA0000;">$SoftwareName</span>, <span style="color:#AA0000;">$SoftwarePath</span>)<BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>AddItem</span><span style="color: #009933;"></span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">CreateGroup</span>(<span style="color:#AA0000;">$hWnd</span>, <span style="color:#AA0000;">$iGroupID</span>, <span style="color:#AA0000;">$sGroupText</span>, <span style="color:#AA0000;">$sFilePath</span>, <span style="color:#AA0000;">$sFileName</span> = '')<BR> <span style="color: #009933;">;函数功能:在指定分组中添加项目</span><span style="color: #009933;"></span><BR> <span style="color: #009933;">;参数说明</span><span style="color: #009933;"></span><BR> <span style="color: #009933;">;参数1:控件句柄</span><span style="color: #009933;"></span><BR> <span style="color: #009933;">;参数2:组编号</span><span style="color: #009933;"></span><BR> <span style="color: #009933;">;参数3:组文本</span><span style="color: #009933;"></span><BR> <span style="color: #009933;">;参数4:文件路径</span><span style="color: #009933;"></span><BR> <span style="color: #009933;">;参数5:文件名(可选)</span><span style="color: #009933;"></span><BR> <BR> <span style="color: #000090;">GUICtrlCreateListViewItem</span>(<span style="color:#AA0000;">$sFileName</span>, <span style="color:#AA0000;">$hWnd</span>)<BR> <span style="color: #0000FF;">If</span> <span style="color: #000090;">StringRegExp</span>(<span style="color:#AA0000;">$sFilePath</span>, '(?i)[a-z]:\\.+\.\w+$') = 0 <span style="color: #0000FF;">Then</span><BR> <span style="color: #000090;">GUICtrlSetImage</span>(-1, 'shell32.dll', 4)<BR> ElseIf <span style="color: #000090;">StringRegExp</span>(<span style="color:#AA0000;">$sFilePath</span>, '(?i)\.exe|\.ico') <span style="color: #0000FF;">Then</span><BR> <span style="color: #000090;">GUICtrlSetImage</span>(-1, <span style="color:#AA0000;">$sFilePath</span>)<BR> <span style="color: #0000FF;">Else</span><BR> <span style="color: #000090;">GUICtrlSetImage</span>(-1, <span style="color: #000090;">_WinAPI_FindExecutable</span>(<span style="color: #AA0000;">$sFilePath</span>))<span style="color: #009933;">;检索与指定文件名相关联的可执行文件的名称</span><span style="color: #009933;"></span><BR> <span style="color: #0000FF;">EndIf</span><BR> <BR> <span style="color: #AA0000;">$iNumber</span> = <span style="color: #000090;">_GUICtrlListView_GetCounterPage</span>(<span style="color: #AA0000;">$hWnd</span>) - 1 <span style="color: #009933;">;计算在可视区域中,垂直显示的项目数量.</span><span style="color: #009933;"></span><BR> <span style="color: #000090;">_GUICtrlListView_EnableGroupView</span>(<span style="color: #AA0000;">$hWnd</span>)<span style="color: #009933;">;启用或禁用控件项目分组</span><span style="color: #009933;"></span><BR> <span style="color: #000090;">_GUICtrlListView_InsertGroup</span>(<span style="color: #AA0000;">$hWnd</span>, -1, <span style="color: #AA0000;">$iGroupID</span>, <span style="color: #AA0000;">$sGroupText</span> & ' ') <span style="color: #009933;">;插入组</span><span style="color: #009933;"></span><BR> <span style="color: #000090;">_GUICtrlListView_SetItemGroupID</span>(<span style="color: #AA0000;">$hWnd</span>, <span style="color: #AA0000;">$iNumber</span>, <span style="color: #AA0000;">$iGroupID</span>)<span style="color: #009933;">;设置项目组 ID</span><span style="color: #009933;"></span><BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>CreateGroup</span><span style="color: #009933;"></span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">Switcha</span>(<span style="color:#AA0000;">$hWnd</span>, <span style="color:#AA0000;">$Type</span>)<BR> <span style="color: #000090;">GUICtrlSetData</span>(<span style="color: #AA0000;">$hType</span>, <span style="color: #AA0000;">$Type</span>)<span style="color: #009933;">;$hType = GUICtrlCreateLabel($avArray[0], 70, 583, 60, 17)</span><span style="color: #009933;"></span><BR> <span style="color: #0000FF;">If</span> <span style="color:#AA0000;">$Type</span> <> <span style="color:#AA0000;">$avArray</span>[0] <span style="color: #0000FF;">Then</span> <span style="color: #000090;">GUICtrlSetData</span>(<span style="color:#AA0000;">$Combo1</span>, <span style="color:#AA0000;">$Type</span>)<BR> <span style="color: #000090;">ControlMove</span>(<span style="color: #AA0000;">$MyGui</span>, '', <span style="color: #AA0000;">$hListView</span>[$hWnd], 1000, Default)<span style="color: #009933;">;在窗口内移动控件.</span><span style="color: #009933;"></span><BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>Switcha</span><span style="color: #009933;"></span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">Switchb</span>(<span style="color:#AA0000;">$hWnd</span>)<BR> <span style="color: #AA0000;">$iView</span> = <span style="color: #000090;">_GUICtrlListView_GetView</span>(<span style="color: #AA0000;">$hListView</span>[$hWnd]) <span style="color: #009933;">;检索控件的当前视图</span><span style="color: #009933;"></span><BR> <span style="color: #0000FF;">Select</span><BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$iView</span> = 1<BR> <span style="color: #000090;">GUICtrlSetState</span>(<span style="color:#AA0000;">$Radio1</span>, 1)<BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$iView</span> = 2<BR> <span style="color: #000090;">GUICtrlSetState</span>(<span style="color:#AA0000;">$Radio2</span>, 1)<BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$iView</span> = 3<BR> <span style="color: #000090;">GUICtrlSetState</span>(<span style="color:#AA0000;">$Radio3</span>, 1)<BR> <span style="color: #0000FF;">Case</span> <span style="color:#AA0000;">$iView</span> = 4<BR> <span style="color: #000090;">GUICtrlSetState</span>(<span style="color:#AA0000;">$Radio4</span>, 1)<BR> <span style="color: #0000FF;">EndSelect</span><BR> <span style="color: #000090;">ControlMove</span>(<span style="color:#AA0000;">$MyGui</span>, '', <span style="color:#AA0000;">$hListView</span>[$hWnd], 115, Default)<BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>Switchb</span><span style="color: #009933;"></span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">Detect</span>(<span style="color:#AA0000;">$sText</span>)<BR> <span style="color: #0000FF;">If</span> <span style="color: #000090;">StringRegExp</span>(<span style="color: #000090;">FileRead</span>(<span style="color:#AA0000;">$sConfigPath</span>), '(?i)' & <span style="color: #000090;">StringRegExpReplace</span>(<span style="color:#AA0000;">$sText</span>, <span style="color:#AA0000;">$sConversion</span>, '\\$1') & '=[a-z]:\\') <span style="color: #0000FF;">Then</span><BR> <span style="color: #0000FF;">Return</span> True<BR> <span style="color: #0000FF;">Else</span><BR> <span style="color: #0000FF;">Return</span> False<BR> <span style="color: #0000FF;">EndIf</span><BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>Detect</span><span style="color: #009933;"></span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">WM_DROPFILES</span>(<span style="color:#AA0000;">$hWnd</span>, <span style="color:#AA0000;">$msgID</span>, <span style="color:#AA0000;">$wParam</span>, <span style="color:#AA0000;">$lParam</span>)<BR> <span style="color: #0000FF;">Local</span> <span style="color:#AA0000;">$nSize</span>, <span style="color:#AA0000;">$pFileName</span><BR> <span style="color: #0000FF;">Local</span> <span style="color:#AA0000;">$nAmt</span> = <span style="color: #000090;">DllCall</span>("shell32.dll", "int", "DragQueryFile", "hwnd", <span style="color:#AA0000;">$wParam</span>, "int", 0xFFFFFFFF, "ptr", 0, "int", 255)<BR> <span style="color:#AA0000;">$aDroppedFiles</span> = 0<BR> Dim <span style="color:#AA0000;">$aDroppedFiles</span>[<span style="color:#AA0000;">$nAmt</span>[0] + 1]<BR> <span style="color: #0000FF;">For</span> <span style="color:#AA0000;">$i</span> = 0 <span style="color: #0000FF;">To</span> <span style="color:#AA0000;">$nAmt</span>[0] - 1<BR> <span style="color:#AA0000;">$nSize</span> = <span style="color: #000090;">DllCall</span>("shell32.dll", "int", "DragQueryFile", "hwnd", <span style="color:#AA0000;">$wParam</span>, "int", <span style="color:#AA0000;">$i</span>, "ptr", 0, "int", 0)<BR> <span style="color:#AA0000;">$nSize</span> = <span style="color:#AA0000;">$nSize</span>[0] + 1<BR> <span style="color:#AA0000;">$pFileName</span> = <span style="color: #000090;">DllStructCreate</span>("char[" & <span style="color:#AA0000;">$nSize</span> & "]")<BR> <span style="color: #000090;">DllCall</span>("shell32.dll", "int", "DragQueryFile", "hwnd", <span style="color:#AA0000;">$wParam</span>, "int", <span style="color:#AA0000;">$i</span>, "ptr", _<BR> <span style="color: #000090;">DllStructGetPtr</span>(<span style="color:#AA0000;">$pFileName</span>), "int", <span style="color:#AA0000;">$nSize</span>)<BR> <BR> <span style="color:#AA0000;">$aDroppedFiles</span>[0] += 1<BR> <span style="color:#AA0000;">$aDroppedFiles</span>[<span style="color:#AA0000;">$aDroppedFiles</span>[0]] = <span style="color: #000090;">DllStructGetData</span>(<span style="color:#AA0000;">$pFileName</span>, 1)<BR> <span style="color:#AA0000;">$pFileName</span> = 0<BR> <span style="color: #0000FF;">Next</span><BR> ReDim <span style="color:#AA0000;">$aDroppedFiles</span>[<span style="color:#AA0000;">$aDroppedFiles</span>[0] + 1]<BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>WM_DROPFILES</span><span style="color: #009933;"></span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">SpecialEvent</span>()<BR> <span style="color: #F000FF;">If</span> <span style="color: #000090;">WinGetState</span>(<span style="color: #AA0000;">$MyGui</span>) = 7 <span style="color: #F000FF;">Then</span> <span style="color: #009933;">;获取指定窗口的状态.</span><span style="color: #009933;"></span><BR> <span style="color: #000090;">GUISetState</span>(<span style="color: #FF33FF;">@SW_MINIMIZE</span>)<span style="color: #009933;">;@SW_MINIMIZE 最小化指定窗口并激活下一个在Z轴(垂直屏幕)方向上的顶层窗口.</span><span style="color: #009933;"></span><BR> <span style="color: #0000FF;">Else</span><BR> <span style="color: #000090;">GUISetState</span>(<span style="color: #FF33FF;">@SW_RESTORE</span>)<span style="color: #009933;">;@SW_RESTORE 序在还原一个最小化窗口时应该应用此标志</span><span style="color: #009933;"></span><BR> <span style="color: #0000FF;">EndIf</span><BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>SpecialEvent</span><span style="color: #009933;"></span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">WM_COMMAND</span>(<span style="color:#AA0000;">$hWnd</span>, <span style="color:#AA0000;">$iMsg</span>, <span style="color:#AA0000;">$iwParam</span>, <span style="color:#AA0000;">$ilParam</span>)<BR> <span style="color: #0000FF;">Local</span> <span style="color:#AA0000;">$iCode</span><BR> <span style="color: #AA0000;">$iCode</span> = <span style="color: #000090;">BitShift</span>(<span style="color: #AA0000;">$iwParam</span>, 16) <span style="color: #009933;">; Hi Word ;按位"移"运算.</span><span style="color: #009933;"></span><BR> <span style="color: #F000FF;">If</span> <span style="color: #AA0000;">$iCode</span> = <span style="color: #AA0000;">$CBN_SELCHANGE</span> <span style="color: #F000FF;">Then</span><span style="color: #009933;">;组合框的列表框中的当前选项改变时发送</span><span style="color: #009933;"></span><BR> <span style="color:#AA0000;">$nSkin</span> = <span style="color: #000090;">GUICtrlRead</span>(<span style="color:#AA0000;">$hSkin</span>)<BR> <span style="color: #0000FF;">If</span> <span style="color:#AA0000;">$oSkin</span> <> <span style="color:#AA0000;">$nSkin</span> <span style="color: #0000FF;">Then</span><BR> <span style="color: #000090;">Skin</span>(<span style="color:#AA0000;">$nSkin</span>)<BR> <span style="color:#AA0000;">$oSkin</span> = <span style="color:#AA0000;">$nSkin</span><BR> <span style="color: #000090;">IniWrite</span>(<span style="color:#AA0000;">$sConfigPath</span>, 'Skin', 'Default', <span style="color: #000090;">GUICtrlRead</span>(<span style="color:#AA0000;">$hSkin</span>))<BR> <span style="color: #0000FF;">EndIf</span><BR> <span style="color: #0000FF;">EndIf</span><BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>WM_COMMAND</span><span style="color: #009933;"></span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">Enter</span>()<BR> <span style="color: #0000FF;">If</span> Not <span style="color: #000090;">WinActive</span>(<span style="color:#AA0000;">$MyGui</span>) <span style="color: #0000FF;">Then</span><BR> <span style="color: #000090;">HotKeySet</span>('{Enter}')<BR> <span style="color: #000090;">Send</span>('{Enter}')<BR> <span style="color: #000090;">HotKeySet</span>('{Enter}', 'Enter')<BR> <span style="color: #0000FF;">Else</span><BR> <span style="color: #000090;">RunProgram</span>(1)<BR> <span style="color: #0000FF;">EndIf</span><BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>Enter</span><span style="color: #009933;"></span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">Skin</span>(<span style="color:#AA0000;">$She</span>)<BR> <span style="color:#AA0000;">$hDll</span> = <span style="color: #000090;">DllOpen</span>(<span style="color: #FF33FF;">@ScriptDir</span> & '\Skin\Skin.dll')<BR> <span style="color: #0000FF;">If</span> <span style="color:#AA0000;">$She</span> = '去掉皮肤' <span style="color: #0000FF;">Then</span> <span style="color: #0000FF;">Return</span> <span style="color: #000090;">DllCall</span>(<span style="color:#AA0000;">$hDll</span>, "int", "SkinH_Detach")<BR> <BR> <span style="color: #000090;">DllCall</span>(<span style="color:#AA0000;">$hDll</span>, "int", "SkinH_AttachEx", "str", 'Skin\' & <span style="color:#AA0000;">$She</span> & '.she', "str", "mhgd")<BR> <span style="color: #000090;">DllCall</span>(<span style="color:#AA0000;">$hDll</span>, "int", "SkinH_SetAero", "int", 1)<BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>Skin</span><span style="color: #009933;"></span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">Memory</span>()<BR> <span style="color: #000090;">_ReduceMemory</span>(<span style="color: #FF33FF;">@AutoItPID</span>) <span style="color: #009933;">;@AutoItPID 当前运行脚本的进程 PID</span><span style="color: #009933;"></span><BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>Memory</span><span style="color: #009933;"></span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">_ReduceMemory</span>(<span style="color:#AA0000;">$i_PID</span> = -1)<BR> <span style="color: #0000FF;">If</span> <span style="color:#AA0000;">$i_PID</span> <> -1 <span style="color: #0000FF;">Then</span><BR> <span style="color: #0000FF;">Local</span> <span style="color:#AA0000;">$ai_Handle</span> = <span style="color: #000090;">DllCall</span>("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', <span style="color:#AA0000;">$i_PID</span>)<BR> <span style="color: #0000FF;">Local</span> <span style="color:#AA0000;">$ai_Return</span> = <span style="color: #000090;">DllCall</span>("psapi.dll", 'int', 'EmptyWorkingSet', 'long', <span style="color:#AA0000;">$ai_Handle</span>[0])<BR> <span style="color: #000090;">DllCall</span>('kernel32.dll', 'int', 'CloseHandle', 'int', <span style="color:#AA0000;">$ai_Handle</span>[0])<BR> <span style="color: #0000FF;">Else</span><BR> <span style="color: #0000FF;">Local</span> <span style="color:#AA0000;">$ai_Return</span> = <span style="color: #000090;">DllCall</span>("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1)<BR> <span style="color: #0000FF;">EndIf</span><BR> <BR> <span style="color: #0000FF;">Return</span> <span style="color:#AA0000;">$ai_Return</span>[0]<BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>_ReduceMemory</span><span style="color: #009933;"></span><BR> <BR><span style="color: #0000FF;">Func</span> <span style="color: #000090;">_SetMenuStatus</span>(<span style="color:#AA0000;">$hWnd</span>, <span style="color:#AA0000;">$hMenu</span>)<BR> <span style="color: #0000FF;">If</span> <span style="color: #000090;">GUICtrlRead</span>(<span style="color:#AA0000;">$hWnd</span>) <span style="color: #0000FF;">Then</span><BR> <span style="color: #000090;">GUICtrlSetState</span>(<span style="color:#AA0000;">$iMenuItem1</span>, 64)<BR> <span style="color: #000090;">GUICtrlSetState</span>(<span style="color:#AA0000;">$iMenuItem2</span>, 64)<BR> <span style="color: #000090;">GUICtrlSetState</span>(<span style="color:#AA0000;">$iMenuItem4</span>, 64)<BR> <span style="color: #000090;">GUICtrlSetState</span>(<span style="color:#AA0000;">$iMenuItem5</span>, 64)<BR> <span style="color: #0000FF;">Else</span><BR> <span style="color: #000090;">GUICtrlSetState</span>(<span style="color:#AA0000;">$iMenuItem1</span>, 128)<BR> <span style="color: #000090;">GUICtrlSetState</span>(<span style="color:#AA0000;">$iMenuItem2</span>, 128)<BR> <span style="color: #000090;">GUICtrlSetState</span>(<span style="color:#AA0000;">$iMenuItem4</span>, 128)<BR> <span style="color: #000090;">GUICtrlSetState</span>(<span style="color:#AA0000;">$iMenuItem5</span>, 128)<BR> <span style="color: #0000FF;">EndIf</span><BR><span style="color: #F000FF;">EndFunc</span> <span style="color: #009933;">;==>_SetMenuStatus</span><span style="color: #009933;"></span><BR>