Jump to content

GUI Ctrl's and Func's


Recommended Posts

#include <GUIConstants.au3>

GUICreate("CPU-Mach V0.1 - Made by Aces", 300,400)

$shutdown = GUICtrlCreateButton("Power Off", 10, 10, 100, 50)

GUISetState()

While 1

$msg = GuiGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

WEnd

Func poweroff()

MsgBox(0, "Shutdown", "Your CPU will power off when you press OK.")

Shutdown(9)

EndFunc

Func reboot()

Shutdown(3)

EndFunc

Func logoff()

Shutdown(0)

EndFunc

How do I add one of my functions [let's say poweroff()], to the button I added?

~~ AutoIt v3 Minion ~~Name: Kevin "Aces-X" MorrisOrganization: A C DevelopmentE-Mail: AcesX91@acecoding.netOS: XP Professional; Vista package~~ Released Software ~~CPU-Mach: Topic at acecoding.net ForumsProxyzBuddy: Beta testing at the moment, private onlyWHSTool: Not released to the public

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...