;窗体的右键菜单,请参考
;autoit3\Examples\GUI\Advanced\contextmenu.au3
;
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 449, 192, 114)
$contextmenu = GUICtrlCreateContextMenu()
$item1 = GUICtrlCreateMenuItem ( "执行C:\WINDOWS\notepad.exe veket_linux.txt", $contextmenu)
$item2 = GUICtrlCreateMenuItem ( "退出", $contextmenu)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $item1
$cmd = InputBox("请输入命令", "例如:" & @CRLF & "C:\WINDOWS\1.exe max", "C:\WINDOWS\notepad.exe ""C:\Program Files\WinRAR\ReadMe.txt""")
Run($cmd)
Case $item2
Exit
EndSwitch
WEnd
想选择文件就 用
FileOpenDialog 函数 ......... |