SRL Archive - OSR Outdated Tutorials

Key code tutorial - press any key!


R0b0t1

2007-05-22 19:35:29

Why would I want to know the codes for every key on the board? Because you can do much more with it! You can do shortcuts, such as windows key + L, or you could even use this to take screen shots by having SCAR press the prntscrn key!

To use these type:


KeyDown(NUMBER);
Wait(1);
KeyUp(SAMENUM);

simple, isnt it?

Well, this (fro general purposes) really just lets you press enter in the same line of code if using "SendKeys".


I hope someone would give me some rep, I'm going for members!

Maxine

2007-05-23 15:39:48

Type mismatch in script gives me all the time.. this aint working for me:(

neo_welmeow

2007-05-23 19:49:30

i get the same thing

grindisbest

2007-05-23 20:09:45

Cheers for the nicely layed out keycodes list.

neo_welmeow

2007-05-23 20:15:49

okay i figured it out
i even put in some examples :garfield:

put in

KeyDown((chr #));
Wait(1);
KeyUp((chr #));

//example0
KeyDown(13);
Wait(1);
KeyUp(13);
//would push enter
//example1
KeyDown(17);//ctrl
Wait(1);
KeyDown(18);//alt
wait(1);
KeyDown(46);//del
wait(3);
KeyUp(17);
KeyUp(18);
KeyUp(46);
//brings up task man

R0b0t1

2007-05-23 20:35:12

yeah, I was thinking of a dif language when I put the "chr" part. don't use that, just the number.

Maxine

2007-05-24 00:13:29

ok thanks.. its working now

shaunthasheep

2007-05-24 07:48:04

From: r0b0t1
yeah, I was thinking of a dif language when I put the "chr" part. don't use that, just the number.


you weren't thinking of another language.. u were thinking about adding it to a string eg SendKeys(chr(13)); //enter

WhoCares357

2007-05-24 10:43:06

Very good. I like this. Keep up the good work.

BTW, I posted your tutorial here:
http://www.zamorak.org/showthread.php?p=6428#post6428

If you want it removed, I will do so.

Hugolord

2007-05-24 11:13:01

Thanks this is a great help (for me) cz of my script im making ty m8!

Lalaji

2007-05-24 15:33:37

I Got that. Can some1 please post some more codes for keys. Or tell me where i can get them

Maxine

2007-05-24 15:39:48

From: lalaji
I Got that. Can some1 please post some more codes for keys. Or tell me where i can get them


more keys? i think theres all in that file:D you have like chinese keyboard with 5000 different letters:D

robot add those examples to your guide and it will be perfect!

R0b0t1

2007-05-25 15:19:02

No, these are the keys that would be of anyuse to us.