Jump to content

Using If and send..


Tyrael9
 Share

Recommended Posts

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
Link to comment
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

Link to comment
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!"

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...