Jump to content

input and store to Text file - (Moved)


Tazmono
 Share

Recommended Posts

  • Moderators

Moved to the appropriate AutoIt General Help and Support forum, as the AutoIt Example Scripts forum very clearly states:

Quote

Share your cool AutoIt scripts, UDFs and applications with others.


Do not post general support questions here, instead use the AutoIt Help and Support forums.

Moderation Team

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

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

Tazmono,

Welcome to the AutoIt forums.

Not very hard to do at all. Look at the following functions in the Help file and see what you can come up with:

GUICreate, GUICtrlCreateInput, GUICtrlCreateButton, FileWrite.

If you get stuck, you know where we are.

M23

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

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

38 minutes ago, Tazmono said:

How hard would it be to make a small GUI that has 4-5 user inputs that would import the user input to a text file stored  within a folder ????

 

For most of us would be trivial but for someone not familiar with AutoIt or programming in general might be a little bit of effort. Take a look in help file at GUICreate(), GUICtrlCreateInput(), GUICtrlRead() and file operation functions. All these comes with basic examples, try something and if you encounter issues just post the code and we can assist you. I'll give you a start with a template GUI but you will have to implement the part where data is written in the file.

$hMain = GUICreate('Test', 200, 200)
$cInput1 = GUICtrlCreateInput('', 10, 10, 180, 20)
$cInput2 = GUICtrlCreateInput('', 10, 40, 180, 20)
$cInput3 = GUICtrlCreateInput('', 10, 70, 180, 20)
$cInput4 = GUICtrlCreateInput('', 10, 100, 180, 20)
$cInput5 = GUICtrlCreateInput('', 10, 130, 180, 20)
$cSave = GUICtrlCreateButton('Save', 50, 160, 100, 30)
GUISetState(@SW_SHOW, $hMain)

While True
    Switch GUIGetMsg()
        Case -3 ; GUI_EVENT_CLOSE
            Exit
        Case $cSave
            ; Read the values from each input using GUICtrlRead() function
            ; Open the file with FileOpen(), write the read values to file using FileWrite() 
            ; or FileWriteLine() and the close the file with FileClose().
    EndSwitch
WEnd

 

Edited by Andreik

When the words fail... music speaks.

Link to comment
Share on other sites

Ye im 100 new to this , figured this would be a good place to start learning , im pretty good at looking a code structure and seeing what makes it functions and how it works . Changing things then running them , taking things out to see how they fail etc

 

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