Hack Forums

Full Version: VBS AUTOKEYS!!! scripting TUTORIAL!!!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok, here's my first tut. it's on VBS scripting. Basically, I finally figured out how to press keys without pressing keys!!! lol. but I like this because I can essentially install any program or do anything on a computer with these simple few tactics.
So here's how it's done. First, your first line will be the following:

Code:
Set ss = Createobject("wscript.shell")

this simply makes the characters ss do what it says above, which bascically creates this as a vbs and opens the "vbs" shell to type our commands (i think...)

your next commands will be whatever the heck you want them to be.

so, every line will basically start with ss.-something-.
let's say you want to open a program, ok, so your code will be:

Code:
Set ss = Createobject("wscript.shell")
ss.run "cmd.exe"

that just opens cmd.exe, command prompt for the newbies. now, let's remember, it takes a few seconds to do that beginning part, so you're going to have to make the script wait for it to finish loading, so your code will look like this then:

Code:
Set ss = Createobject("wscript.shell")
ss.run "cmd.exe"
wscript.sleep 500

where 500 = miliseconds.

so lets say you want to type a command in command prompt. ok, no problem. you can do this 2 ways:

Code:
ss.sendkeys "echo This is So Cool."
ss.sendkeys "{enter}"

or

Code:
ss.sendkeys "T"
ss.sendkeys "h"
ss.sendkeys "i"
ss.sendkeys "s"
ss.sendkeys " "
ss.sendkeys "i"
ss.sendkeys "s"
ss.sendkeys " "
ss.sendkeys "s"
ss.sendkeys "o"
ss.sendkeys " "
ss.sendkeys "c"
ss.sendkeys "o"
ss.sendkeys "o"
ss.sendkeys "l"
ss.sendkeys "."

or to make it look like you're really typing it, give it some wait time:

ss.sendkeys "T"
wscript.sleep 200
ss.sendkeys "h"
wscript.sleep 200
ss.sendkeys "i"
wscript.sleep 200
ss.sendkeys "s"
wscript.sleep 200
ss.sendkeys " "
wscript.sleep 200
ss.sendkeys "i"
wscript.sleep 200
ss.sendkeys "s"
wscript.sleep 200
ss.sendkeys " "
wscript.sleep 200
ss.sendkeys "s"
wscript.sleep 200
ss.sendkeys "o"
wscript.sleep 200
ss.sendkeys " "
wscript.sleep 200
ss.sendkeys "c"
wscript.sleep 200
ss.sendkeys "o"
wscript.sleep 200
ss.sendkeys "o"
wscript.sleep 200
ss.sendkeys "l"
wscript.sleep 200
ss.sendkeys "."

of course, that would make it difficult to "echo" what you're typing, but hey, it looks pretty neat when your command prompt is typing to you!!!


there's a command for every key on the keyboard, see:

Code:
Key    
Argument



BACKSPACE
{BACKSPACE}, {BS}, or {BKSP}

BREAK
{BREAK}

CAPS LOCK
{CAPSLOCK}

DEL or DELETE
{DELETE} or {DEL}

DOWN ARROW
{DOWN}

END
{END}

ENTER
{ENTER} or ~

ESC
{ESC}

HELP
{HELP}

HOME
{HOME}

INS or INSERT
{INSERT} or {INS}

LEFT ARROW
{LEFT}

NUM LOCK
{NUMLOCK}

PAGE DOWN
{PGDN}

PAGE UP
{PGUP}

PRINT SCREEN
{PRTSC}

RIGHT ARROW
{RIGHT}

SCROLL LOCK
{SCROLLLOCK}

TAB
{TAB}

UP ARROW
{UP}

F1
{F1}

F2
{F2}

F3
{F3}

F4
{F4}

F5
{F5}

F6
{F6}

F7
{F7}

F8
{F8}

F9
{F9}

F10
{F10}

F11
{F11}

F12
{F12}

F13
{F13}

F14
{F14}

F15
{F15}

F16
{F16}

SHIFT
+

CTRL
^

ALT
%



shift, ctrl, and alt do not go in brackets, but beside the key you're using them with, such as:

%{f4} Alt+F4

or ^%{del} Ctrl+Alt+Del

all of those keys I recieved from this site:

http://msdn.microsoft.com/en-us/library/8c6yea83(VS.85).aspx

so all credit to them

so folks, have fun with your vbs file!!! and remember, you can even use this to auto-install all your apps!!!!

EDIT: Oh, I did want to mention, Zizipo had posted a similar tut to this somewhere else, so this idea is not entirely mine. credits to zip as well.

Eric
Credits to zizipo and to Google.LOL.And your welcome for my help yesterday ( OH COOL I JUST RUINED A THREAD haha ) .
lol. yeah, well, i don't know how many times i asked for help on this forum just for THIS and no one knew, so here it is guys. yeah, thanks for your help, i woulda neva found it if it weren't for your tut.
Hey! Liar! This isn't the first time I helped you,remember me and you assassinated Maoze Dong.
huh? nani? nan-des ka? Nan dio? wakarimasen..... :S

for those of you who don't know japanese:


huh? what? what is that? what the heck? I don't understand...... :S
http://en.wikipedia.org/wiki/Mao_Zedong
Me and you assassinated him which means I helped you.OK I won't reply to this thread again,I am spamming.
I'm lost.....anyways.....i can also make a virus in vbs...SO COOL!!!!!!!!!!! hahahahahahaha!!!!!!!! YES!
lo0o0ol you two are crazy!!
Reference URL's