Jump to content
Sign in to follow this  
figman

How do you make a script that repeats text and clicks enter?

Recommended Posts

figman

I just downloaded autoit...

I need help making a script that types a statement, and then clicks enter.

Can someone help me?

Share this post


Link to post
Share on other sites
leuce

I need help making a script that types a statement, and then clicks enter.

Is this for a game?

http://www.autoitscript.com/forum/forum-2/announcement-12-game-bots-and-automation/

Share this post


Link to post
Share on other sites
SadBunny

I just downloaded autoit...

I need help making a script that types a statement, and then clicks enter.

Can someone help me?

He doesn't mention game automation... So in the spirit of "innocent until proven guilty":

send("This is a statement{enter}")

:graduated:

Figman: nevertheless it is wise to heed the forum rules...

Edited by SadBunny

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites
figman

Thanks :(

I'm gonna go test that.

I will not answer that question on the grounds that it may incriminate me. :graduated:

Also, though, how can you make it loop??? :S

Edited by figman

Share this post


Link to post
Share on other sites
SadBunny

Since your initial reply was that it is for a game, I wouldn't count on too much help on this issue any more.


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites
Foxhound

shoot... :graduated:

I suggest you read the help manual that comes with AutoIT.

Infinite Loop:

While 1
sleep(500) ;half a second to reduce CPU usage
send("This is a statement{enter}")
WEnd

Or a finite loop:

$i = 1
While $i <= 100 ;where 100 is the number of times it will loop
sleep(500) ;half a second to reduce CPU usage
send("This is a statement{enter}")
$i += 1
WEnd

Share this post


Link to post
Share on other sites
leuce

Infinite Loop:

While 1
sleep(500) ;half a second to reduce CPU usage
send("This is a statement{enter}")
WEnd
I have found that it is often useful if the send action is immediate, which can be achieved by adding the statement to the clipboard and sending "^v". I'm not sure if there is a better way to send a long string in a way that it is sent in an instant instead of one character at a time.

Share this post


Link to post
Share on other sites
Valik

Thread locked.

Two comments here. First, don't bait people into admitting if a thread is about a game if they aren't saying 'Hey I have this game how do I...". This question was properly phrased not to mention game. Second, don't answer if people are trying to bait you.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×