SRL Archive - Non-RuneScape Scripts

First Script! (AutoTyper With Hotkeys)


Saltyspoons

2012-04-18 19:18:36

Hello.
After reading Coh3n's guide for beginners, here is what I have come up with.

EDIT: You type in your message, and desired hotkey.
Run the script, and press the hotkey whenever you want the message to be printed.
I like this better than using repeating intervals, because you have complete control over when the messaged is printed
and choose your own interval.

program SaltyTyper; //All credit goes to Coh3n @ Villavu

Const
////////////// USER SETTINGS /////////////////

MESSAGE = ('Your message here.');

HOTKEY = ('F4'); // Use a hotkey to print your message.
// Change this to any F key (1-9)

// Want the bot to type the message, but not send it? Comment out line 60.

////////////// USER SETTINGS /////////////////

var
Key: Integer;

procedure WhatKey;
begin
case (HotKey) of

'F1':
Key:= 112;

'F2':
Key := 113; //I do not recommend using F2. This is the default key for "stop" in Simba.')

'F3':
Key := 114;

'F4':
Key := 115;

'F5':
Key := 116;

'F6':
Key := 117;

'F7':
Key := 118;

'F8':
Key := 119;

'F9':
Key := 120;

end;
end;



procedure AutoType;
begin
repeat
WhatKey;

If IsKeyDown(Key) = true then
begin
Sendkeys(Message, 50);
PressKey(13);
end;
until(false);
end;

begin
AutoType;
end.

sm321

2012-04-19 03:50:00

Seems like a good script :) The only problem is, I don't know how to use it.

Caotom

2012-04-19 03:59:58

Not bad for a first script (I remember mine being something similar, some sort of autotyper) have you considered setting a key for turning off the autotyper without opening simba and manually stopping the script? eg.
until(IsKeyDown(113))

~Caotom

Saltyspoons

2012-04-19 14:51:13

From: sm321
Seems like a good script :) The only problem is, I don't know how to use it.


Replace "Your message here" with the desired message to be printed.
Change the HOTKEY constant to any F key (F1, F2, etc.) or leave it the same.
Run the script.
Push the HOTKEY that is chosen, and it will print and return the message one time.
Repeat pushing the HOTKEY as needed.

From: Caotom
Not bad for a first script (I remember mine being something similar, some sort of autotyper) have you considered setting a key for turning off the autotyper without opening simba and manually stopping the script? eg.
until(IsKeyDown(113))

~Caotom


Good idea. Thanks for the input. I REALLY appreciate it.

xtrapsp

2012-04-19 18:33:25

Like it :) Might be able to implement this into another script? So if your botting.. u wanna look legit just hit f1-f12 which has custom sayings :P

Saltyspoons

2012-04-20 12:37:49

From: xtrapsp
Like it :) Might be able to implement this into another script? So if your botting.. u wanna look legit just hit f1-f12 which has custom sayings :P


Also a great idea! I will keep this saved on my computer not only because it is my first script (for sentimental value ;P), but to use it in future scripts.

yash

2012-07-03 03:29:46

where we have to put message for auto typing