Jump to content

Recommended Posts

Posted

hello guys i made a code one of my first but advanced in other programming langues

#include <GUIConstantsEx.au3>

GUICreate("StyleYourPC", 400, 300)
GUICtrlCreateLabel("Hello... You wanna style your PC?", 30, 10)
GUICtrlCreateButton("Yes I want", 70, 50, 60)
GUICtrlCreateButton ("No I dont", 130,50, 100 )
GUISetState(@SW_SHOW)
Sleep(2000)
while 1 MsgBox(3, "you clicked yes", "That is the good awnser")
Wend
While 2 MsgBox(0, "You dumbass", "Wrong Awnser stupid ess")
    Wend

but i already discoverd i need to make for my buttos but how to do that so i cant get something when i click on yes i get the yes message when i click on no i get the no message

already thanked jesse

Posted (edited)

#include <GUIConstantsEx.au3>

GUICreate("StyleYourPC", 400, 300)
GUICtrlCreateLabel("Hello... You wanna style your PC?", 30, 10)
$But_YES = GUICtrlCreateButton("Yes I want", 70, 50, 60)
$But_NO = GUICtrlCreateButton ("No I dont", 130,50, 100 )
GUISetState(@SW_SHOW)
While 1
$Msg = GUIGetMsg()
Switch $Msg
Case $But_YES
MsgBox(0, "", "You clicked yes")
Case $But_NO
MsgBox(0, "", "no?")
EndSwitch
WEnd

I typed this code on the spot, it may not be tidied, but it works!

Edited by JasonB

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
×
×
  • Create New...