| View previous topic :: View next topic |
| Author |
Message |
krazedkat I post too much
Reputation: 0
Joined: 29 Aug 2007 Posts: 2255 Location: Hell, Norway
|
Posted: Mon Mar 17, 2008 6:44 pm Post subject: VBScripting tutorial by: Krazedkat |
|
|
yes im bak for a bit.....
here we go:
index
1. How to make a vbs file
2. The most basic script
3. an input box!
4. EXTRAS!
1. How to make a vbs file!
making a vbs file is simple. So, if you don't have a vbs program, open notepad, type in you script and hit save and save it as [name].vbs
NOTE: there must not be a .txt at the end! that will make it a TEXT file not a SCRIPT!
The most basic script
now we will start with an easy script. This script make a pop-up message box
here is an example:
code:
picture:
this is the base script that i started with and now that you know that its on to! dun du du dun dun!
An Input Box!
an input box looks like this:
the code is:
| Code: | InputBox "type in whatever you want", "Input Box ~krazedkat", , 100, 200
|
again quite simple
now that you know that its time to make a linking one
LINKING
this will make it so once ur done cliking ok it will open a input box!
code:
| Code: | MsgBox "clik ok to open an input box!"
inputbox "type here", "TYPE!", , 100, 200 |
now for some EXTRAS
constantly pressing the CAPSLOCK
code:
| Code: | Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
loop |
to END THIS SCRIPT!!!!:
make and run this:
| Code: | Option Explicit
Dim objWMIService, objProcess, colProcess
Dim strComputer, strProcessKill
strComputer = "."
strProcessKill = "'Wscript.exe'"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colProcess = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = " & strProcessKill )
For Each objProcess in colProcess
objProcess.Terminate()
Next
WSCript.Echo "Just killed process " & strProcessKill _
& " on " & strComputer
WScript.Quit |
this terminates the wscript process to stop any running vbs script
+rep appreciated
and yes i will be expanding on this tutorial later this week!
request a script and i will post it! if i know it!
Last edited by krazedkat on Fri Mar 21, 2008 2:16 pm; edited 3 times in total |
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Mon Mar 17, 2008 9:18 pm Post subject: |
|
|
ehm why should someone want to make such a script?
the only scripts i use are:
Free up ram:
| Code: | | FreeMem = Space(64000000) |
and defragment ram:
| Code: | | Mystring = (80000000) |
i got them from a book they dont help much since windows just is shit but they are not useless if u have your computer running long
only needed and working with windows since linux dont fragment ram (also not hard drive) and linux also unloads everything by itself
_________________
|
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Tue Mar 18, 2008 3:05 am Post subject: |
|
|
| 92Garfield wrote: | ehm why should someone want to make such a script?
the only scripts i use are:
Free up ram:
| Code: | | FreeMem = Space(64000000) |
and defragment ram:
| Code: | | Mystring = (80000000) |
i got them from a book they dont help much since windows just is shit but they are not useless if u have your computer running long
only needed and working with windows since linux dont fragment ram (also not hard drive) and linux also unloads everything by itself |
As you can see, you use them aswell. So dont ask such a stupid question.
This language is pretty usefull.
|
|
| Back to top |
|
 |
krazedkat I post too much
Reputation: 0
Joined: 29 Aug 2007 Posts: 2255 Location: Hell, Norway
|
Posted: Tue Mar 18, 2008 8:02 am Post subject: |
|
|
i think he means the scripts that I use. Im adding those 2 of his to the EXTRAS section right now
|
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Tue Mar 18, 2008 11:27 am Post subject: |
|
|
| krazedkat wrote: | i think he means the scripts that I use. Im adding those 2 of his to the EXTRAS section right now  |
i mean for example perma caps why dint just push capslock
_________________
|
|
| Back to top |
|
 |
krazedkat I post too much
Reputation: 0
Joined: 29 Aug 2007 Posts: 2255 Location: Hell, Norway
|
Posted: Tue Mar 18, 2008 5:39 pm Post subject: |
|
|
because that code CONSTANTLY presses the capslock button
and the msgbox one could help with prompts!
|
|
| Back to top |
|
 |
Pseudo Xero I post too much
Reputation: 0
Joined: 16 Feb 2007 Posts: 2607
|
Posted: Tue Mar 18, 2008 6:13 pm Post subject: |
|
|
| 92Garfield wrote: | ehm why should someone want to make such a script?
the only scripts i use are:
Free up ram:
| Code: | | FreeMem = Space(64000000) |
and defragment ram:
| Code: | | Mystring = (80000000) |
i got them from a book they dont help much since windows just is shit but they are not useless if u have your computer running long
only needed and working with windows since linux dont fragment ram (also not hard drive) and linux also unloads everything by itself |
RAM doesn't fragment ever.
_________________
| haxory' wrote: | can't VB do anything??
windows is programmed using VB right? correct me if im wrong.
so all things in windows you have like the start menu is a windows form too. |
|
|
| Back to top |
|
 |
OSIRIS Grandmaster Cheater
Reputation: 0
Joined: 27 Aug 2006 Posts: 654
|
Posted: Tue Mar 18, 2008 6:26 pm Post subject: |
|
|
| Does the .vbs run on any computer? even if they dont have Visual Studios?
|
|
| Back to top |
|
 |
malfunction Grandmaster Cheater Supreme
Reputation: 0
Joined: 30 Jan 2007 Posts: 1015 Location: http://www.behindthecorner.com/
|
Posted: Wed Mar 19, 2008 1:05 am Post subject: |
|
|
| mageknight wrote: | | Does the .vbs run on any computer? even if they dont have Visual Studios? |
no you need to have the certain libraries (can be downloaded) and i think if you are using .NET you need framework....
_________________
|
|
| Back to top |
|
 |
Pseudo Xero I post too much
Reputation: 0
Joined: 16 Feb 2007 Posts: 2607
|
Posted: Wed Mar 19, 2008 1:21 am Post subject: |
|
|
| skyllakarean wrote: | | mageknight wrote: | | Does the .vbs run on any computer? even if they dont have Visual Studios? |
no you need to have the certain libraries (can be downloaded) and i think if you are using .NET you need framework.... |
VBScript doesn't use .NET.
_________________
| haxory' wrote: | can't VB do anything??
windows is programmed using VB right? correct me if im wrong.
so all things in windows you have like the start menu is a windows form too. |
|
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Wed Mar 19, 2008 6:23 am Post subject: |
|
|
| Xenophobe wrote: | | 92Garfield wrote: | ehm why should someone want to make such a script?
the only scripts i use are:
Free up ram:
| Code: | | FreeMem = Space(64000000) |
and defragment ram:
| Code: | | Mystring = (80000000) |
i got them from a book they dont help much since windows just is shit but they are not useless if u have your computer running long
only needed and working with windows since linux dont fragment ram (also not hard drive) and linux also unloads everything by itself |
RAM doesn't fragment ever. |
sure not every but when i play warcraft and start that he works so ram is fragmented
and i said only windows fragments ram (just like hard drive)
_________________
|
|
| Back to top |
|
 |
krazedkat I post too much
Reputation: 0
Joined: 29 Aug 2007 Posts: 2255 Location: Hell, Norway
|
Posted: Wed Mar 19, 2008 6:25 pm Post subject: |
|
|
| 1. no u dont need .NET!!!!!!!!!!!
|
|
| Back to top |
|
 |
Pseudo Xero I post too much
Reputation: 0
Joined: 16 Feb 2007 Posts: 2607
|
Posted: Wed Mar 19, 2008 6:40 pm Post subject: |
|
|
| 92Garfield wrote: | | Xenophobe wrote: | | 92Garfield wrote: | ehm why should someone want to make such a script?
the only scripts i use are:
Free up ram:
| Code: | | FreeMem = Space(64000000) |
and defragment ram:
| Code: | | Mystring = (80000000) |
i got them from a book they dont help much since windows just is shit but they are not useless if u have your computer running long
only needed and working with windows since linux dont fragment ram (also not hard drive) and linux also unloads everything by itself |
RAM doesn't fragment ever. |
sure not every but when i play warcraft and start that he works so ram is fragmented
and i said only windows fragments ram (just like hard drive) |
No, RAM doesn't fragment. Not even in Windows. (Just so you know, your little VBScript code doesn't even defragment memory.)
_________________
| haxory' wrote: | can't VB do anything??
windows is programmed using VB right? correct me if im wrong.
so all things in windows you have like the start menu is a windows form too. |
|
|
| Back to top |
|
 |
krazedkat I post too much
Reputation: 0
Joined: 29 Aug 2007 Posts: 2255 Location: Hell, Norway
|
Posted: Wed Mar 19, 2008 9:43 pm Post subject: |
|
|
ya that script is bs the ram doesnt "fragment" at all even when play a mmorpg like WoW! idiot
|
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Thu Mar 20, 2008 8:34 am Post subject: |
|
|
| krazedkat wrote: | ya that script is bs the ram doesnt "fragment" at all even when play a mmorpg like WoW! idiot |
how u know it dont fragments? the script should defragment it and if u double click he needs full CPU for a short time
i'm a noob just got it from a book
_________________
|
|
| Back to top |
|
 |
|