Jump to content

button...


Recommended Posts

ok lol

lets say i have a function called myFunction. when someone clicks a button in a GUI i want it to call myFunction.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

mostly copied from help files

#include <GUIConstants.au3>

GUICreate("My GUI Button"); will create a dialog box that when displayed is centered

Opt("GUICoordMode",2)
$OK = GUICtrlCreateButton ("OK",  10, 30, 50)
$Close = GUICtrlCreateButton ( "Close",  0, -1)

GUISetState ()      ; will display an  dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $OK then Call("ShowMessage")
        
    If $msg = $Close then Call("Terminate")
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend




Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","This is a message from a function.")
EndFunc

check out help files.... at the bottom are small scripts to see what they do

8)

looks just like you said call "myfunction" with parenthacies

Edited by Valuater

NEWHeader1.png

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