Jump to content
Sign in to follow this  

Mapping a button using Koda

Recommended Posts


I am trying to show some co-workers how to easily use Koda with AutoIT to create simple windows. One thing I am running into though. Is there a way to map a simple button you create in koda to another file in the same directory? In other directories? I dont see a "browse" for exe button inside koda.



Share this post

Link to post
Share on other sites

Koda is for designing the GUI, then you must work with the commands and UDF's

#include <GUIConstants.au3>

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

$Button_1 = GUICtrlCreateButton ("Run Notepad",  10, 30, 100)
$Button_2 = GUICtrlCreateButton ( "Open Browse",  0, -1)

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

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
        Case $msg = $GUI_EVENT_CLOSE
        Case $msg = $Button_1
            Run('Notepad.exe')    ; Will Run/Open Notepad
        Case $msg = $Button_2
            FileOpenDialog("Title", @ScriptDir, "Exec (*.exe)" , 1)

in my signature is a great starter program



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.