Jump to content

GUI Designer: Koda 1.7.3.0


Lazycat
 Share

Recommended Posts

I imagine it so:

1. In Koda click Import.

2. Dialog with simple editor appear. Here you paste your GUI code (or load it from file) and edit if need.

3. Click Convert and you got form in editor.

Btw, I already done fix for scopes, so your both GUI's converts fine.

Thanks, Lazy exactly these 3 points. Great!

And about the fix for scopes, can I have this version? Or you will put all together? No hurry...

Thanks

Jose

Edited by joseLB
Link to comment
Share on other sites

hi guys, i have attached a little something that MAYBE wil be of use to you guys.

some new icons for Koda.

i know i was not asked, but hee, i can try huh?

it is more modern looking now...

please let me know what you think ok?

Damian666

We will think about main icon, but document icon looks quite nice anyway, and it definitely better then older. Thanks!

About fine placing, you can do that right now: Ctrl+Arrow move control(s), Shift+Arrow - resize.

Link to comment
Share on other sites

Next beta is out. Together with small import fixes and additions, and new document icon, this one introduce Accelerators support.

http://www.autoitscript.com/fileman/users/lookfar/koda_2008-03-20.zip

They are supported for menu items and for buttons. I'm not sure - what another controls worth to have the hotkey property? Formally, hotkey can be assigned to any control, but I'm not see many sense for, say, input controls.

Link to comment
Share on other sites

Lazycat -

I was recently trying to create a tabbed menu that included some images and ran into a problem. Martin solved it and asked me to post it: http://www.autoitscript.com/forum/index.ph...mp;#entry495891. It looks like it could be a bug because images will appear in design mode but not during execution unless you make the change referenced in this string.

Regards,

JFish

P.S. Nice program, extremely cool.

Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

Link to comment
Share on other sites

and any ideas about a fitting main icon?

i am open for suggestions dudes...

As I say - we will think, just give us a time :)

It looks like it could be a bug because images will appear in design mode but not during execution unless you make the change referenced in this string.

Not a bug actually. WS_CLIPSIBLINGS was added time ago as forced style to fix problem with repaint buttons on picture. But looks like in latest Autoit versions this not need anymore, buttons correctly repaints without it, so this can be removed and not set "by default".
Link to comment
Share on other sites

Next beta is out....

Great version, Lazy! you are the :) of forms! I tested it with some recent generated GUI's, 2 in one AU3, and the copy/paste screeen was very good! Congratulations!

Just some minor points:

1- the size of generated screens is a bit smaller tha original one, so it shows the vertical and horizontal scrolbars, but this is solved just dragging manualy the screen size.

2- I notice in one screen that one button where in wrong position (the code follows). --> I think this item is related with the above one,as the button is the last one.

3- see button T1_desligProc: (the same is true for all tool-tips)

--> original tool tip was this one: "DESLIGA o PC, atuando sobre seu botão liga/desliga" &CRLF& "presssiona-o por 10 segundos"

--> the generated one was: "DESLIGA o PC, atuando sobre seu botão liga/desliga %CRLF%presssiona-o por 10 segundos"

==> my suggestion: do not interpretate the "expression", just let it be as it is. I mentioned earlier in this tread how I'm doing "expressions" in Koda today.

3- if there is 2 forms in the copy/paste, it processes just the second one (well we can always copy/paste one and later the second one). So, it don't hurts, I'm just trying to do all possible tests.

Jose

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3></P> <P>#Region ### START Koda GUI section ### Form=C:\Projeto\PIC\SalaProc2\Pascal-Tel2\v2_2\SalaProc3_0.kxf
Global $TL1 = GUICreate("SalaProc v3.0", 289, 275, 193, 125)
Global $Group1 = GUICtrlCreateGroup("PCs & Internet", 8, 3, 105, 207)
Global $T1_Proc1 = GUICtrlCreateRadio("PC 1", 16, 27, 89, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
Global $T1_Proc2 = GUICtrlCreateRadio("PC 2", 16, 43, 89, 17)
Global $T1_Proc3 = GUICtrlCreateRadio("PC 3", 16, 59, 89, 17)
Global $T1_Proc4 = GUICtrlCreateRadio("PC 4", 16, 75, 89, 17)
Global $T1_Proc5 = GUICtrlCreateRadio("PC 5", 16, 91, 89, 17)
Global $T1_Internet = GUICtrlCreateRadio("PC 6 / Internet", 16, 107, 89, 17)
Global $T1_ligProc = GUICtrlCreateButton("liga", 16, 131, 43, 17, 0)
GUICtrlSetTip(-1, "LIGA o PC, atuando sobre seu botão liga/desliga " <A href="mailto:&@CRLF">&@CRLF</A>& "presssiona-o por 3 segundos")
Global $T1_desligProc = GUICtrlCreateButton("desliga", 64, 131, 43, 17, 0)
GUICtrlSetTip(-1, "DESLIGA o PC, atuando sobre seu botão liga/desliga " <A href="mailto:&@CRLF">&@CRLF</A>& "presssiona-o por 10 segundos")
Global $T1_resetProc = GUICtrlCreateButton("reset", 16, 155, 43, 17, 0)
GUICtrlSetTip(-1, "DESLIGA e LIGA o PC, atuando sobre seu botão liga/desliga " <A href="mailto:&@CRLF">&@CRLF</A>& "presssiona-o por 10 segs.,espera, pressiona-o por 3 segs.")
Global $T1_Rebut = GUICtrlCreateButton("reBoot", 64, 155, 43, 17, 0)
GUICtrlSetTip(-1, "REBUTA o PC, atuando sobre seu botão RESET" <A href="mailto:&@CRLF">&@CRLF</A>& "presssiona-o por 1 segundo")
Global $T1_watchDog = GUICtrlCreateButton("watchDog", 12, 180, 60, 17, 0)
GUICtrlSetTip(-1, "parametriza/ativa/desativa WatchDog na CPU definida no .ini")
GUICtrlCreateGroup("", -99, -99, 1, 1)
Global $T1_ajusTemp = GUICtrlCreateButton("ajusta Temperatura", 8, 217, 97, 22, 0)
GUICtrlSetTip(-1, "permite que você meça a voltagem de referência na placa"<A href='mailto:&@crlf&"e'>&@crlf&"e</A> a informe aqui para temperaturas mais precisas."<A href='mailto:&@crlf&"salva'>&@crlf&"salva</A> no .ini")
Global $T1_MostPort = GUICtrlCreateButton("mostra Porta", 8, 245, 97, 21, 0)
GUICtrlSetTip(-1, "passa a mostrar no LED o valor instantâneo da porta/bit desejado "<A href='mailto:&@crlf&"dê'>&@crlf&"dê</A> a letra da porta+bit (ex: A3)")
Global $Group2 = GUICtrlCreateGroup("Ar Refrigerado", 136, 5, 121, 46)
Global $T1_LigAr = GUICtrlCreateButton("liga", 144, 25, 41, 21, 0)
Global $T1_deslAr = GUICtrlCreateButton("desliga", 200, 25, 41, 21, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Global $Group3 = GUICtrlCreateGroup("MODEM", 136, 50, 121, 71)
Global $T1_LigModem = GUICtrlCreateButton("liga", 144, 70, 41, 21, 0)
Global $T1_desligModem = GUICtrlCreateButton("desliga", 200, 70, 41, 21, 0)
Global $T1_resetModem = GUICtrlCreateButton("reset", 168, 95, 49, 21, 0)
GUICtrlSetTip(-1, "deliga o modem, dá 1 tempo e o religa")
GUICtrlCreateGroup("", -99, -99, 1, 1)
Global $T1_Temp = GUICtrlCreateLabel("---º", 113, 125, 168, 145)
GUICtrlSetFont(-1, 110, 800, 0, "Arial Narrow")
GUICtrlSetColor(-1, 0x00FF00)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUICtrlSetTip(-1, "sai sem executar qualquer comando")
Global $T2_btExecutar = GUICtrlCreateButton("executar", 24, 210, 59, 20, 0)
GUICtrlSetTip(-1, "executa o comando dado acima")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Link to comment
Share on other sites

Great version, Lazy! you are the :) of forms!

Uncrowned? :party:

1- the size of generated screens is a bit smaller tha original one, so it shows the vertical and horizontal scrolbars, but this is solved just dragging manualy the screen size.

Yes, I know, once this will be fixed, I hope :)

2- I notice in one screen that one button where in wrong position (the code follows). --> I think this item is related with the above one,as the button is the last one.

I don't see such buttons. If you mean T2_btExecutar - actual position in code and generated position are match.

3- see button T1_desligProc: (the same is true for all tool-tips)

--> original tool tip was this one: "DESLIGA o PC, atuando sobre seu botão liga/desliga" &CRLF& "presssiona-o por 10 segundos"

--> the generated one was: "DESLIGA o PC, atuando sobre seu botão liga/desliga %CRLF%presssiona-o por 10 segundos"

==> my suggestion: do not interpretate the "expression", just let it be as it is. I mentioned earlier in this tread how I'm doing "expressions" in Koda today.

Doing this is wrong, until this can be done optionally and until some "flag" for "raw string" will be implemented.

3- if there is 2 forms in the copy/paste, it processes just the second one (well we can always copy/paste one and later the second one). So, it don't hurts, I'm just trying to do all possible tests.

Import function is not designed for work with multiple forms at once. So separate forms is your task.
Link to comment
Share on other sites

I get error when trying to run my script :S

But i just seem to get when i put a picture in it.

"Error: Variable used without being declared."

CODE
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=bot1.kxf\bot1.kxf

$hGUI = GUICreate("Mxt", 465, 156, 184, 140)

GUISetBkColor(0x000000)

$Group1 = GUICtrlCreateGroup("Information", 287, -1, 177, 25, $BS_CENTER)

GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")

GUICtrlSetColor(-1, 0xFF0000)

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

GUICtrlSetCursor (-1, 2)

$Info = GUICtrlCreateEdit("", 287, 24, 177, 129)

GUICtrlSetData(-1, "")

GUICtrlSetFont(-1, 7, 800, 0, "MS Sans Serif")

GUICtrlSetState(-1, $GUI_DISABLE)

$Pic1 = GUICtrlCreatePic("C:\Documents and Settings\omnibook\Skrivbord\namnlös.bmp", -9, -1, 289, 153, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))

$Pic3 = GUICtrlCreatePic("C:\Documents and Settings\omnibook\Skrivbord\4.bmp", -19, 152, 273, 20, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))

$Pic2 = GUICtrlCreatePic("C:\Documents and Settings\omnibook\Skrivbord\4.bmp", 253, 152, 209, 20, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))

GUISetState(@SW_SHOW)

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

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

EndSwitch

WEnd

Any idea what the problem can be and how do i fix it?

Thanks

Link to comment
Share on other sites

I have no clue why, but sometimes, at random times, it doesn't give my inputbox a name, like $input1, it just has nothing...

But I love the BETA version, even though im not using beta... :)

Link to comment
Share on other sites

Change it to what?

Just started to script :)

In last betas of Autoit standard GUI includes was severely redone. For simplicity, follow the rule: if you use release version of Autoit - use 1.7.0.1 release of Koda, if you try bleeding edge beta of Autoit - you better use latest beta of Koda.

I have no clue why, but sometimes, at random times, it doesn't give my inputbox a name, like $input1, it just has nothing...

Have no clue too. All controls creating in the same manner. And I'm never seen this problem before.
Link to comment
Share on other sites

I need help with another thing.

How do i put so if i click on one button something will happen?

This doesn't work :S

Case $Button6
MsgBox(1 ,"Hello","Hello")

Full code.

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=Bot load.kxf\Bot load.kxf
$Form2 = GUICreate("Ztb", 602, 354, 180, 109)
$Pic1 = GUICtrlCreatePic("C:\Documents and Settings\omnibook\Skrivbord\zbot.bmp", -16, 0, 617, 353, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Button1 = GUICtrlCreateButton("&Afk Tools", 32, 72, 75, 25, 0)
GUICtrlSetState(-1, $GUI_HIDE)
$Button2 = GUICtrlCreateButton("&Rune Making", 32, 112, 75, 25, 0)
GUICtrlSetState(-1, $GUI_HIDE)
$Button3 = GUICtrlCreateButton("&Alarms", 32, 160, 75, 25, 0)
GUICtrlSetState(-1, $GUI_HIDE)
$Button4 = GUICtrlCreateButton("&Shortcuts", 32, 200, 75, 25, 0)
GUICtrlSetState(-1, $GUI_HIDE)
$Button5 = GUICtrlCreateButton("&Scripts", 32, 240, 75, 25, 0)
GUICtrlSetState(-1, $GUI_HIDE)
$Button6 = GUICtrlCreateButton("&Help", 488, 48, 75, 41, 0)
GUICtrlSetState(-1, $GUI_HIDE)
$Edit1 = GUICtrlCreateEdit("", 464, 104, 97, 81, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_BORDER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetData(-1, StringFormat("READ!\r\nNote that is bot is\r\njust in beta so\r\nbugs and errors\r\nmay/can occur.\r\n"))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg

Case $Button6
MsgBox(1 ,"Hello","Hello")

Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd

Whats wrong? :)

Edited by Zisly
Link to comment
Share on other sites

Nothing....actually...there is nothing wrong with that code..it should work!

EDIT: maybe one thing, change Msgbox(1, "hello", "hello") to: MsgBox(0, "Hello", "Hello")

see if that works!

Edited by R6V2
Link to comment
Share on other sites

Doesn't work :/ i tested to take away the "hide" part but still doesn't work when i click on it :S

If I change

$Button6 = GUICtrlCreateButton("&Help", 488, 48, 75, 41, 0)
GUICtrlSetState(-1, $GUI_HIDE)

to

$Button6 = GUICtrlCreateButton("&Help", 488, 48, 75, 41, 0)
;GUICtrlSetState(-1, $GUI_HIDE)

then button 6 is visible and when I click on it the message box appears. Try 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

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...