Modify

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 Valik, 18 years ago

And the script to reproduce the issue?

comment:2 by J-Paul Mesnage, 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 dgz, 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

comment:4 by Gary, 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

in reply to:  4 comment:5 by dgz, 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 J-Paul Mesnage, 18 years ago

Resolution: No Bug
Status: newclosed
Version: 3.2.12.03.2.13.1

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.