SRL Archive - OSR Help

Send Keys Problem


Ilya

2012-04-29 14:20:24

Hello everyone, I'll get straight to the point.
I am trying to make the client hit spacebar and number keys with a small wait period in between.

Here is what I attemped, but it didn't work:

begin
SendKeys(' ', 100); <———————-space
Wait(331 + Random(237));
SendKeys('1', 100);
Wait(331 + Random(237));
SendKeys(' ', 100);<———————-space
Wait(331 + Random(237));
SendKeys(' ', 100);<———————-space
Wait(331 + Random(237));
SendKeys('4', 100);
Wait(331 + Random(237));
SendKeys(' ', 100);<———————-space
Wait(331 + Random(237));
SendKeys(' ', 100);<———————-space
Wait(331 + Random(237));
SendKeys(' ', 100);<———————-space
Wait(331 + Random(237));
end;


Suggestions/comments/advice?

Google

2012-04-29 14:27:43

Begin
TypeSend(' 100');
Wait(100 + Random(50));
End;


^ This here will hit space then type 100. There ya go :)


begin
TypeSend(' ', 100);
Wait(331 + Random(237));
TypeSend('1', 100);
Wait(331 + Random(237));
TypeSend(' ', 100);
Wait(331 + Random(237));
TypeSend(' ', 100);
Wait(331 + Random(237));
TypeSend('4', 100);
Wait(331 + Random(237));
TypeSend(' ', 100);
Wait(331 + Random(237));
TypeSend(' ', 100);
Wait(331 + Random(237));
TypeSend(' ', 100);
Wait(331 + Random(237));
end;

Type the whole thing out for you if you just wanted to copy and paste.

Joe

2012-04-29 14:30:35

From: GOOGLE
Begin
TypeSend(' 100');
Wait(100 + Random));
End;


^ This here will hit space 4 times then type 100. There ya go :)


If i'm not wrong (and correct me if I am), this will only hit space once and then type 100, which in runescape is useless, because if you type space 100 or 1 times and then write 100 it still looks the same

Google

2012-04-29 14:35:14

From: JOEbot
If i'm not wrong (and correct me if I am), this will only hit space once and then type 100, which in runescape is useless, because if you type space 100 or 1 times and then write 100 it still looks the same


Nope it will hit space however many times you hit space between the Apostrophe, so say " - " < this dash here is a space so if you were to do
TypeSend('----Hi') // < these - are spaces for this example
This would do 4 spaces then write Hi.

Joe

2012-04-29 14:37:04

NVM, SRL cancelled your spaces and it looks like 1 space, sorry

Ilya

2012-04-29 14:39:21

Thanks for your quick reply.
Trying it now.

Ilya

2012-04-29 14:46:35

Still not working.
What I am trying to do is get the client to skip through some NPC dialogue.
Since you can hit 'space' and it's the same thing as continue, i figured scripting just to sent spacebars and number keys would be the easiest.
Any more suggestions?
i need the script to type
space
1
space
space
4
space
space
space
with 1/2 of a second intervals.

Google

2012-04-29 14:48:50

From: JOEbot
If i'm not wrong (and correct me if I am), this will only hit space once and then type 100, which in runescape is useless, because if you type space 100 or 1 times and then write 100 it still looks the same


From: Ilya
Still not working.
What I am trying to do is get the client to skip through some NPC dialogue.
Since you can hit 'space' and it's the same thing as continue, i figured scripting just to sent spacebars and number keys would be the easiest.
Any more suggestions?
i need the script to type
space
1
space
space
4
space
space
space
with 1/2 of a second intervals.


Try This


Begin
TypeSend(' ');
Wait(400 + Random(150));
TypeSend('1');
Wait(400 + Random(150));
TypeSend(' ');
Wait(400 + Random(150));
TypeSend(' ');
Wait(400 + Random(150));
TypeSend('4');
Wait(400 + Random(150));
TypeSend(' ');
Wait(400 + Random(150));
TypeSend(' ');
Wait(400 + Random(150));
TypeSend(' ');
End;

Which Npc is this for anyway that you need to type numbers in, becasue there is an easier way going through NPC dialogue I just never heard of having to type numbers to that NPC.. ?

If you can't figure it out send me a message over skype and I will gladly help you through.

Ilya

2012-04-29 15:02:08

Trying now.
Really appreciate your knowledge!!

Google

2012-04-29 15:16:07

From: Ilya
Trying now.
Really appreciate your knowledge!!


May I ask what the numbers are for, there a very simple way to write this with 4 lines but im confused as to why you need to type in numbers?:confused:

J J

2012-04-29 15:20:28

From: GOOGLE
May I ask what the numbers are for, there a very simple way to write this with 4 lines but im confused as to why you need to type in numbers?:confused:

You can use numbers to talk in conversations. Eg. Typing a space == continue and typing '1' you would select option 1 on the possible options. Could be used for buying anti-dragon shields, for example. Speeds it up quite a lot.

Google

2012-04-29 15:26:59

From: J J
You can use numbers to talk in conversations. Eg. Typing a space == continue and typing '1' you would select option 1 on the possible options. Could be used for buying anti-dragon shields, for example. Speeds it up quite a lot.


Oh alright had no clue you could even do that, thanks for the info.

Ilya

2012-04-29 15:35:55

It is for buying something similar to Anti-Dragon Shields.
:sasmokin::sasmokin::sasmokin:
Thanks again for all of your input.
It's working for 15+mins now flawlessly.

Google

2012-04-29 15:38:13

From: Ilya
It is for buying something similar to Anti-Dragon Shields.
:sasmokin::sasmokin::sasmokin:
Thanks again for all of your input.
It's working for 15+mins now flawlessly.


No problem glad to help.