Sign in to follow this  
Followers 0
nhd1986

Type a txt

6 posts in this topic

i want write a code which can type from a file .txt with speed 1 s/character to other, but i have some problem with ",', !, it can't do it, can you help me? thanks

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

From help file:

'+'
This tells AutoIt to send a SHIFT keystroke, therefore Send("Hell+o") would send the text "HellO". Send("!+a") would send "ALT+SHIFT+a".

Send Command (if zero flag) Resulting Keypress 
{!} !
Edited by BALA

[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

Share this post


Link to post
Share on other sites

From help file:

'+'
This tells AutoIt to send a SHIFT keystroke, therefore Send("Hell+o") would send the text "HellO". Send("!+a") would send "ALT+SHIFT+a".

Send Command (if zero flag) Resulting Keypress 
{!} !
thanks, but all character in a txt file, can you show me a code which do that, plz? thanks

Share this post


Link to post
Share on other sites

thanks, but all character in a txt file, can you show me a code which do that, plz? thanks

If you look at the BALA's second quote it says something about a flag... It might be a good idea to at least study

and try to understand what a function's parameters does. In your case you can just set the second parameter to 1.

flag = 0 (default), Text contains special characters like + and ! to indicate SHIFT and ALT key-presses.

flag = 1, keys are sent raw.

Share this post


Link to post
Share on other sites

;Reading from file
;It should be function FileRead.
;But, I will assign it in var without loading a file.
$read = "Hi there! Welcome to AutoIt, a scripting language. ^_^"
;Open Notepad
Run("notepad.exe")
;Now wait window to be active
WinActivate("Untitled - Notepad")
;Sends before saved text in variable... and here we go!
Send($read,1)

Not tested, but I think it will work.

i542


I can do signature me.

Share this post


Link to post
Share on other sites

Tested and worked ...


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

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