GuiUtils: Simply create GUIs from KODA, Input Dialogs from JSON, and handle them like InputBox with one functionBy matwachich
Here is my new UDF about GUIs: it's an enhanced mixture of Advanced InputBox (deprecated) and KODA Parser (deprecated), with additional functions.
What you can do with it:
Parse KODA files and directly create GUIs (_GUIUtils_CreateFromKODA) Parse a simple JSON form definition to simply create advanced InputBoxes with any amount/type of input controls (_GUIUtils_CreateFromJSON) Created GUIs are returned as Scripting.Dictionary objects, and you have helper functions to access GUIs controls by their names (_GUIUtils_HWnd, _GUIUtils_CtrlID, _GUIUtils_HCtrl ...) A function that can make a GUI created from KODA/JSON (defined by it's $oForm object) and make it a modal InputDialogBox (just like InputBox, but returns all entered data as Scripting.Dictionary object) Functions are documented, and there are some examples.
Consider this UDF as beta, but since I'm currently using it in a small commercial project, it should become production ready in near future.
To always get the latest code version, get it from Github (more up to date than this topic).
New simple application example Fixed focused control handling in _GUIUtils_InputDialog Reset input values before returning from _GUIUtils_InputDialog Fixed CloseOnEsc in _GUIUtils_InputDialog Fixed Input not reset Fixed all ListBox items are selected Project now on GitHub https://github.com/matwachich/autoit-guiutils/
Support for nodate for Date and Time input controls (pass null value) New handling of focused control _GUIUtils_InputDialog: Now, you can specify the focused control in $oInitialData by setting "controlName:focus" = True Updated documentation of _GUIUtils_InputDialog Update 07/02/2020:
Bug corrected when setting Data input control Added: abillity to read a single input control New functions (_GUIUtils_GetInputs, _GUIUtils_WriteInputs), documentation completion. Readme file and screenshots on Github Page
This topic give you access to an AutoIt functions library I maintain which is called PAL, Peter's AutoIt Library. The latest version 1.19 contains 194 functions divided into these topics:
window and screen mouse and GUI GUI controls logics and mathematics string, xml string and file string dialogues and progress bars data lists: lists, stacks, shift registers and key maps (a.ka. dictionaries) miscellaneous: logging/debugging, process and system info A lot of these functions were created in the development of Peace, Peter's Equalizer APO Configuration Extension, which is a user interface for the system-wide audio driver called Equalizer APO.
This is my very first post in this forum and am also new with Autoit programming so be easy on me.
Below is the code that I am trying to get the index of the item selected. No problem getting the text.
Case $listEdition ; handle of the list local $index=0 $item=GUICTRLRead($listEdition) ; This will return the text in the list ; ============== The loop below always fails ================== ; Meaning _GUICtrlListView_GetItemSelected($listEdition, $i) always return FALSE. WHY ??????? For $i = 0 To $editionArray - 1 ; The content of the list in an array where editionArray contains total count of items If _GUICtrlListView_GetItemSelected($listEdition, $i) Then $index = $i exitloop EndIf Next ;=================================================== ConsoleWrite( "Select Edition: " & $item & " index: " & $index & @CR) ....... Please look at the comments in the code & the pix attached.
_GUICtrlListView_GetItemSelected($listEdition, $i) always returns FALSE.
Another problem is on the list. It also populate the total count of items from the Array. How can I skip this item from populating to the list ?.
Please advise and thanks