1 [AutoIt] Simple Menu Client Wed Aug 18, 2010 11:30 pm
Top
Contributor
Kso, I want to help some people on making a simple menu client. Here we go. First, we do the #includes.
Simple stuff, right?
Now we go to the main thing. This is what you really need.
First one, you really need this.
So it's like this.
- Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Simple stuff, right?
Now we go to the main thing. This is what you really need.
- Code:
Global $oIE = ObjCreate("Shell.Explorer.2")
Opt("GUIOnEventMode", 1)
$FORM = GUICreate("Gaia", 800, 650)
$GUIActiveX = GUICtrlCreateObj ($oIE, 0, 0, 800, 630)
$oIE.navigate("Gaiaonline.com")
- Code:
$Options = GUICtrlCreateMenu("Options")
$About = GUICtrlCreateMenuItem("About", $Options)
$Rally = GUICtrlCreateMenuItem("Rally", $Options)
$Exit = GUICtrlCreateMenuItem("Exit", $Options)
GUICtrlSetOnEvent($About, "About")
GUICtrlSetOnEvent($Rally, "Rally")
GUICtrlSetOnEvent($Exit, "Close")
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
GUISetState(@SW_SHOW)
First one, you really need this.
- Code:
While 1
Sleep(1000)
WEnd
- Code:
Func Close()
Exit
EndFunc
So it's like this.
- Code:
Func About()
MsgBox(64, "About", "Made by (Your name here)")
EndFunc