Sign in to follow this  
Followers 0
lyonrt

Mapping a button using Koda

2 posts in this topic

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.

Thanks,

Tyler

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

Opt("GUICoordMode",2)
$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()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $Button_1
            Run('Notepad.exe')    ; Will Run/Open Notepad
        Case $msg = $Button_2
            FileOpenDialog("Title", @ScriptDir, "Exec (*.exe)" , 1)
    EndSelect
Wend

in my signature is a great starter program

8)


NEWHeader1.png

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