Sign in to follow this  
Followers 0
Batman

Bleh meep Gui help :S

3 posts in this topic

#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.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

#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

Share this post


Link to post
Share on other sites

Yeah thnx, i didnt know of ElseIf thanks :idiot:


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

Share this post


Link to post
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
Sign in to follow this  
Followers 0