本帖最后由 流沙枫 于 2013-6-10 15:58 编辑 #Include <array.au3>
Local $aItemText[3] = ['AU3程序交流', 'AU3中文论坛', 'AU3程序设计']
GUICreate("读取右键菜单文本", 400, 300)
$ListView1 = GUICtrlCreateListView("读取右键菜单文本", 5, 5, 390, 280)
$NaMe = GUICtrlCreateContextMenu($ListView1)
$NaMe1 = GUICtrlCreateMenuItem($aItemText[0], $NaMe)
GUICtrlCreateMenuItem('', $NaMe)
$NaMe2 = GUICtrlCreateMenuItem($aItemText[1], $NaMe)
GUICtrlCreateMenuItem("", $NaMe)
$NaMe3 = GUICtrlCreateMenuItem($aItemText[2], $NaMe)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $NaMe1 To $NaMe3
;~ _ArrayDisplay($nMsg)
MsgBox(0, '', $nMsg&$aItemText[($nMsg - 5) / 2])
Case -3
Exit
EndSwitch
WEnd
$nmsg 怎么得出5 7 9 的值呢? |