Jump to content

Create Text Files


Recommended Posts

  • Moderators

You have a UDF called LogEvent() and you don't know how to create a text file?

Look up FileOpen()... eg.

FileClose(FileOpen(@HomeDrive & "\mytextfile.txt", 2))

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.

Link to comment
Share on other sites

filewrite always write it for me.. depending if the path exists... but if the file doesn't it will write it

Link to comment
Share on other sites

So even if the text file doesn't exist fileopen will make it?

Maybe you should try to open the helpfile once, then you would see that it already answers all you need to know and that you should always check there first.

Non-existing directory structure:

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

By default the file will not be created if the directory structure doesn't exist.

To overwrite this behaviour use the modes '1' or '2' together with mode-flag '8'!

For instance the mode-flag '9' (1 + 8) checks for the directory structure and if it doesn't exist creates it automatically and then opens the file for appending.

Link to comment
Share on other sites

  • Moderators

So even if the text file doesn't exist fileopen will make it?

Run the example... then you can write the answer to that question yourself :) .

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.

Link to comment
Share on other sites

use the helpfile link in my sig then

PS its autoit docs

Link to comment
Share on other sites

While the online help file will work, I recommend having the offline version. If you don't want to reinstall autoit, you can probably pull the docs from AutoIt - Self Extracting Archive (for those who don't like/want an installer)

http://www.autoitscript.com/autoit3/downloads.shtml

Trying to use AutoIT without a functioning help file at hand is cruel and unusual torture. I still use it ALL THE TIME to check up specific options, functions I've never used before, etc.

Link to comment
Share on other sites

My helpfile will not work, do not suggest reinstalling auto it.

There are more things wrong with that sentense than are right.

1. Helpfile will work.

2. It's spelled AutoIt.

3. Reinstalling has nothing to do with it, if you can run AutoIt then you already have the helpfile installed to the same folder.

4. There are 2 online helpfiles, if you can post on this forum then you must be able to use them.

5. You will have to start using the helpfile someday. People will not answer this kind of obvious questions for an eternity.

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