matwachich Posted October 27, 2019 Share Posted October 27, 2019 (edited) DEPRECATED: see this new UDF Spoiler Hi! Here is a function that parses .kxf (KODA Form) file and directly generates the GUI for your program. For now, it is beta (buggy and incomplete). Supported controls: label, button, input, edit, checkbox, radio, list, combo, group, pic, icon, dummy, controlGroup, slider, progress, date, monthCal, treeView (no items), listView (no items), tab/tabSheet, menus (main, popup) Supported options: font, colors (text and background), cursor, hint (tool tip), visible, enable/disable, checked/unchecked, resizing TODO and bugs: GUI size bug Other controls (image list, IP, tool bar, status bar, tray menu, avi, up-down, graphics, COM object (really useful?)) Hotkeys (accelerators) KXF text encoding problem https://github.com/matwachich/koda_parser Update (30/10/2019): To have a correctly sized GUI, you must manually pass it's size to the function (get the right GUI size from KODA generated code) Workarround for text encoding problem: kxf file is read as ANSI before being loaded by XMLDOM Update (05/12/2019): Added ability to specify parent GUI (parent GUI set in KODA is now ignored) Added helper functions to: set accelerators, get GUI handle, get control ID/handle, set/get user variables Fixed TabSheet control ID not set Fixed control resizing not set Update (12/12/2019): Fixe window visiblity control Update (17/12/2019): Control groups acces: Added ability to directly acces child controls of: Group, ControlGroup, Tab and TabSheet (functions _KODAForm_CtrlChildrenXXX) Script Breaking: renamed _KODAForm_GetItem and _KODAForm_SetItem to _KODAForm_GetUserData and _KODAFOrm_SetUserData. UserData are now isolated from other GUI controls in the $oForm object Also: some minor internal tweaks in object items naming KODAParser-beta6.zip Edited February 1, 2020 by matwachich deprecated dmob, Skeletor and Inpho 3 Link to comment Share on other sites More sharing options...
Zedna Posted October 29, 2019 Share Posted October 29, 2019 Please explain what is this good for, thanks. I can't imagine any useful use case. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
matwachich Posted October 30, 2019 Author Share Posted October 30, 2019 OK Let's see a standard workflow for developping a GUI application using KODA: You create your GUI with KODA You export and past the GUI creation code onto your script You Run, it works You (I) many times need to make some manual tweaks on the KODA generated code, and I forget (or cannot) mirror these modifications on KODA After that, I need to modify the GUI, so I do it on KODA, repeat steps 1 and 2, but here, the manual modifications are lost! And you need to redo them With this function: You create your GUI with KODA Embeed the .kxf file with your script And every time you modifiy your GUI on KODA, you don't have to touch/modify your script! Also, your custom modifications are done after calling the function, so you don't loose them or need to redo them Skeletor 1 Link to comment Share on other sites More sharing options...
Zedna Posted October 31, 2019 Share Posted October 31, 2019 (edited) Thanks for detailed explanation. I use Koda actively and I have the problem you described too, so I can understand your goal very well. Edited October 31, 2019 by Zedna matwachich 1 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Skeletor Posted November 8, 2019 Share Posted November 8, 2019 Very useful, I too have this issue. Well done on providing something that will wake the KODA community up and update the program. matwachich 1 Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI Link to comment Share on other sites More sharing options...
dmob Posted November 9, 2019 Share Posted November 9, 2019 I have same headache... thanks for sharing. matwachich 1 Link to comment Share on other sites More sharing options...
matwachich Posted December 5, 2019 Author Share Posted December 5, 2019 New version with some fixes. Skeletor 1 Link to comment Share on other sites More sharing options...
matwachich Posted December 12, 2019 Author Share Posted December 12, 2019 Update. See first post. Link to comment Share on other sites More sharing options...
matwachich Posted December 17, 2019 Author Share Posted December 17, 2019 Update with ability to list all children controls of a group, controlGroup, tab and tabSheet Link to comment Share on other sites More sharing options...
satanico64 Posted January 29, 2020 Share Posted January 29, 2020 Goodjob matwachich. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now