Jump to content

open text document and..


sumkid
 Share

Recommended Posts

hey, anyway i can use maybe fileread to open a text document and get some info from there and then paste it somewhere else? like maybe if there are multiple lines of code so it will try line 1, then line 2 ETC.

(not for a keylogger no worries :-P )

Edited by sumkid
Link to comment
Share on other sites

  • Moderators

FileRead or FileReadLine

ClipPut

----

Look at

ControlSend

Or

ControlSetText

Or just

Send

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

Yes, here is the example for FileReadLine() in the help file:

$file = FileOpen("test.txt", 0)

; Check if file opened for reading OK
If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf

; Read in lines of text until the EOF is reached
While 1
    $line = FileReadLine($file)
    If @error = -1 Then ExitLoop
    MsgBox(0, "Line read:", $line)
Wend

FileClose($file)

Then look at Send() or ControlSend() or ControlSetText() to place the read text into some sort of edit control. If you want more help, please post the code you have so far. We aren't going to to spend time doing something for you that you yourself wouldn't even spend time doing. More than willing to push you in the right direction though.

EDIT: Beaten by Smoke_N

- The Kandie Man ;-)

Edited by The Kandie Man

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

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