View Full Version : IsKeyDown
sm321
03-01-2012, 04:21 PM
I have made a simple auto-typer, and want to add start/stop shortcuts. I know you need IsKeyDown but I don't know how to put that into use. I would like F1 to start, and F2 to stop. I can also post the script I have at the moment if that would help? Thankyou.
Brandon
03-01-2012, 04:22 PM
If IsKeyDown(08) then
writeln('you pressed backspace')
else
if IsFKeyDown(124) then
writeln('You pressed F12?');
//http://docs.villavu.com/simba/scriptref/mouseandkeyboard.html#keyboard-virtual-keys
sm321
03-01-2012, 04:34 PM
If IsKeyDown(08) then
writeln('you pressed backspace')
else
if IsFKeyDown(124) then
writeln('You pressed F12?');
//http://docs.villavu.com/simba/scriptref/mouseandkeyboard.html#keyboard-virtual-keys
Thanks for the reply. I've got this script at the moment. I am completely stumped:
program AutoTpyer;
procedure Typing;
begin
SendKeys('Your Text Here', 1);
KeyDown(13);
KeyUp(13);
Wait(2500);
end;
begin
repeat
Typing;
for i:= 0 to 19 do
begin
Wait(100);
if IsKeyDown(F1KeyCode) then terminateScript;
end;
until(false);
I get this error:
[Error] (16:7): Unknown identifier 'i' at line 15
Compiling failed.
Brandon
03-01-2012, 05:04 PM
U didn't declare I :S
program AutoTpyer;
procedure Typing;
begin
SendKeys('Your Text Here', 1);
KeyDown(13);
KeyUp(13);
Wait(2500);
end;
var
I: Integer;
F1KeyCode: word;//or whatever type u named it.
begin
repeat
Typing;
for i:= 0 to 19 do
begin
Wait(100);
if IsKeyDown(F1KeyCode) then
terminateScript;
end;
until(false);
end.
LordJashin
03-01-2012, 08:34 PM
I have made a simple auto-typer, and want to add start/stop shortcuts. I know you need IsKeyDown but I don't know how to put that into use. I would like F1 to start, and F2 to stop. I can also post the script I have at the moment if that would help? Thankyou.
Autotyper for what? You just doing this to learn Simba coding, or do you really want this? I know an application that can do typing/mouse/window switching/etc for you. It works extremely well. If you want it PM me for it and I can link you to it. You can setup hotkeys for anything with it.
sm321
03-02-2012, 07:44 AM
Autotyper for what? You just doing this to learn Simba coding, or do you really want this?
I'm just learning some things before I move onto RuneScape bots.
I know an application that can do typing/mouse/window switching/etc for you. It works extremely well. If you want it PM me for it and I can link you to it. You can setup hotkeys for anything with it.
I'm ok, thankyou anyway.
sm321
03-02-2012, 07:47 AM
Autotyper for what? You just doing this to learn Simba coding, or do you really want this?
I'm just learning some things before I move onto RuneScape bots.
I know an application that can do typing/mouse/window switching/etc for you. It works extremely well. If you want it PM me for it and I can link you to it. You can setup hotkeys for anything with it.
I'm ok, thankyou anyway.
U didn't declare I :S
program AutoTpyer;
procedure Typing;
begin
SendKeys('Your Text Here', 1);
KeyDown(13);
KeyUp(13);
Wait(2500);
end;
var
I: Integer;
F1KeyCode: word;//or whatever type u named it.
begin
repeat
Typing;
for i:= 0 to 19 do
begin
Wait(100);
if IsKeyDown(F1KeyCode) then
terminateScript;
end;
until(false);
end.
What do I put here:
F1KeyCode: word;//or whatever type u named it.
Do I put the name of the procedure?
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.