Opened 18 years ago
Closed 18 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 by , 18 years ago
comment:2 by , 18 years ago
I think it has been solved in 3.2.13.1. Can you verified with the latest beta?
Thanks
comment:3 by , 18 years ago
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
follow-up: 5 comment:4 by , 18 years ago
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 by , 18 years ago
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 by , 18 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
| Version: | 3.2.12.0 → 3.2.13.1 |

And the script to reproduce the issue?