Recently Browsing 0 members
No registered users viewing this page.
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
I installed the latest version of Autoit (x86 - for greater compatibility) and SciTE.
Every time I want to generate the GUI code designed in Koda, the program freezes (only Koda, not SciTE).
Have you ever had this problem? Do you know how to fix it?
As many of you may not be aware, of much about AutoIt's humble beginnings, and aspects related to the first GUI version of AutoIt, I thought it might be nice to create a historical reference here for all the many GUI creators that have been created by various people over the years.
NOTE - While one could argue, that this topic might be better placed in one of the Chat forums, I would argue, that it links to heaps of good code. While much may be redundant in that code, it is still interesting and forms a great perspective. Many are bound to find useful elements at the very least.
Koda, is no doubt the most well-known GUI creator now, but there was a time, when CyberSlug's legendary GUIBuilder (first known as AutoBuilder) ruled the roost, and AutoIt coder's saw it as a Godsend. AutoIt coding was much simpler back then of course.
Below, will be a timeline, of any AutoIt GUI creators listed in forum pages. It will be added to by myself as I find them or as others here find them and place a link in a subsequent post ... PLEASE HELP! Comments welcome too.
(Also note, that this is also intended to include updates, branches etc by others)
Apr 20 2004 - AutoBuilder by CyberSlug.
Sep 27 2004 - An interesting topic, where CyberSlug talks about the future of AutoBuilder (etc) and renaming to GUIBuilder and you see the first mentions and links to updates by others (including myself & livewire).
Nov 05 2004 - A topic where lookfar is working on a SciTE replacement, talks about starting a Form Designer.
Aug 10 2005 - GuiBuilder first update by TheSaint.
Sep 26 2005 - GUIBuilder updates by livewire (he also talks about transferring his efforts to Koda).
Nov 02 2005 - KODA FormDesigner v1.3 by lookfar
Nov 03 2005 - Seemingly interesting topic about forms by tonedeaf
Dec 26 2005 - AutoIt Studio(beta) by BillLuvsU
Jan 09 2006 - AutoBuilder update (or branch) by _^__darkbytez (livewire also posts).
Feb 19 2006 - Koda v1.5 by lookfar
Sep 07 2006 - Koda v184.108.40.206 by Lazycat
Jan 07 2007 - Form/GUI Builder by FlintBrenick
Jun 10 2007 - Gorganizer by _Kurt (more of an assister than actual GUI maker)
Jun 27 2007 - Basic GUI Designer by Mast3rpyr0
May 03 2008 - Autoit Programmer's Desktop (APD) by Ealric
Jul 11 2008 - Gui Designer by Alek
Aug 11 2008 - Gorganizer update by _Kurt
Jun 19 2009 - Easy GUI by Mat
Aug 13 2009 - GUI Script Creator by Pandemic (not sure this qualifies, but it made me think of templates)
Aug 16 2010 - Creation Gui by AZJIO
Jan 22 2012 - ISN AutoIt Studio by ISI360 (includes ISN Form Studio 2, a GUI editor)
Mar 19 2012 - Arduino GUI Programmer by nikosliapis (creates a specific type of GUI)
Aug 01 2012 - GuiBuilder Resurrected update/branch to GUIBuilder by baroquebob
Dec 01 2012 - Form Builder beta (v1.0.6) by BuckMaster
Jan 12 2015 - GUIBuilderNxt update by jaberwacky of GUIBuilder v0.8 (as a new prototype, modified to work with latest AutoIt) (not a update to the Resurrected version)
Aug 12 2016 - The GuiBuilder Return by DFerrato as an update to GUIBuilder,
Jan 17 2017 - GUIBuilder Project by TheSaint (a work in progress based on CyberSlug's original ... and later versions, updated by Roy, TheSaint & others).
May 29 2019 - The GuiBuilder Return by DFerrato as an update to GUIBuilder, His new and improved version.
There are a significant number of creators/designers that have been started and never completed.
+++++ STILL UNDER CONSTRUCTION +++++
P.S. Well that's it from me tonight. I know of at least one other major creator, but cannot recall it's name or the name of the coder, though I think it starts with 'L'. Bound to be a few I've missed, and some I cannot seem to find their first appearance here (Koda, Form Builder, etc), but there may be an obvious reason for that. Will probably rely on feedback from others now that I've got the ball rolling.
NOTE - If anyone wants to discuss any of these programs above or give some background history, then by all means do so. I will cross-reference (link to) any important comments.
Is it possible to compile script without any icon resources included?
When I make exe it uses default system icon of current OS even if I compile as console application.
On other versions of Windows it looks a little strange
It seems that the only way is remove icons from exe after compilation using resource editors like ResHacker.
another bad solution:
Using corrupted 35 bytes icon file. Windows can't load it and shows default system icon.
#pragma compile(Icon, broken.ico) broken.ico
Good evening everyone
First, I want to apologize with you for the title not very clear, but I thought a little bit on which title to set at the thread, and this is the one that came in mind.
Now, let me explain what I'm trying to understand.
I am making an application ( with n clients ), with an SQLite Database, which has a Main form, and n sub-forms...
Since these sub-forms are called several times, because they are used to add or update records to the Database, I put the code that generates the GUI of these sub-forms in Functions.
There are two sub-forms which are "treated" as two main forms, since even them have n sub-forms, which perform various tasks.
Where am I stucked?
For the Main form I created a Status Bar, in order to display messages ( add/delete/update/search results ), and it works perfectly with all the forms which don't have other sub-forms.
For the two forms, which indeed have n sub-forms, I created two separated Status Bars, which are (re)created everytime I call the function that then displays the form.
Practically, I can't set icons to these two Status Bars, and I don't know why.
I'm really sorry that I don't feel clear enough, so, here you are an example of what I am saying.
I recreated exactly what my script does:
#include <GuiButton.au3> #include <GUIConstantsEx.au3> #include <GuiStatusBar.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) Global $frmSubForm, _ $txtSubFormField, _ $sbSubFormStatusBar, _ $objSB_IconError = _WinAPI_LoadShell32Icon(109), _ $objSB_IconInformation = _WinAPI_LoadShell32Icon(277) #Region ### START Koda GUI section ### Form= $frmMainForm = GUICreate("Main Form", 300, 300, -1, -1) GUISetOnEvent($GUI_EVENT_CLOSE, "ExitApplication") $sbMainStatusBar = _GUICtrlStatusBar_Create($frmMainForm) $btnCreateSubForm = GUICtrlCreateButton("Create Sub Form", 105, 110, 75, 41, BitOR($BS_CENTER,$BS_VCENTER,$BS_MULTILINE)) GUICtrlSetOnEvent(-1, "GenerateSubForm") GUICtrlSetFont(-1, 10, 400, 0, "Arial") _GUICtrlStatusBar_SetSimple($sbMainStatusBar) _GUICtrlStatusBar_SetText($sbMainStatusBar, "") GUISetState(@SW_SHOW, $frmMainForm) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func ExitApplication() Exit EndFunc Func GenerateSubForm() #Region ### START Koda GUI section ### Form= $frmSubForm = GUICreate("Sub-Form", 300, 300, -1, -1, -1, -1, $frmMainForm) GUISetOnEvent($GUI_EVENT_CLOSE, "DeleteSubForm") $txtSubFormField = GUICtrlCreateInput("", 0, 0, 100, 20) $btnCheckSubFormField = GUICtrlCreateButton("Check Field", 105, 110, 75, 41, BitOR($BS_CENTER,$BS_VCENTER,$BS_MULTILINE)) GUICtrlSetOnEvent(-1, "CheckSubFormField") GUICtrlSetFont(-1, 10, 400, 0, "Arial") $sbSubFormStatusBar = _GUICtrlStatusBar_Create($frmSubForm) _GUICtrlStatusBar_SetSimple($sbSubFormStatusBar) _GUICtrlStatusBar_SetText($sbSubFormStatusBar, "") GUISetState(@SW_SHOW, $frmSubForm) GUISetState(@SW_DISABLE, $frmMainForm) #EndRegion ### END Koda GUI section ### EndFunc Func DeleteSubForm() ; Declared Globally => $frmSubForm GUIDelete($frmSubForm) GUISetState(@SW_ENABLE, $frmMainForm) EndFunc Func WriteToStatusBar($sbStatusBar, $objSB_Icon, $strText) _GUICtrlStatusBar_SetIcon($sbStatusBar, 0, $objSB_Icon) _GUICtrlStatusBar_SetText($sbStatusBar, $strText) ConsoleWrite("Icon Handle: " & $objSB_Icon & @CRLF) EndFunc Func CheckSubFormField() ; Declared Globally => $txtSubFormField If GUICtrlRead($txtSubFormField) = "" Then ; Declared Globally => $sbStatusBar WriteToStatusBar($sbSubFormStatusBar, $objSB_IconError, "Field NOK.") Else WriteToStatusBar($sbSubFormStatusBar, $objSB_IconInformation, "Field OK.") EndIf EndFunc The text is set, but icon is not.
Could someone please tell me why?
Thanks everyone in advance