#NoTrayIcon
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#PRE_Icon=D:\autoit3\Aut2Exe\Icons\favicon.ico
#PRE_Outfile=MINI菜单.exe
#PRE_Compression=4
#PRE_Res_Comment=MINI菜单
#PRE_Res_Description=MINI菜单
#PRE_Res_Fileversion=1.0.0.0
#PRE_Res_LegalCopyright=by MINI菜单
#PRE_Res_requestedExecutionLevel=None
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiButton.au3>
#include <GuiImageList.au3>
If Not FileExists("menu.ini") Then
IniWrite("menu.ini", "title", "title", "软件菜单")
IniWrite("menu.ini", "command", "菜单名称1", "路径1")
IniWrite("menu.ini", "command", "菜单名称2", "路径2")
IniWrite("menu.ini", "command", "菜单名称3", "路径3")
IniWrite("menu.ini", "command", "菜单名称4", "路径4")
IniWrite("menu.ini", "command", "以此类推", "有多少写多少,最多不超20个为宜")
EndIf
Global $Form
Opt("GUIOnEventMode", 1)
$Command = IniReadSection("menu.ini", "command")
$title = IniRead("menu.ini", "title", "title", "")
$height2 = $Command[0][0] * 45
$Form1 = GUICreate($title, 150, $height2 + 20, -1, -1, BitOR($WS_SYSMENU, $WS_CAPTION, $WS_POPUP, $WS_POPUPWINDOW, $WS_BORDER, $WS_CLIPSIBLINGS))
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
For $I = 1 To $Command[0][0]
$Command[$I][0] = GUICtrlCreateButton($Command[$I][0], 16, 16 + ($I - 1) * 45, 123, 40)
$img = _GUIImageList_Create(32, 32, 5, 1, 0)
_GUIImageList_AddIcon($img, $Command[$I][1], 0, True)
_GUICtrlButton_SetImageList(-1, $img)
GUICtrlSetOnEvent($Command[$I][0], "Command")
Next
;DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form1, "int", 1000, "long", 0x00080000)
GUISetState()
While 1
Sleep(1000)
WEnd
Func Command()
For $I = 1 To UBound($Command, 1) - 1
If @GUI_CtrlId = $Command[$I][0] Then Run($Command[$I][1], StringLeft($Command[$I][1], StringInStr($Command[$I][1], "", 0, -1)))
Next
_exit()
EndFunc ;==>Command
Func _Exit()
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form1, "int", 1000, "long", 0x00090000);渐隐
DllCall($dll, "int:cdecl", "DeInitDecoration")
DllCall($dll, "int:cdecl", "RemoveSkin")
DllClose($dll)
FileDelete(@TempDir & "\SkinCrafterDll.dll")
FileDelete(@TempDir & "\skin.skf")
Exit
EndFunc ;==>_Exit
新手嘛,要多泡论坛哟。