Sign in to follow this  
Followers 0
lawonama

How to speed up SEND?

21 posts in this topic

So I have this command:

Send("hello!")

Can I make it, that in 1 second it would said 100 times Send("hello!") ??

Share this post


Link to post
Share on other sites



First look for SendKeyDelay in the help file. Secondly don't rely on using Send (depending on circumstance).

Share this post


Link to post
Share on other sites

Thirdly, if this goes towards making an auto-spammer for some game don't expect too much help. :D

1 person likes this

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Thirdly, if this goes towards making an auto-spammer for some game don't expect too much help. Posted Image

I know the forum rules, and I know what I'm asking for. This isn't for a game neither is it a spam bot.

I just want-to learn everything possible about this. Like 100 times in one second was just something.

I might need 10 times in one second or something like that.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

There was a similar question asked yesterday which appeared to be about bypassing anti-bot login proceedures. I think that's why BrewManNH was warning you against anything like that. This question seems normal enough to me though, just avoid anything like that and people will glady help you. :)

Edited by czardas

Share this post


Link to post
Share on other sites

I quit scripting for a very long time and now I want to re-start it.. So I really want-to learn it.

I couoldn't understand anything about the "SendKeyDelay" though.. Is there any example or something.. Please/

Share this post


Link to post
Share on other sites

AutoItSetOption ( "SendKeyDelay" , 0 )

For $i = 1 To 100 Step 1

Send("hello")

Next

I think that's about as fast as it will get as SetOption 0 removes any delay


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

AutoItSetOption can be written as Opt as well

Opt("SendKeyDelay", 0)

For $i = 1 To 100 ; Step 1 isn't necessary as that is the default behavior when no 'step' value is defined.
    Send("hello")
Next

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Share this post


Link to post
Share on other sites

AutoItSetOption ( "SendKeyDelay" , 0 )

For $i = 1 To 100 Step 1

Send("hello")

Next

I think that's about as fast as it will get as SetOption 0 removes any delay

Can't this be even FASTER ?

Share this post


Link to post
Share on other sites

Can't this be even FASTER ?

There is no delay, so I think that it should be the maximum speed.

Share this post


Link to post
Share on other sites

Can't this be even FASTER ?

Already seems fast enough to me? What do you need to make that would need to send keys so many times in a small amount of time. There are probs alternative solutions.

Share this post


Link to post
Share on other sites

This finished for me in just over 3 seconds. I would concur with Venix, if you have a specific problem you're trying to overcome, explain what you are trying to do. There may be other ways to give you the result you're looking for.

1 person likes this

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Can't this be even FASTER ?

I haven't tried it, but how about...

AutoItSetOption ( "SendKeyDelay" , 0 )
$hello = ""
For $i = 1 To 100
   $hello = $hello & "hello"
Next
Send($hello)

Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

You want faster?

Opt("SendKeyDelay", 0)
Opt("WinTitleMatchMode", 2)
ClipPut("hello")
$sWindowTitle = "Put window title here."
WinActivate($sWindowTitle)
For $i = 1 To 100
   ControlSend($sWindowTitle, "", "", "^v")
Next

:bike:

tested both the previous post and this one in notepad and there's about a 1/2 second difference XD

Edited by mechaflash213

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Share this post


Link to post
Share on other sites

Or even faster... combine mine with the code from mechaflash213.


Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

Nevermind it worked.. But can't it be even MORE faster?

Edited by lawonama

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

Maybe This Guy can help it go faster.

Here's their contact information and corporate headquarters location.

Just tell Ginni that you want to borrow him for a day or two.

Edited by mechaflash213

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Share this post


Link to post
Share on other sites

Nevermind it worked.. But can't it be even MORE faster?

Simple answer, NO it can't be that much faster. It takes time to send the characters to a window, the window takes time accepting them, this all adds up to a delay. It's similar to a propagation delay in a network or electronic circuit. Even though the electrons are speeding along at nearly the speed of light, the delay introduced by the circuitry is going to make things take longer than it would take to send it by other means, such as a fiber optic cable has a VERY slight propagation delay but the circuits needed to translate what was sent so other equipment can understand it introduces a larger delay.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Nevermind it worked.. But can't it be even MORE faster?

Yes you can get it to go a little bit faster if you are prepared to spend a few thousand of the fastest PC availble.

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

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