Sign in to follow this  
Followers 0
autow

FileWrite and Send

2 posts in this topic

#1 ·  Posted (edited)

I´ve made a little script to copy and glue the lines of a file (teclas.txt) using FileReadLine (),but the script is crazy he doesn´t copy and glue the correct text...he is attached

bot.au3

Thanks all

Edited by autow

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

have no idea whats going on, but in general,

use a for loop instead of the do until

send the actual key you set, not ("hotkeyset")

@scriptdir does not include the trailing backslash

should be closer:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=bot.exe
#AutoIt3Wrapper_Compression=0
#AutoIt3Wrapper_UseUpx=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
HotKeySet ("1","sair")
Func sair()
    Exit
EndFunc
$file = @ScriptDir & '\teclas.txt'
WinActivate ('(Untitled) * SciTE')
For $line = 1 to 99
$lineread = FileReadLine ($file,$line)
Send ('1')
Send ("'")
Send ($lineread)
Send ("'")
Send ('{Enter}')
next
Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

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