Sign in to follow this  
Followers 0
AzGuL^

sending txt file content

5 posts in this topic

HotKeySet("{END}", "End")
HotKeySet("{HOME}", "mp3")

While 1
    Sleep(1)
WEnd

Func End()
    Exit
EndFunc

Func mp3()
    Send("{ENTER}")
    Sleep(100)
    Send("...?")
    Sleep(100)
    Send("{ENTER}")
EndFunc

I've made this little script.. The problem now is that I need the autoit script to read a txt file and at the Send("...?") "paste" the content of this txt file.

Can anyone tell me how to do this? :D

Thanks for your time.

Share this post


Link to post
Share on other sites



Look at FileRead() in the help file.


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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Look at FileRead() in the help file.

Thank you very much :D

HotKeySet("{END}", "End")
HotKeySet("{HOME}", "mp3")

$mp3txt = FileRead("mp3.txt", 100)

While 1
    Sleep(1)
WEnd

Func End()
    Exit
EndFunc

Func mp3()
    Send("{ENTER}")
    Sleep(100)
    Send($mp3txt)
    Sleep(100)
    Send("{ENTER}")
EndFunc

I made something work, lol :D

EDIT; How can I make it read whole file instead of xx chars?

Edited by AzGuL^

Share this post


Link to post
Share on other sites

EDIT; How can I make it read whole file instead of xx chars?

If your using the released version then it would be
$mp3txt = FileRead("mp3.txt", FileGetSize('mp3.txt'))oÝ÷ Ø   ÝëZÜ(ºW[zȦ¦ºÚ"µÍÌÍÛÝH[TXY
    ][ÝÛË    ][ÝÊ

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.

Share this post


Link to post
Share on other sites

Yay, thank you for your help. Problem is solved and this topic can be closed :D

Share this post


Link to post
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
Sign in to follow this  
Followers 0