Sign in to follow this  
Followers 0
mini

Help to save "$input" text to a temp.txt file

7 posts in this topic

Hello all, im trying to save some text from a "$input" to a .txt when i press the key to save files

Func button5();SAVE
    
    FileWrite("temp1.txt", "$input1")
    FileWrite("temp2.txt", $input2)
    ;$input3
    ;$input4
    MsgBox(0, "Save", "Temp Files Save")
EndFunc

Does anyone can help me?

Share this post


Link to post
Share on other sites



mini,

You need to use GUICtrlRead($input) - that gets the content rather than the ID of the control itself.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

mini,

Just do what I said above: :evil:

Func button5();SAVE
    FileWrite("temp1.txt", GUICtrlRead($input1))
    FileWrite("temp2.txt", GUICtrlRead($input2))
    FileWrite("temp3.txt", GUICtrlRead($input3))
    FileWrite("temp4.txt", GUICtrlRead($input4))
    MsgBox(0, "Save", "Temp Files Saved")
EndFunc

If you are having problems understanding the basics of AutoIt then might I suggest reading the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) - this will help you enormously. You should also look at the excellent tutorials that you will find here and here. There are even video tutorials on YouTube if you prefer watching to reading. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

mini,

We all start somewhere - usually at the bottom! The main thing is to make your own way up. ;) The tutorials will help a lot and AutoIt has probably the best Help file out there. And we are a friendly lot here (except when it comes to certain forbidden things! :evil: )

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

yes, I've bumped on one of does things today.

But i didn't want to be on this situation as the one I've bumped in.

I just been on my project for learning propose, I'm making a pause on my project today.

I'm tired, ill try again tomorrow or some days later after reading some more.

My project works with no problem, but it as no GUI, just MsgBox's.

A GUI makes it more "clean".

Thx very much for that help and the Tut's/Help links.

Share this post


Link to post
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
Sign in to follow this  
Followers 0