Sign in to follow this  
Followers 0
AusthistikateD

[Question]Regarding Send()

13 posts in this topic

#1 ·  Posted (edited)

I just wanna ask...

Cuz I made an auto spacebar command...

I just wanna know how to set the time for the spacebar to spam...

I mean, like in auto clicker we can change the speed for it to click fast...

Cuz in my auto spacer...

I set the Sleep to 0 so 0 seconds and it can spam spacebar...

Any idea?

Or how to improve this one to make a super fast auto spacer??

Here's the code...

And one thing...

How can I make it to target only the game window that Im playing??

Sorry for the noob questions...

Thanks!!

:)

HotKeySet("]", "AutoLoot")
HotKeySet("[", "Release")
Global $loot = 0
TrayTip ( "", "Auto-spacer" & @CRLF & "] to Activate" & @CRLF & "[ to Deactivate", 60 , 1 )
While 1
Sleep(0)
while $loot == 1
send("{SPACE}")
wend                            
WEnd

func AutoLoot()
$loot = 1
endfunc

func Release()
$loot = 0
endfunc
Edited by AusthistikateD

Share this post


Link to post
Share on other sites



What if you remove the Sleep command.

And use Opt() to tweak SendKeyDelay and the other send option.

Share this post


Link to post
Share on other sites

Opt()??

Can u give me some examples??

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Opt()??

Can u give me some examples??

Check out the manual

Edited by amokoura

Share this post


Link to post
Share on other sites

Opt()??

Can u give me some examples??

CODE
Opt("WinWaitDelay", 250) ;250 milliseconds

250 is the default so you'd probably want to make it a smaller number for what you want. I just grabbed this example straight from the help file. The help file has a lot of good information. It can be hard to know what kinds of functions you need but once you figure it out (like someone suggestion using Opt ) you should proceed directly to the helpfile and it has most of what you need. Also doing a search in the forums and finding other people who have used the functions you want helps a great deal.


Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic]

Share this post


Link to post
Share on other sites

Ok thanks for the fast reply...

I'll check my manual...

:)

Share this post


Link to post
Share on other sites

ControlSend()

also add some sleep dude or it will take over the %50 of cpu :)


:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Share this post


Link to post
Share on other sites

Ok...

Now got it working...

Another question...

How can I make the script target a certain window??

Share this post


Link to post
Share on other sites

Ok...

Now got it working...

Another question...

How can I make the script target a certain window??

Try WinActivate


Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic]

Share this post


Link to post
Share on other sites

Ok...

Now got it working...

Another question...

How can I make the script target a certain window??

ControlSend("Certain Window Title","", "Control Name", "{KEY}")

you can get control info with au3info that can be found in you autoit folder


:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Share this post


Link to post
Share on other sites

Alrighty thanks for the fast reply guyz!!

Now I can enjoy my game and at the same time browse the internet, forums & chat...

Thanks :)

Share this post


Link to post
Share on other sites

Oh one thing...

Its working but when the window is not active it wont send the space...

Any tips here?

Share this post


Link to post
Share on other sites

*BUMP*

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