Sign in to follow this  
Followers 0
chrisrulz

Connecting Buttons

7 posts in this topic

heyy, ive got this program i doownloaded its called Koda Form designer, u can make forms for autoit then genrate the code but ive maade my form but cant seem to make certain buttons on the form to do things for instance The Logon button i want it to start a script that ive made that logs on..?

thx

,chriss

Share this post


Link to post
Share on other sites



Hi,

this should help you:

#include <GUIConstantsEx.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 454, 193, 115)
$Button1 = GUICtrlCreateButton("Button1", 80, 144, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            _myfunc ()
    EndSwitch
WEnd

Func _myfunc ()
    Msgbox (0,"", "Call Myfunc")
EndFunc

;-))

Stefan

Share this post


Link to post
Share on other sites

heyy, ive got this program i doownloaded its called Koda Form designer, u can make forms for autoit then genrate the code but ive maade my form but cant seem to make certain buttons on the form to do things for instance The Logon button i want it to start a script that ive made that logs on..?

thx

,chriss

Koda Form Designer. You add the code to do everything after you put the generated code into SciTE.

Share this post


Link to post
Share on other sites

heyy thx stefan that helped be get a hold of it but could u show me how to make the button run a scipt?

Share this post


Link to post
Share on other sites

thx works great now i need to find out how to make it wait for the window to open then start the script the win is called Nitto Legends (Beta)..?;)

Share this post


Link to post
Share on other sites

Hi,

have a look at the WinWait functions.

You may also have a look at WinTitleMatchMode option.

;-))

Stefan

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