Jump to content
ur

Adding code to Koda GUI

Recommended Posts

ur

In Koda, we are able to design the GUI, but how to assign a block of code to a button.

 

And also when I click on run form in koda, it is replacing all the code.

Share this post


Link to post
Share on other sites
Melba23

ur,

Next time, rather than hijacking a completely unrelated thread, just start a new one as I have now done for you.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
JLogan3o13

ur, Koda is a great beginner tool to help you create your form, but it isn't meant to do the coding of each control for you. You will need to learn to do that on your own. I would use Koda to create your form, use F9 to generate the base code, and then look at the examples for each control you add (button, input, etc.) in the help file, to see for yourself how to interact with that control.

  • Like 1

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
RaiNote

Koda is a bit old i would probably prefer you to use ISN AutoIt Studio :o it's very kind to beginners. But Koda Normal GUI Code :o.

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Stupid Test GUI", 310, 168, 192, 124);GUI
$Button1 = GUICtrlCreateButton("Stupid GUI Button", 8, 8, 107, 33);BUTTON
$Input1 = GUICtrlCreateInput("MsgBox and Console Output :o", 120, 16, 177, 21);INPUT
$Radio1 = GUICtrlCreateRadio("Use only Console", 8, 48, 113, 17);RADIO
$Radio2 = GUICtrlCreateRadio("Use only MsgBox", 8, 64, 113, 17);RADIO
$Radio3 = GUICtrlCreateRadio("Use MsgBox and Console", 8, 80, 145, 17);RADIO
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

;If Statements unneeded
;Have Fun with this Tutorial Script for KODA
;I prefer ISN AUTOIT STUDIO

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Radio1;CHECKS IF $Radio1 is clicked
            If GUICtrlRead($Radio1) = $GUI_CHECKED Then
                GUICtrlSetState($Radio1,@SW_DISABLE)
                GUICtrlSetState($Radio2,@SW_ENABLE)
                GUICtrlSetState($Radio3,@SW_ENABLE)
        ElseIf @error Then
                Exit
            EndIf
        Case $Radio2
            If GUICtrlRead($Radio2) = $GUI_CHECKED Then
                GUICtrlSetState($Radio2,@SW_DISABLE)
                GUICtrlSetState($Radio3,@SW_ENABLE)
                GUICtrlSetState($Radio1,@SW_ENABLE)
        ElseIf @error Then
                Exit
            EndIf
        Case $Radio3
            If GUICtrlRead($Radio3) = $GUI_CHECKED Then
                GUICtrlSetState($Radio3,@SW_DISABLE)
                GUICtrlSetState($Radio2,@SW_ENABLE)
                GUICtrlSetState($Radio1,@SW_ENABLE)
        ElseIf @error Then
                Exit
            EndIf
        Case $Button1
            If GUICtrlRead($Radio1) = $GUI_CHECKED Then
            ConsoleWrite(GUICtrlRead($Input1) & @CRLF)
        ElseIf GUICtrlRead($Radio2) = $GUI_CHECKED Then
            MsgBox(4096,"Test",GUICtrlRead($Input1))
        ElseIf GUICtrlRead($Radio3) = $GUI_CHECKED Then
            ConsoleWrite(GUICtrlRead($Input1) & @CRLF)
            MsgBox(4096,"Test",GUICtrlRead($Input1))
        ElseIf @error Then
            Exit
        EndIf
    EndSwitch
WEnd

 


  • C++/AutoIt/OpenGL Easy Coder
  • I will be Kind to you and try to help you
  • till what you want isn't against the Forum
  • Rules~

 

Share this post


Link to post
Share on other sites
RaiNote

You could also just check the Help Files :o they are really easy with GUI basics.


  • C++/AutoIt/OpenGL Easy Coder
  • I will be Kind to you and try to help you
  • till what you want isn't against the Forum
  • Rules~

 

Share this post


Link to post
Share on other sites
232showtime

Koda is a bit old i would probably prefer you to use ISN AutoIt Studio :o

 

@RaiNote ​sorry, where can I get this ISN Autoit Studio???

Edited by 232showtime

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Share this post


Link to post
Share on other sites
RaiNote

This is the Download Link :o or just go to  www.isnetwork.at then go to My Programs there ISN AutoIt Studio :3

http://www.isnetwork.at/index.php/2011-10-17-08-51-43

It has many Functions^^.

Edited by RaiNote
  • Like 1

  • C++/AutoIt/OpenGL Easy Coder
  • I will be Kind to you and try to help you
  • till what you want isn't against the Forum
  • Rules~

 

Share this post


Link to post
Share on other sites
232showtime

wuhooo need to try this, downloading installer... whats the difference between ISN AutoIt Studio (Compiled) and ISN AutoIt Studio (Source)???, do i need to download it all???


ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Share this post


Link to post
Share on other sites
RaiNote

Installer will just install the Compiled version :o that can easily be runned the compiled Version is just the Source Code which got compiled the Source Code is how it say the Source of The Programm :o

At the best use the installer^^

 

Short: Download Installer --> Start Installer --> Start ISN AutoIT Studio --> Create Your Project --> have fun <3

Edited by RaiNote
  • Like 1

  • C++/AutoIt/OpenGL Easy Coder
  • I will be Kind to you and try to help you
  • till what you want isn't against the Forum
  • Rules~

 

Share this post


Link to post
Share on other sites
kmasal

Hi guys

The installer doesnt work :/ 

I am using win 10 64bit 

Is there any new ver or something ? 

2016-10-09.png

Edited by kmasal

Share this post


Link to post
Share on other sites
kmasal

Ok fix it... 

For ppl who have the same problem... i download the installer by using different browser :D

Have fun 

 

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

×