Spiritthirst Posted October 22, 2007 Share Posted October 22, 2007 Hi everyone.. as you can see I am new to this Just wondering if anyone can help me make a script Keypress W 10 times Keypress s once Repeat over and over again Link to comment Share on other sites More sharing options...
rasim Posted October 22, 2007 Share Posted October 22, 2007 Opt("SendKeyDelay", 100) While 1 For $i = 1 To 10 Send("{w}") Next Send("{s}") Sleep(100) WEnd Link to comment Share on other sites More sharing options...
Spiritthirst Posted October 22, 2007 Author Share Posted October 22, 2007 Opt("SendKeyDelay", 100) While 1 For $i = 1 To 10 Send("{w}") Next Send("{s}") Sleep(100) WEnd Sigh it doesn't work in the game Link to comment Share on other sites More sharing options...
quinner Posted October 22, 2007 Share Posted October 22, 2007 Sigh it doesn't work in the gameHow doesn't it work?Does it not do anything at all inside the game?Do you need the keypresses to last a particular length of time or something?It might be a good idea to use WinActivate Link to comment Share on other sites More sharing options...
Spiritthirst Posted October 22, 2007 Author Share Posted October 22, 2007 How doesn't it work?Does it not do anything at all inside the game?Do you need the keypresses to last a particular length of time or something?It might be a good idea to use WinActivateOh..yea How to use winactivate? Link to comment Share on other sites More sharing options...
quinner Posted October 22, 2007 Share Posted October 22, 2007 Oh..yea How to use winactivate?Type WinActivate into your ScitE editor, highlight it, and press F1 ^^ the help file included with AutoIt will answer all your questions a lot quicker than the forums!Just make sure you put it on top of your other code... Link to comment Share on other sites More sharing options...
Spiritthirst Posted October 22, 2007 Author Share Posted October 22, 2007 Type WinActivate into your ScitE editor, highlight it, and press F1 ^^ the help file included with AutoIt will answer all your questions a lot quicker than the forums!Just make sure you put it on top of your other code...Um..WinActivate("The game")Opt("SendKeyDelay", 100)While 1 For $i = 1 To 20 Send("{3}") Next Send("{6}") Sleep(100)WEndLike this? Somehow it still do nothing in the game Link to comment Share on other sites More sharing options...
quinner Posted October 22, 2007 Share Posted October 22, 2007 That works just fine for me in notepad... it types out loads of 3's, then a 6, then 3's.... How are you running your script? Try compiling it to a .exe, and then double click the .exe to start the program What game is it, and what are you trying to do exactly? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now