JPPercy Posted September 1, 2008 Posted September 1, 2008 Hello There, I'm having some trouble with Function GUICtrlCreateMenu...An Example:$Menu = GUICtrlCreateMenu( "&File" )When I use in Koda( v: 1.7.0.1 ) - It Works. However it doesn't when I run the Script.--> In Koda, &File == Fileand Running Script == File...Well... I tryed to find help using "Search", but i didn't.Thx for replies... and sorry for my bad English =)
enaiman Posted September 1, 2008 Posted September 1, 2008 It works exactly the same way - have a look at this: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 254, 123, 193, 125) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close") $MenuItem1 = GUICtrlCreateMenu("&File") GUICtrlSetOnEvent(-1, "MenuItem1Click") $MenuItem2 = GUICtrlCreateMenuItem("Dem&o", $MenuItem1) GUICtrlSetOnEvent(-1, "MenuItem2Click") $MenuItem3 = GUICtrlCreateMenuItem("E&xit", $MenuItem1) GUICtrlSetOnEvent(-1, "MenuItem3Click") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func Form1Close() Exit EndFunc Func MenuItem1Click() EndFunc Func MenuItem2Click() EndFunc Func MenuItem3Click() EndFunc In order to see the underline you have to press "Alt" key. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
JPPercy Posted September 1, 2008 Author Posted September 1, 2008 Oh... I actually wanted to do it without pressing "Alt". hummm... Thank you anyway...
AdmiralAlkex Posted September 2, 2008 Posted September 2, 2008 Oh... I actually wanted to do it without pressing "Alt".hummm... Thank you anyway... You could always change that setting in Windows so they are always visible .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now