Jump to content

Random Input Text?


Recommended Posts

Hi im quite a new with autoit3 nad my english is not so good, but i'll try.

I scripted the autoit to click in a box, now i want it to put in a line from a text file... something like this:

Input Line 17 (randomText.txt)

get it? :think:

Would love help. bye

Link to comment
Share on other sites

RTFM

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
Share on other sites

RTFM

I hope that does not stand for 'Read The $%$%ing Manual' as you need to stop your counterproductive belidgerance

and here is the code that will do what you are asking, and check to see if the file really exists.

$filename = "D:\Program\AutoIt3\texten.txt"
$linecount = _FileCountLines($filename)
if @error = 0 then
send(FileReadLine($filename,Random(1,$linecount,1))
else
msgbox(0,"Error","Error Reading File")
endif

Things I have made:[font="Trebuchet Ms"]_CheckTimeBlock UDF(LT)MOH Call Ignore List (MOH = Modem On Hold)[/font]

Link to comment
Share on other sites

I hope that does not stand for 'Read The $%$%ing Manual' as you need to stop your counterproductive belidgerance

and here is the code that will do what you are asking, and check to see if the file really exists.

$filename = "D:\Program\AutoIt3\texten.txt"
$linecount = _FileCountLines($filename)
if @error = 0 then
send(FileReadLine($filename,Random(1,$linecount,1))
else
msgbox(0,"Error","Error Reading File")
endif
u forgot to include misc.au3

#include <misc.au3>
$filename = "D:\Program\AutoIt3\texten.txt"
$linecount = _FileCountLines($filename)
if @error = 0 then
send(FileReadLine($filename,Random(1,$linecount,1))
else
msgbox(0,"Error","Error Reading File")
endif
Link to comment
Share on other sites

Yes, it does stand for Read The ****ing manual. This problem could be easily solved, had he read the documentaiton provided. There was really no need for a post on the forums. Furthermore, I don't see how it was counterproductive, when I was simply trying to help him help himself

~cdkid

Edited by cdkid
AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
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...