Log in

View Full Version : Make Simba Type



sm321
02-27-2012, 04:28 PM
Hello. How would you make Simba write something? Not on RuneScape, but just in general. Thanks :)

footballjds
02-27-2012, 04:34 PM
check out SendKeys and typesend etc...

sm321
02-27-2012, 05:34 PM
check out SendKeys and typesend etc...

I've done some research on it and found this:

SendKeys(keys, pause=0.05, with_spaces=False,
with_tabs=False, with_newlines=False,
turn_off_numlock=True)

and being an absolute beginner, I just put:

SendKeys("Hello", pause=0.05, with_spaces=False,
with_tabs=False, with_newlines=False,
turn_off_numlock=True)

And obviously it came up error. What school boy error am I doing?

footballjds
02-27-2012, 05:58 PM
program new;
begin
ActivateClient;//Activate's the target client(whichever window you drug the
//crosshairs over

//Wait's 1 second after activating the target client
Wait(1000);

//Types the text out waiting 155 ms in between each key
SendKeys('Hello, I''ll type into any targeted window...', 155);

end.

Failure
02-27-2012, 06:00 PM
SendKeys('Your text here', 10);
KeyDown(13); //Pressing down enter
KeyUp(13); //Unpressing enter

The 10 is how fast it types in milliseconds.

sm321
02-27-2012, 06:10 PM
program new;
begin
ActivateClient;//Activate's the target client(whichever window you drug the
//crosshairs over

//Wait's 1 second after activating the target client
Wait(1000);

//Types the text out waiting 155 ms in between each key
SendKeys('Hello, I''ll type into any targeted window...', 155);

end.

That worked, thanks :)


SendKeys('Your text here', 10);
KeyDown(13); //Pressing down enter
KeyUp(13); //Unpressing enter

The 10 is how fast it types in milliseconds.

I don't get the

Pressing down enter

And thanks :)

footballjds
02-27-2012, 07:15 PM
That worked, thanks :)


Sure thing (:



I don't get the

Pressing down enter

And thanks :)
13 is the identifier for the "enter key".
Therefore keydown(13); simulates a pushing the enter key down.

sm321
02-28-2012, 08:12 AM
Sure thing (:


13 is the identifier for the "enter key".
Therefore keydown(13); simulates a pushing the enter key down.

So if I typed 13, it would start?

Mushini
02-28-2012, 08:25 AM
So if I typed 13, it would start?

I don't understand what you're saying. If you ran the script:

program new;
begin
Keydown(13);

end.

Your computer will think that you hit the "enter" key (also known as the "return" key)
Although, I don't believe Keydown and Keyup are the commands you wanted to know about.

{If you are wanting to know more, visit http://www.asciitable.com/
You will see that 13 corresponds to carriage return (the enter key)
Also, Type keydown(VK_
Then hold down ctrl and press space.
If you don't want to know more about them, then ignore this..
}

sm321
02-28-2012, 08:28 AM
I don't understand what you're saying. If you ran the script:

program new;
begin
Keydown(13);

end.

Your computer will think that you hit the "enter" key (also known as the "return" key)
Although, I don't believe Keydown and Keyup are the commands you wanted to know about.

EDIT: I actually need to use that now. It will save me some lines of my script. I just simply put [SIMBA]KeyDown(13);]/SIMBA]

and it worked, thanks :)

footballjds
02-28-2012, 01:56 PM
be sure to use keyUp as well. You probably don't want to hold enter down for infinity... :P

sm321
02-28-2012, 02:41 PM
be sure to use keyUp as well. You probably don't want to hold enter down for infinity... :P

I take it you just do:

KeyDown(13);
KeyUp(13);

Off-topic, can I add your MSN?

footballjds
02-28-2012, 02:45 PM
I take it you just do:

KeyDown(13);
KeyUp(13);


Yes, although I'd add a wait between the two. Theoretically what you have would be pressing the enter key and releasing it instantly. A few millisecond wait should be find. If you're trying to be human then add a little randomness to it.



Off-topic, can I add your MSN?

Absolutely, I'm never on it unless someone asks for help though. So you'll have to PM me on here if you want me to get on MSN.
:)