找回密码
 加入
搜索
查看: 2023|回复: 7

[AU3基础] 怎么新建一个文件

  [复制链接]
发表于 2010-10-21 20:35:20 | 显示全部楼层 |阅读模式
我要写个程序,需要保存日志,先创建一个文本文件,再往里面写日志。请问怎么在硬盘上新建一个文件
发表于 2010-10-21 21:06:08 | 显示全部楼层
发表于 2010-10-21 21:11:34 | 显示全部楼层
#Include <File.au3>
_FileCreate($sFilePath)
发表于 2010-10-21 21:54:16 | 显示全部楼层
谢谢catcher 分享
发表于 2010-10-21 22:55:19 | 显示全部楼层
fileopen要注意,写log时,mode要设置为1,使log追加在文件后面
Can be a combination of the following:
  0 = Read mode
  1 = Write mode (append to end of file)
  2 = Write mode (erase previous contents)
  4 = Read raw mode
  8 = Create directory structure if it doesn't exist (See Remarks).
  16 = Force binary(byte) reading and writing mode with FileRead and FileWrite
  32 = Use Unicode UTF16 Little Endian reading and writing mode. Reading does not override existing BOM
  64 = Use Unicode UTF16 Big Endian reading and writing mode. Reading does not override existing BOM
  128 = Use Unicode UTF8 reading and writing mode. Reading does not override existing BOM
 楼主| 发表于 2010-10-22 09:23:46 | 显示全部楼层
学习了,谢谢大家的帮助
发表于 2010-10-22 10:04:21 | 显示全部楼层
路过看一下,有人答了,不再作答
发表于 2010-11-15 14:15:13 | 显示全部楼层
路过看一下,有人答了,不再作答
aft52577 发表于 2010-10-22 10:04



    fileopen最佳
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-21 18:51 , Processed in 0.073385 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表