Jump to content

Bleh meep Gui help :S


Batman
 Share

Recommended Posts

#include <GUIConstants.au3>

GUICreate ("Quick Launch", 200, 100)

GUICtrlCreateLabel("Select Programme", 10 , 10)

$Andybot = GUICtrlCreateButton ("AndyBot", 25, 25, 90)

$DiabloII = GUICtrlCreateButton ("Diablo II", 25, 49, 90)

GuiSetState(@SW_SHOW)

While 1

$msg = GUIGetMsg ( )

If $msg = $Andybot Then

MsgBox(0, "Andybot.exe", "You Selected Abot.exe in the future it will run")

ExitLoop

Wend

While 1

$msg = GUIGetMsg ( )

If $msg = $DiabloII Then

MsgBox(0, "DiabloII.exe", "You Selected DiabloII.exe in the future it will run")

ExitLoop

Wend

Script~

Should i be using something else other than Then and ifs? i tried select and it didnt work either

War does not determine who is right, it determines who is left.

Link to comment
Share on other sites

#include <GUIConstants.au3>

GUICreate ("Quick Launch", 200, 100)
GUICtrlCreateLabel("Select Programme", 10 , 10)
$Andybot = GUICtrlCreateButton ("AndyBot", 25, 25, 90)
$DiabloII = GUICtrlCreateButton ("Diablo II", 25, 49, 90)
GuiSetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg ()
    If $msg = $Andybot Then; If $Andybot button is clicked.
        MsgBox(0, "Andybot.exe", "You Selected Abot.exe in the future it will run")
        ExitLoop
    ElseIf $msg = $DiabloII Then; If $DiabloII button is clicked.
        MsgBox(0, "DiabloII.exe", "You Selected DiabloII.exe in the future it will run") 
        ExitLoop
    EndIf
Wend

Not totally sure what you wanted, but it looks to me like you want to click a button, then have the GUI close. So that's what this does.

Try that.

Edited by Saunders
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...