Jump to content

Recommended Posts

Posted

Hello, I am wondering how to make an autoit script that would create a .txt file.

Such as having an inputbox, and whatever you enter into the inputbox is put into the .txt file.

Posted (edited)

Hi Nigel.

In its simplest form you would use the functions

While 1

$textToWrite = InputBox ( "title", "Prompt" [, "Default" [, "password char" [, width, height [, left, top [, timeOut [, hwnd]]]]]] )

FileWriteLine ( filehandle or "filename", $textToWrite )

Wend

Something like

Global $file=@DesktopDir&"\File.txt"
Global $TextToWrite

While 1
    $TextToWrite = InputBox ( "Write Stuff", "What do you want me to write?" )
    FileWriteLine ($file,$TextToWrite)
WEnd

Cheers

NBJ

edit: bugger too slow!

Edited by NBJ
Posted

Thank you so much both of you :-)

Is there anyway to make a box read a .txt file?

Example:

I have test.txt on my desktop.

I want to have a script that will have a Msgbox read it, if that makes sense :)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...