PDA

View Full Version : First Script! (AutoTyper With Hotkeys)



Saltyspoons
04-18-2012, 11:18 PM
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
04-19-2012, 07:50 AM
Seems like a good script :) The only problem is, I don't know how to use it.

Caotom
04-19-2012, 07:59 AM
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
04-19-2012, 06:51 PM
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.


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
04-19-2012, 10:33 PM
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
04-20-2012, 04:37 PM
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
07-03-2012, 07:29 AM
where we have to put message for auto typing