Jump to content

Recommended Posts

Guest BL@(K-R34P3R
Posted

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
Posted

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)

Guest BL@(K-R34P3R
Posted

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?

Posted

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.
Posted

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.

Guest BL@(K-R34P3R
Posted (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 by BL@(K-R34P3R
Guest BL@(K-R34P3R
Posted

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!

Guest BL@(K-R34P3R
Posted

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.

Guest BL@(K-R34P3R
Posted

But the Ctrl key works. Only thing that isn't working is the -> and <-

Posted

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

Guest BL@(K-R34P3R
Posted

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!!!

Posted

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.
Posted

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

Guest BL@(K-R34P3R
Posted

Smarter yes, older yes, make more money yes.

But I guarentee you I will figure it out.

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
×
×
  • Create New...