Sign in to follow this  
Followers 0
Kivin

Button function

4 posts in this topic

Hi everyone!

I need to specify action for a button, which was create inside function (Func () / EndFunc)

Is anyone knows?

Thanks for help!

Share this post


Link to post
Share on other sites



Not quite sure what you mean, maybe HotKeySet?? Do you want something to happen when a key is pressed?


While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites

I want, that something happen when a button is pressed (for example ExitLoop)

Share this post


Link to post
Share on other sites

#include <GUIConstants.au3>

GUICreate("Button", 137, 60, -1, -1)
$Button = GUICtrlCreateButton("&Click me", 8, 8, 121, 41, 0)
GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button
            MsgBox(0, "Button", "This is what happens when you press me!")
    EndSwitch
WEnd

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