Jump to content

GUI Designer: Koda 1.7.3.0


Lazycat
 Share

Recommended Posts

hmmm i cant seem to find an answer when i create a main menu how do i link submenus in the items to external help file or something i knwo u cant do it in koda but wats the syntax u put in the script?

any help please

cheers C.W

C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake

Link to comment
Share on other sites

'Update Script' does not work anymore.

S. this topic

UDFS & Apps:

Spoiler

DDEML.au3 - DDE Client + Server
Localization.au3 - localize your scripts
TLI.au3 - type information on COM objects (TLBINF emulation)
TLBAutoEnum.au3 - auto-import of COM constants (enums)
AU3Automation - export AU3 scripts via COM interfaces
TypeLibInspector - OleView was yesterday

Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCE 

Link to comment
Share on other sites

Would be great if you make it possible to create arrays of controls!

There is a safe and compatible way implemeting this

- if several controls on form share same name ( now forbidden ), they are created as array elements.

ordered by tabindex i suppose.

Maybe if sometime half of whole code will be rewritten to support non-unique names (or names contain non-alphanumeric characters) this can be done :)
Link to comment
Share on other sites

Maybe if sometime half of whole code will be rewritten to support non-unique names (or names contain non-alphanumeric characters) this can be done :)

Maybe this could be done quite easily without anything special.

Suppose you create the Koda form with buttons called $button_ARRAY0, $button_ARRAY1 etc

Then in your script you could have

Dim $buttons[20];start with some arbitrary number of elements
    $n = 0
    While IsDeclared("Button_Array" & $n)
        $buttons[$n] = Eval("Button_Array" & $n)
        if UBound($buttons) < $n + 1
            ReDim $buttons[$n + 1]
        EndIf
                $n += 1
    WEnd
    if $n < 20 then Redim $buttons[$n]

From then on you can just use the $buttons array and ignore all the $button_ARRAY names.

This is just an idea, I haven't tried it, but it sounds reasonable to me.

Another way to deal with this is one I have used when I want an array of buttons, labels and leds for example. With arrays you normally want to create the components in your code and not with the gui designer, but then you loose the advantage of placing things correctly visually. So I create just one of each control, say $buttonMarker, $labelMarker, $LEDMarker at the correct positions. Then in my code I get the coords of the components, and maybe the styles and delete them or make them invisible, then add the components from the array.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Maybe this could be done quite easily without anything special.

Suppose you create the Koda form with buttons called $button_ARRAY0, $button_ARRAY1 etc

Yes, I think this is decent solution. And it's easy to create template with this common code.
Link to comment
Share on other sites

I know it's not important but i ca'nt copy whole form in Koda - I mean size of form and all controls on it... I think we need function - COpy Form :D

What is wrong with 'Save As'?

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

  • 3 weeks later...

Thanks a lot for this great program... It makes making GUI's a lot faster...

I have problem... For the first time I tried creating a menu with koda and I did. However, when I generate code or have a form preview it isn't shown or in the code. Any ideas what's wrong?

P.S. I briefly searched this post but didn't seem to find anything useful...

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Thanks a lot for this great program... It makes making GUI's a lot faster...

I have problem... For the first time I tried creating a menu with koda and I did. However, when I generate code or have a form preview it isn't shown or in the code. Any ideas what's wrong?

P.S. I briefly searched this post but didn't seem to find anything useful...

I quickly tested main menu (create and generate/run AU3 code) in Koda 1.7.0.1 and it works fine.

What Koda version are you usiing?

What exact way did you used to reproduce problem?

Link to comment
Share on other sites

I quickly tested main menu (create and generate/run AU3 code) in Koda 1.7.0.1 and it works fine.

What Koda version are you usiing?

What exact way did you used to reproduce problem?

Same version, 1.7.0.1.. The one that came with the latest Scite I downloaded (If I remember right)...

I started with a blank form and created the menu first. It came up as a small box (about 20x20)... I doubleclicked that and added my three menu items and their subitem. I then positioned it at the top left and tried expanding it but nothing happened. I then figured that menus, by default, take up the whole width of the GUI and the top +-30 pixels so I tried testing it. There was nothing there except the form and a blank listview I had added on.. I tried generating the code but it only had code for the gui/listview and absolutely no menu.

:)

Edit: I just added another menu and it worked. ??? I mean the new menu worked, mine still didn't show.

Posted Image

Edited by Piano_Man
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Same version, 1.7.0.1.. The one that came with the latest Scite I downloaded (If I remember right)...

I started with a blank form and created the menu first. It came up as a small box (about 20x20)... I doubleclicked that and added my three menu items and their subitem. I then positioned it at the top left and tried expanding it but nothing happened. I then figured that menus, by default, take up the whole width of the GUI and the top +-30 pixels so I tried testing it. There was nothing there except the form and a blank listview I had added on.. I tried generating the code but it only had code for the gui/listview and absolutely no menu.

:)

Edit: I just added another menu and it worked. ??? I mean the new menu worked, mine still didn't show.

You placed main menu twice!!

If you do this no main menu appears.

You must place only ONE main menu at form.

Link to comment
Share on other sites

You placed main menu twice!!

If you do this no main menu appears.

You must place only ONE main menu at form.

No, I had one and it didn't work. I added another and then the one I added was shown. It seems like the first wasn't registering...

But it doesn't matter, I exited and it looks like it didn't save anywhere so I lost everything... I'll just make the menu myself after making the rest...

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Minor problem with Koda 1.7.03

If a gui is set to have visible = false, then when it is loaded next time it is indeed invisible :) However, that makes it difficult to edit.

To recover it is necessarry to change visible to true, save, close and open the form again.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Piano_Man

Koda can have more then one main menu "placeholders" on the form, but only one of them can used. You can switch between different menus by changing "Menu" property in inspector. When you add menu items, you should see actual menu on the form. If you don't - looks like for some reason (for example, accidental adding second menu) menu not "attached" to form. Look form's "Menu" property and choose menu you want to be active.

martin

Weird, I recall already fixed that... but tried and it still here :)

Link to comment
Share on other sites

I have a very little time for coding now, so this beta introduce only support for new includes structure.

http://www.autoitscript.com/fileman/users/lookfar/koda_2008-02-10.zip

Don't forget to remove "hardcoded" obsolete GUIConstants.au3 include from your code templates.

Link to comment
Share on other sites

Probably some bugs in Extras\Import\Form Captor.au3

1) Func EnumChildProc($hWnd, $lParam)

If $sCtrlType = "TALabel" Then _WriteProp("AutoSize", "False")

should be

If $sCtrlType = "Label" Then _WriteProp("AutoSize", "False")

2) Func _GetControlType($sClassName, $nStyle)

Case "Edit"
            If BitAND($nStyle, $ES_MULTILINE) Then Return "TAEdit" 
             Return "Input"

should be

Case "Edit"
            If BitAND($nStyle, $ES_MULTILINE) Then Return "Edit" 
             Return "Input"
Link to comment
Share on other sites

  • 3 weeks later...

I just downloaded the latest version (1.7.04) and tried to file/import/au3gui script. But received the messages: "merged lines so-so...start processing... gui not found... The gui that was at the beginning of AU3 and was recognized follows at the end.

My suggestion is that we could copy/paste the gui area on AU3 to Koda. With that we could probably recover the most possible from a GUI, and you would not to sofisticate Koda recognition code. As the code is in the clipboard, probably a human put there the best of what can be considered a form. At worst, giving messages of what lines could not be used by Koda.

As you can see in the code, the form is in Au3 (even not recognized), and probably most of it could be used. Even if not all parts could be used, it would be much more interesting to be able to get something. As this gui was done long time ago, I do not have the kxf, furtemore I edited the au3 along this time.

Jose

CODE

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=

Global $TL1 = GUICreate("Controle sala PROC", 262, 270, 200, 200)

Global $T1_G1 = GUICtrlCreateGroup("PCs e Internet", 8, 8, 105, 184)

Global $T1_Proc1 = GUICtrlCreateRadio("PC-01", 16, 32, 65, 17)

; GUICtrlSetState ($T1_Proc1,$GUI_CHECKED)

Global $T1_Proc2 = GUICtrlCreateRadio("PC-02", 16, 48, 70, 17)

Global $T1_Proc3 = GUICtrlCreateRadio("PC-03", 16, 64, 70, 17)

Global $T1_Proc4 = GUICtrlCreateRadio("PC-04", 16, 80, 70, 17)

Global $T1_Proc5 = GUICtrlCreateRadio("PC-05", 16, 96, 70, 17)

Global $T1_Internet = GUICtrlCreateRadio("internet", 16, 112, 73, 17)

Global $T1_ligProc = GUICtrlCreateButton("Liga", 16, 140, 33, 25, 0)

Global $T1_desligProc = GUICtrlCreateButton("desliga", 64, 140, 41, 25, 0)

Global $T1_resetProc = GUICtrlCreateButton("reset", 24, 166, 73, 25, 0)

Global $T1_ajusTemp = GUICtrlCreateButton("Corrige Temperatura", 8, 200, 105, 25, 0)

Global $T1_MostPort = GUICtrlCreateButton("Mostra Porta", 8, 232, 105, 25, 0)

GUICtrlCreateGroup("", -99, -99, 1, 1)

Global $T1_G2 = GUICtrlCreateGroup("Ar Refrigerado", 136, 8, 121, 49)

Global $T1_deslAr = GUICtrlCreateButton("desliga", 200, 24, 49, 25, 0)

Global $T1_LigAr = GUICtrlCreateButton("liga", 144, 24, 41, 25, 0)

GUICtrlCreateGroup("", -99, -99, 1, 1)

Global $T1_G3 = GUICtrlCreateGroup("Modem", 136, 64, 121, 49)

Global $T1_LigModem = GUICtrlCreateButton("liga", 144, 80, 29, 25, 0)

Global $T1_desligModem = GUICtrlCreateButton("desliga", 175, 80, 43, 25, 0)

Global $T1_resetModem = GUICtrlCreateButton("reset", 220, 80, 30, 25, 0)

GUICtrlCreateGroup("", -99, -99, 1, 1)

Global $T1_G4 = GUICtrlCreateGroup("Força Geral da sala", 136, 120, 121, 49)

Global $T1_desligGeral = GUICtrlCreateButton("desliga", 200, 136, 49, 25, 0)

Global $T1_LigGeral = GUICtrlCreateButton("liga", 144, 136, 41, 25, 0)

GUICtrlCreateGroup("", -99, -99, 1, 1)

Global $T1_Temp = GUICtrlCreateLabel(" º", 120, 170, 140, 90)

GUICtrlSetFont(-1, 70, 900, 0, "Arial Narrow")

GUICtrlSetColor(-1, 0x00FF00)

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...