Sign in to follow this  
Followers 0
Tyrael9

Using If and send..

6 posts in this topic

#1 ·  Posted (edited)

Hi, if you could help me with this please:

Want to make a script that runs like this:

every time i press tab, then press "5", then f6, then f3, and then 3...

I've tried something like this:

While 1 = 1

If (Send ( "{TAB}" )) Then

Send ( "{NUMPAD5}" )

Sleep (2000)

Send ( "{f6}" )

Sleep (1000)

Send ( "{f3}" )

Sleep (1000)

Send ( "{NUMPAD3}" )

EndIf

WEnd

but it doesn't work D:

So, i really need help =D

Thanks...

Edited by Tyrael9

Share this post


Link to post
Share on other sites



HotKeySet("{TAB}","SendButtons") ;if you press tab, the function SendButtons will start
While 1 ;This is a loop, to keep the script alive, otherwise it will quit immediately
    Sleep(50) ; your cpu must survive this :-)
WEnd
Func SendButtons() ; here is your func, it sends all your desired buttons.
    Sleep (2000)
    Send ( "{f6}" )
    Sleep (1000)
    Send ( "{f3}" )
    Sleep (1000)
    Send ( "{NUMPAD3}" )
EndFunc

Share this post


Link to post
Share on other sites

One more doubt, can i make this work in a game?

Coz, it works!, i opened notepad, and it worked there, but not in the game i'm playing D:

Thanks for your help =).

Share this post


Link to post
Share on other sites

You just shot yourself in the foot. Support for games is not allowed on these forums.

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


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

oh, sry, didn't know it u.u...

Just lock the topic then =P.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Like Geo said, it's not allowed,

but a simple note : most games have protection for outside scripts, so that's why it doesn't work, it takes loads of experience to break through that protection

EDIT : typo's

Edited by heyhey

Share this post


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