Jump to content
Sign in to follow this  
AzKay

How Can I Make The "Send" Button Call The Func?

Recommended Posts

; Ive, Decided to try using GUI's, Because, Ill have to learn sooner or later..
; Ok, Say this is my script, How can I make it call the "MsBox" function when I press "Send" button?
; Thanks


#include <GUIConstants.au3>

$Form1 = GUICreate("Form", 497, 329, 192, 125)
$_Send = GUICtrlCreateButton("Send", 8, 296, 481, 25)
GUISetState(@SW_SHOW)

While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;;;;;
    EndSelect
WEnd
Exit

Func MsBox()
    MsgBox(0, "", "")
EndFunc


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

#include <GUIConstants.au3>

$Form1 = GUICreate("Form", 497, 329, 192, 125)
$_Send = GUICtrlCreateButton("Send", 8, 296, 481, 25)
GUISetState(@SW_SHOW)

While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $_Send
        MsBox()
    EndSelect
WEnd
Exit

Func MsBox()
    MsgBox(0, "", "")
EndFunc

8)

Share this post


Link to post
Share on other sites

#include <GUIConstants.au3>

$Form1 = GUICreate("Form", 497, 329, 192, 125)
$_Send = GUICtrlCreateButton("Send", 8, 296, 481, 25)
GUISetState(@SW_SHOW)

While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    case $msg = $_Send
        MsBox()
    Case Else
  ;;;;;;;
    EndSelect
WEnd
Exit

Func MsBox()
    MsgBox(0, "", "")
EndFunc

Edit - Shit way too slow

Edited by BigDod


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

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  

×
×
  • Create New...