举报
Global $file,$sn,$line,$result HotKeySet("{F4}", "ReadLine");设立‘键盘F4’为热键 While 1 Sleep(500) WEnd Func ReadLine() $file = FileOpen("test.txt", 0);打开需读取的文本 $sn=Random(1,3,1);随机抽取的行数 $line = FileReadLine($file,$sn);读取随机行数的文本 TrayTip("已转存数据", $line,0);托盘提示,可删除或换成MsgBox FileClose($file);关闭文本 $result = FileOpen("result.txt", 1);打开需写入的文本 FileWriteLine($result,$line);在文章末尾写入之前读取的随机行数文本,并自动加回车键 FileClose($result);关闭文本 EndFunc
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-3-3 05:32 , Processed in 0.078510 second(s), 23 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.