Jump to content

Need to be able to take a random word from a file and enter into a send command


Recommended Posts

is it a txt file? How big is it? How many lines of code does it have? Where do you want to send the word? always Give as much info as possible.!

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

Hi,

Thank you for your replies.. The file would be a text file with one word per line and have about 200 words.. The word would just be sent using the Send command.. With the above example, how would you code that into a send command?

Many Thanks

Ian

Link to comment
Share on other sites

something like this

;~ Count How mny lines are in the file - $i
For $i = 1 to 999999999999999999
    $line = FileReadLine('doujin[001].txt',$i) ; readline
    If @error = -1 Then ExitLoop ; exit,loop if end of file
    ToolTip('line: ' & $i & ' ' &$line,0,0)
Next


While 1
    $random = Random(1, $i, 1) ; generate an integer between 1 and $i - is the Nr of lines we found
    $line = FileReadLine('doujin[001].txt',$random)
    Send($line & @CRLF)
    Sleep(1000)
WEnd
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
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...