Guest BL@(K-R34P3R Posted October 15, 2004 Share Posted October 15, 2004 Ok, I'm trying to make this script. I want it to look 100 times, then press -> and -< then restart the loop. This is all I have so far, and it's not working, suggestions? $counter = 0 Sleep(10000) TrainFunc() Func TrainFunc() $counter = $counter + 1 While 1 Send("{CTRLDOWN}") Sleep(500) Send("{CTRLUP}") If $counter >= 100 Then;If it has looped 100 times then press ->, -< then restart. ;I want to insert the arrow keys here... Also, I don't know how to send the arrow keys. Wend Endif EndFunc Link to comment Share on other sites More sharing options...
emmanuel Posted October 15, 2004 Share Posted October 15, 2004 you're making me want to put the "F" back in RTFM...{UP} Cursor up {DOWN} Cursor down {LEFT} Cursor left {RIGHT} Cursor right Ok, I'm trying to make this script. I want it to look 100 times, then press -> and -< then restart the loop. This is all I have so far, and it's not working, suggestions?$counter = 0 Sleep(10000) TrainFunc() Func TrainFunc() $counter = $counter + 1 While 1 Send("{CTRLDOWN}") Sleep(500) Send("{CTRLUP}") If $counter >= 100 Then;If it has looped 100 times then press ->, -< then restart. ;I want to insert the arrow keys here... Also, I don't know how to send the arrow keys. Wend Endif EndFunc<{POST_SNAPBACK}> "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted October 15, 2004 Share Posted October 15, 2004 Uh... Thanks? Also, the if statement doesn't work even without the arrow keys... I guess I fogot to mention that before. Anyways, the Wend supposedly can't be placed into an if statement, how do I work around this? Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted October 15, 2004 Share Posted October 15, 2004 Thanks Lar. Link to comment Share on other sites More sharing options...
Valik Posted October 15, 2004 Share Posted October 15, 2004 Uh... Thanks? Also, the if statement doesn't work even without the arrow keys... I guess I fogot to mention that before. Anyways, the Wend supposedly can't be placed into an if statement, how do I work around this?<{POST_SNAPBACK}>Don't put it in an If statement, duh. Link to comment Share on other sites More sharing options...
scriptkitty Posted October 15, 2004 Share Posted October 15, 2004 Just a bit of FYI, remember to have all your loops and if statements inside one anouther. Ex: BAD=While 1 Send("{CTRLDOWN}") Sleep(500) Send("{CTRLUP}") If $counter >= 100 Then;If it has looped 100 times then press ->, -< then restart. ;I want to insert the arrow keys here... Also, I don't know how to send the arrow keys. Wend Endif Better=While 1; I am on the outside Send("{CTRLDOWN}") Sleep(500) Send("{CTRLUP}") If $counter >= 100 Then; I am on the inside ;If it has looped 100 times then press ->, -< then restart. ;I want to insert the arrow keys here... Also, I don't know how to send the arrow keys. Endif; I am on the inside Wend; I am on the outside This is called Nesting, as you can see below this uses two While statements, an if and a do...until all just fine, although it really does nothing. While 1 do $x=1 sleep(10) if winactive("fred") then while $x=1 sleep(10) $x=2 wend endif until winactive("the cows come home") wend AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted October 16, 2004 Share Posted October 16, 2004 (edited) Thanks. New problem to add. The {LEFT} and {RIGHT} are apparently not working for me. I tried doing {LEFTDOWN} but that isn't working either. Any suggestions? And yes, I put a sleep in between them. ADDED: It compiles fine, but just won't do it.... Edited October 16, 2004 by BL@(K-R34P3R Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted October 16, 2004 Share Posted October 16, 2004 BuMp Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted October 17, 2004 Share Posted October 17, 2004 I found the route of the problem. For some reason the {LEFT} and {RIGHT} send keys are sending the number pad arrow keys. How can I send the other arrow keys? Help! Link to comment Share on other sites More sharing options...
CyberSlug Posted October 17, 2004 Share Posted October 17, 2004 It sends the normal left button according to this software :hmm:If this is for a game, remember that not all games accept simulated input espesially since AutoIt does not use keyboard hooks.....Get one of these guys. It worked for Homer Simpson (mostly) Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted October 17, 2004 Share Posted October 17, 2004 Larry, can you elaborate slightly? And CyberSlug, I know the game accepts it... because it will do the ctrl part. I'm just trying to get aruond the games anti-hack programming. It has it set so that if u attack (click control) more than 40 times in a row, it will not let you attack till you move to a new spot. Link to comment Share on other sites More sharing options...
Valik Posted October 17, 2004 Share Posted October 17, 2004 Apparently the game isn't accepting it or it would be working, duh. Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted October 17, 2004 Share Posted October 17, 2004 But the Ctrl key works. Only thing that isn't working is the -> and <- Link to comment Share on other sites More sharing options...
Valik Posted October 17, 2004 Share Posted October 17, 2004 Well whoopity-doo, so the Ctrl key works. The other keys don't work, thus the game isn't accepting them. Link to comment Share on other sites More sharing options...
Matt @ MPCS Posted October 17, 2004 Share Posted October 17, 2004 Hmmm... why would a game disable the keys needed to control the player in the game but not all the buttons? Maybe to confuse idiot kids trying to control the game externally... oh no they wouldn't do that. *** Matt @ MPCS Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted October 17, 2004 Share Posted October 17, 2004 Yes, exactly why I have to get this! Those damn game designers are trying to prevent me from making a trainer but I won't let them!!! Link to comment Share on other sites More sharing options...
Valik Posted October 17, 2004 Share Posted October 17, 2004 Yes, exactly why I have to get this! Those damn game designers are trying to prevent me from making a trainer but I won't let them!!!<{POST_SNAPBACK}>You can't stop them, they are smarter than you. Link to comment Share on other sites More sharing options...
Matt @ MPCS Posted October 17, 2004 Share Posted October 17, 2004 Larry's suggestion might actually work as a workaround for this. Instead of asking him to elaborate... how bout doing some googling on your own? He already gave you the keywords you need. *** Matt @ MPCS Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted October 17, 2004 Share Posted October 17, 2004 Smarter yes, older yes, make more money yes. But I guarentee you I will figure it out. Link to comment Share on other sites More sharing options...
Valik Posted October 17, 2004 Share Posted October 17, 2004 I'm not giving you a cookie if you do. 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