Sign in to follow this  
Followers 0
sunlord

Storing a value of an input box to a notepad file

25 posts in this topic

Say I have an input box in my GUI, how do I make it so that whatever I type in the input box gets stored in a new notepad file?

Share this post


Link to post
Share on other sites



HI,

CuiCtrlRead your inputbox and then ControlSend it to the notepad.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

#region --- GuiBuilder code Start ---
; Script generated by AutoBuilder 0.6 Prototype

#include <GuiConstants.au3>

GuiCreate("MyGUI", 392, 242,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Edit_1 = GuiCtrlCreateEdit("Edit1", 20, 10, 360, 170)
$Button_2 = GuiCtrlCreateButton("Save Text", 140, 200, 80, 30)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    If $msg = $Button_2 Then
        $Edit_Text = GUICtrlRead($Edit_1)
        MsgBox(0, "Your text...", $Edit_Text)
        $file = FileOpen("text.txt", 2)
        FileWrite($file, $Edit_Text)
    EndIf
    
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
        ;;;
    EndSelect
WEnd
Exit
#endregion --- GuiBuilder generated code End ---

That will store the edit box text when you press the button.... how does that work for you?

EDIT: Bah th.meger beat me to it

Edited by someone

While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thank you. And also is there a way to send this notepad file to an e-mail? I'm trying to make a program which sends "To-do" notes that I make directly to my e-mail.

Edited by sunlord

Share this post


Link to post
Share on other sites

Hi,

and why storing first into an file?

_INetSmtpMail

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

What does that do?

Share this post


Link to post
Share on other sites

I guess it sends something over e-mail but how exactly do I use it with my example?

Share this post


Link to post
Share on other sites

I guess it sends something over e-mail but how exactly do I use it with my example?

What about stop guessing and open the helpfile which has all the info you are asking for ?

Let us know when you have questions about the info found ..

:)


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

For a General Help and Support forum, not so helpful. Thanks anyway. I'll have a look at it and get back to you.

Share this post


Link to post
Share on other sites

For a General Help and Support forum, not so helpful. Thanks anyway. I'll have a look at it and get back to you.

Excuse me ?

Think the average responsetime has been pretty good.

We pointed you to the food... now you want us to serve it for you as well or are you a big enough to get it yourself.


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

When th.meger said _INetSmtpMail it wasn't very clear (atleast to me) what that does, so I asked to explain what exactly the function does to which the reply (I thought) was rather rude. If you want all AutoIt newbies to learn AutoIt just by going through the help file then you might as well just shut this site down. I thought the whole point of this forum was asking help and answering questions anyway? I'm not asking you to do my code for me, as you suggested, I was just asking to explain what that particular function is for.

Edited by sunlord

Share this post


Link to post
Share on other sites

I think this is the point they were getting at. If you opened the help file and looked up the function in question, you would have seen the description below.

_INetSmtpMail

--------------------------------------------------------------------------------

Sends an email without using an external email program.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

When th.meger said _INetSmtpMail it wasn't very clear (atleast to me) what that does, so I asked to explain what exactly the function does to which the reply (I thought) was rather rude. If you want all AutoIt newbies to learn AutoIt just by going through the help file then you might as well just shut this site down. I thought the whole point of this forum was asking help and answering questions anyway? I'm not asking you to do my code for me, as you suggested, I was just asking to explain what that particular function is for.

I understand what you want and to my knowledge have been all but rude to you.

This was the answer I gave you: Open the helpfile and look up the function and read.

This would have been rude: Shut the hell up and open the damn helpfile where you can read all the shit you want to know.

Now see the difference ? :)

I will not resort to that kind of language unless you are really asking for it ...

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I'm sorry but this,

What about stop guessing and open the helpfile which has all the info you are asking for ?

Let us know when you have questions about the info found ..

:)

isn't a very helpful response. You could have just told me what it does. It would have taken all of 2 minutes of your time. Thanks anyway. Lets just end this.

Share this post


Link to post
Share on other sites

I'm sorry but this,

isn't a very helpful response. You could have just told me what it does. It would have taken all of 2 minutes of your time. Thanks anyway. Lets just end this.

Thanks for understanding I am going through more effort then really needed just to help you, but :

the underlying message is that we have a pretty good helpfile that explains build-in functions and User Defined Functions and all have an example.

Glad you appreciate the effort :)


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Can I ask you how you find out what your SMTP server is; I can't find the instructions for it anywhere on the helpfile?

Share this post


Link to post
Share on other sites

Can I ask you how you find out what your SMTP server is; I can't find the instructions for it anywhere on the helpfile?

Sure... That should point to your (EMail) providers SMTP host, like you would have in OutlookExpress or something.

If you want to use GMail you will need to use the _INetSmtpMailCom() function I posted in the Examples forum because GMail hosts requirs Authentication..


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Hi,

depends on your email "provider" have a look at google for it. hotmail, gmx smtp !

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Its not normally 127.0.0.1 is it? That's what it says on my Outlook Express but its not letting me send a mail there.

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