You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1 [AutoIt] Simple Menu Client on Wed Aug 18, 2010 11:30 pm

Top


Contributor
Loading
Kso, I want to help some people on making a simple menu client. Here we go. First, we do the #includes.
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")
Now we head off to the options.
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)
Now we head off the to funcs. What you really need to really run the options.
First one, you really need this.
Code:
While 1
  Sleep(1000)
WEnd
And if you want the whole thing to close once you press on the option menu "Exit" you should have this.
Code:

Func Close()
  Exit
EndFunc
On the about, your going to have a simple Msgbox that says "Oh this and that made this"
So it's like this.
Code:
Func About()
  MsgBox(64, "About", "Made by (Your name here)")
EndFunc
Have any questions. Feel free to pm me.

View previous topic View next topic Back to top  Message [Page 1 of 1]

Related topics

Permissions in this forum:
You cannot reply to topics in this forum