Jump to content

Possible to ??...


LerN
 Share

Recommended Posts

I don't actually know how to build GUIs in C++.  Now I've done it by writing my own GUI functions in C++ using SDL.  That's a shit ton more work, and I like AutoIt better.  But hey, we use what we know. :)

Edited by Xandy
Link to comment
Share on other sites

LerN,

My question and response was meant to get some clarity to your somewhat vague probing.  As I suspected, you are trying to figure out how best to leverage your learning experience without wasting time on subjects that may not be useful.  From the answers provided, you should be starting to realize that there is no real "best" language to learn as it all depends upon what you will be doing.  However, AutoIt is so easy to learn that it is a good tool to keep in your "back pocket" for adhoc programming/automation.  You might be better served talking to a school counselor, especially one with business connections.

Good Luck,

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Link to comment
Share on other sites

6 hours ago, LerN said:

Is it possible that autoit is used to create the based software or programs to company's ? or what is the important language that is used to create these programs?

yes its possible for me autoit is the best, right now im using autoit to automate most of my works like updating links, copy files, find missing files., etc... , I also created documentation software but got lazy to finish it:D

 

for me autoit is a very powerful tool, it is same like the other language out there. B)

 

Edit: I forgot to tell, autoit has also a very friendly and healthy forums. ;)

Edited by 232showtime

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Link to comment
Share on other sites

Actually, if I want to create a GUI application with a lot of control elements I use ISF Form Studio 2 in ISN AutoIt Studio to create the framework of the GUI. And for large projects I use ISN as my IDE too. SciTE is great for when working on some small stuff but a full blown IDE makes managing multiple files in a project easier. Plus any other files needed in the project (icons, dlls, images, ini files, etc.)

Edited by InunoTaishou
Link to comment
Share on other sites

20 hours ago, LerN said:

So no point of becoming professional in autoit ? :(

Take a look at this thread:

 

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

Here is a form example.  I think you could do a lot of forms with this.

Enter data like this: (You can add data anywhere after index: 0 )

Data entered into the "" (The first cell of each index) will become the default data for the form field.

Local $aForm_patient = [[0, "Array Count", "input"], _
                        ["", "Name", "input"], _
                        ["", "Address", "input"], _
                        ["", "Phone", "input"], _
                        ["", "Email", "input"], _
                        ["", "Contact method|Phone|Email", "combo"], _
                        ["", "Chat Gem", "checkbox"] _
                        ];

 

And it comes out like this

s_21.jpg

CHALLENGE: Add a tooltip data and tooltip function for the fields.

Should be easy to add new control types to the form_dialog() or any other dialogs for things like: read-only, number-only, button...  Maybe make functions to create each control type based on form field specifications.  I didn't take it that far yet, you'll see it hardcoded in the form_dialog().

#include <GUIConstants.au3>; Defines GUI_EVENT_CLOSE
#include <GuiComboBox.au3>; I use to force a combobox selection

; Name the fields
; (Useful to specify a field with code)
Enum $eForm_name, _
    $eForm_address, _
    $eForm_phone, _
    $eForm_email, _
    $eForm_contact_method, _
    $eForm_chat_gem

; Describe the datas
Enum $eForm_data, _
    $eForm_data_label, _
    $eForm_data_type

; Main GUI
main()
Func main()

    ; The data to create the Form is here:
    ; (I should have used the Enum names above to specify the index names for consistency but I am lazy)
    ; Data in the "" or first cell will be the default value for the field.
    Local $aForm_patient = [[0, "Array Count", "input"], _
                            ["", "Name", "input"], _
                            ["", "Address", "input"], _
                            ["", "Phone", "input"], _
                            ["", "Email", "input"], _
                            ["", "Contact method|Phone|Email", "combo"], _
                            ["", "Chat Gem", "checkbox"] _
                            ];

    ; Record total or use Ubound() - 1 everytime
    $aForm_patient[0][$eForm_data] = UBound($aForm_patient) - 1
    ; Create Main GUI dialog
    $hGui = GUICreate("Main", 320, 200)
    ; Create Button to open Form dialog
    $form_button = GUICtrlCreateButton("Open Form", 50, 50, 100, 20)
    GUISetState(); Show the Main GUI
    Do
        ; Loop to capture user Input
        $msg = GUIGetMsg()
        ; Open the Form dialog
        If $msg = $form_button Then form_dialog($aForm_patient, $hGui)
    Until $msg = $GUI_EVENT_CLOSE
EndFunc; main()

; Form allows user to change their data
Func form_dialog(ByRef $aForm, $hGui_parent)
    ; Height room for each field
    $pad_y = 25
    ; Create Form dialog GUI
    $hGui = GUICreate("Form", 320, 50 + $aForm[0][0] * $pad_y, Default, Default, Default, Default, $hGui_parent)
    $aGui_rect = WinGetPos($hGui); Store size here
    GUISetState(); Show the new GUI
    ; GUI control array
    Local $aControl[$aForm[0][0] + 1]
    ; GUI control positions and data sizes
    $label_x = 10
    $indent_y = 5
    $data_x = 150
    $data_w = $aGui_rect[2] - $data_x - 25
    $confirm = 0
    ; Create controls
    For $i = 1 To $aForm[0][0]
        $cursor = $indent_y + ($i - 1) * $pad_y
        Switch $aForm[$i][$eForm_data_type]
            Case "input"
                ; Create label for Input field
                GUICtrlCreateLabel($aForm[$i][$eForm_data_label], $label_x, $cursor)
                ; Create Input field
                $aControl[$i] = GUICtrlCreateInput($aForm[$i][$eForm_data], $data_x, $cursor, $data_w)
            Case "combo"
                ; Find the first "|" in the label
                $label_end = StringInStr($aForm[$i][$eForm_data_label], "|")
                ; Use the first segment as description for combobox field
                $label = StringMid($aForm[$i][$eForm_data_label], 1, $label_end - 1)
                GUICtrlCreateLabel($label, $label_x, $cursor)
                ; Use right of first "|" as combobox data to select from
                $label = StringMid($aForm[$i][$eForm_data_label], $label_end + 1)
                $aControl[$i] = GUICtrlCreateCombo("", $data_x, $cursor, $data_w)
                ; Use user's selection if any
                GUICtrlSetData($aControl[$i], $label, $aForm[$i][$eForm_data])
                ; If blank select first choice
                If GUICtrlRead($aControl[$i]) = "" Then _GUICtrlComboBox_SetCurSel($aControl[$i], 0)
            Case "checkbox"
                $aControl[$i] = GUICtrlCreateCheckbox($aForm[$i][$eForm_data_label], $label_x, $cursor, $data_w)
                ; Check the box if the data says it's checked
                If $aForm[$i][$eForm_data] = $GUI_CHECKED Then GUICtrlSetState($aControl[$i], $GUI_CHECKED)
        EndSwitch; type
    Next; i in aForm[0][0]
    ; Confirm_button used to validate user setting changes
    $confirm_button = GUICtrlCreateButton("Confirm", $aGui_rect[2] - 80, $aGui_rect[3] - 60, 55, 20)

    Do
        ; Loop to capture user changes
        $msg = GUIGetMsg()
        ; confirm_button
        If $msg = $confirm_button Then $confirm = 1
    Until $msg = $GUI_EVENT_CLOSE Or $confirm = 1
    ; Change the data
    If $confirm = 1 Then form_read($aForm, $aControl)

    ; Remove the expired GUI
    GUIDelete($hGui)
EndFunc; form_dialog()

; Inserts GUI control data to aForm
Func form_read(ByRef $aForm, $aControl)
    For $i = 1 To $aForm[0][0]
        $aForm[$i][$eForm_data] = GUICtrlRead($aControl[$i])
    Next; i in aForm
EndFunc; form_read()

 

Edited by Xandy
Link to comment
Share on other sites

 

16 hours ago, LerN said:

Do u guys use skin or just koda ? I really need to know how to create good forms :/

I use koda, because I can create GUI in no time.

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <ProgressConstants.au3>
#include <SliderConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 449, 192, 114)
$Radio1 = GUICtrlCreateRadio("Radio1", 16, 16, 113, 17)
$Radio2 = GUICtrlCreateRadio("Radio2", 16, 48, 113, 17)
$List1 = GUICtrlCreateList("", 160, 16, 121, 97)
$Checkbox1 = GUICtrlCreateCheckbox("Check me", 16, 136, 97, 17)
$Input1 = GUICtrlCreateInput("Input1", 160, 136, 121, 21)
$Label1 = GUICtrlCreateLabel("Label1", 24, 200, 36, 17)
$Progress1 = GUICtrlCreateProgress(160, 184, 150, 16)
$Slider1 = GUICtrlCreateSlider(160, 224, 150, 45)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        case $Checkbox1
            MsgBox(64, "Hello", "Hellow World!!!")


    EndSwitch
WEnd

 

Edited by 232showtime

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Link to comment
Share on other sites

16 hours ago, LerN said:

Do u guys use skin or just koda ? I really need to know how to create good forms :/

Good forms start with the design, not the code.  Do a google search on "windows forms design".  Admittedly, most coders, including myself, put up a basic form and tweak it as we go along.

As for Koda, I tried to use it once and found it cumbersome.  I have never used the ISN Studio but will give it a try if I every tackle a large project (largest project to date is a sports stats app with 15 or so screens).

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Link to comment
Share on other sites

@LerN,

Before I've learned Autoit I have C++, java, and PHP but all this coding from that languages are need more details and sometimes frustrating, I need to study in school for those coding just to learn more. But in autoit, I've been coding for almost a year (reading guides, listen to others advise etc...) and it gives me lots of automations easily (with help from the forum of course....cheers!).:lol:

I'm currently working in a company that navigates website, manipulate documents, create server base automations, mailing system etc.... and these languages are coded with Autoit, VBA, and CMD only which is so powerful and simple.B) but of course this is just for me using these laguages and I'm not the only person here in our company uses these but lots of us here but some are using C++,PHP, etc....;)

And I bow down with Moderators, MVPs, Developers, Universalist and other people in this forum in continuing the support and help to people like us.:P BIG respect GUYS.....!

 

KS15

Programming is "To make it so simple that there are obviously no deficiencies" or "To make it so complicated that there are no obvious deficiencies" by C.A.R. Hoare.

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