Opened 16 years ago
Closed 16 years ago
#399 closed Bug (No Bug)
Advanced Mode with GuiCtrlRead for Context Menu
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.2.13.1 | Severity: | None |
Keywords: | Cc: |
Description
GUICtrlRead(@GUI_CtrlId,1)
With AutoIt 3.2.12.0, it always return "-1" instead of the text of the control (Context Menu)
It work perfectly with 3.2.10.0
Attachments (0)
Change History (6)
comment:1 Changed 16 years ago by Valik
comment:2 Changed 16 years ago by jpm
I think it has been solved in 3.2.13.1. Can you verified with the latest beta?
Thanks
comment:3 Changed 16 years ago by dgz
I tried with 3.2.13.3 beta but it's still the same.
@Valik: here is a sample script:
#include <GUIConstantsEx.au3>
Opt("GUIOnEventMode", 1)
GUICreate ("Test", 200, 200)
$contextmenu = GUICtrlCreateContextMenu()
GUICtrlCreateMenuItem ("Item 1", $contextmenu)
GUICtrlSetOnEvent (-1, "ItemInfo")
GUICtrlCreateMenuItem ("Item 2", $contextmenu)
GUICtrlSetOnEvent (-1, "ItemInfo")
GUICtrlCreateMenuItem ("Item 3", $contextmenu)
GUICtrlSetOnEvent (-1, "ItemInfo")
GUICtrlCreateMenuItem ("Item 4", $contextmenu)
GUICtrlSetOnEvent (-1, "ItemInfo")
GUISetState ()
While 1
WEnd
Func ItemInfo ()
MsgBox (0,0,GUICtrlRead(@GUI_CtrlId,1))
EndFunc
comment:4 follow-up: ↓ 5 Changed 16 years ago by Gary
3.2.13.3 works for me.
Are you sure you ran it in beta?
#include <GUIConstantsEx.au3> MsgBox(4096, "AutoIt Version", @AutoItVersion) Opt("GUIOnEventMode", 1) GUICreate("Test", 200, 200) $contextmenu = GUICtrlCreateContextMenu() GUICtrlCreateMenuItem("Item 1", $contextmenu) GUICtrlSetOnEvent(-1, "ItemInfo") GUICtrlCreateMenuItem("Item 2", $contextmenu) GUICtrlSetOnEvent(-1, "ItemInfo") GUICtrlCreateMenuItem("Item 3", $contextmenu) GUICtrlSetOnEvent(-1, "ItemInfo") GUICtrlCreateMenuItem("Item 4", $contextmenu) GUICtrlSetOnEvent(-1, "ItemInfo") GUISetState() While 1 WEnd Func ItemInfo() MsgBox(0, 0, GUICtrlRead(@GUI_CtrlId, 1)) EndFunc ;==>ItemInfo
comment:5 in reply to: ↑ 4 Changed 16 years ago by dgz
Sorry, It's the first time I run Beta, and believed it replace the old version.
It's ok with 3.2.13.3. Thanks
comment:6 Changed 16 years ago by Jpm
- Resolution set to No Bug
- Status changed from new to closed
- Version changed from 3.2.12.0 to 3.2.13.1
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
And the script to reproduce the issue?