Jump to content
Sign in to follow this  
Kivin

Button function

Recommended Posts

Kivin

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
someone

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
Kivin

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

Share this post


Link to post
Share on other sites
James

#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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.