
dim objShell
set objShell = CreateObject("Shell.Application")
objShell.ControlPanelItem("desk.cpl")

Dim fso, stream, str, re, name
Dim wsh, oExec
Set wsh = CreateObject(„WScript.Shell”)
Set oExec = wsh.Exec(„cmd /c ” & „tasklist | find ” & Chr(34) & „gg.exe” & Chr(34))
wynik = oExec.StdOut.ReadAll
‘msgbox wynik
Dim valid
Set objRegEx = CreateObject(„VBScript.RegExp”)
valid = False
objRegEx.Pattern = „^gg.exe”
valid = objRegEx.test(wynik)
If valid = True Then
”MsgBox(wynik)
Else
wsh.Run Chr(34) & „C:\\Program Files\\Gadu-Gadu\\gg.exe” & Chr(34)
Set wsh = Nothing
End if

<head>
<script language=”VBScript”>
sub ustaw()
form1.date1.value = date()
form1.date2.value = dateadd(„m”,-1,date())
end sub
</script>
</head>
<body>
<form name=”form1″ method=”post”>
<BR>
<input type=”button” value=”Ustaw date” name=”buttonname” onclick=”ustaw”/>
data
<input id=”date1″ type=”text” name=”datefrom” size=”20″/>
data: miesiac -1
<input id=”date2″ type=”text” name=”dateto” size=”20″/>
</form>
</body>
</html>

Dim oFS
Set oFS=CreateObject(„Scripting.FileSystemObject”)
oFS.CopyFolder „d:\temp\*”, „E:\tmp\”
Set oFS=Nothing

dir = "d:\tmp\"
dir2 = "e:\temp\"
Set fso = CreateObject("Scripting.FileSystemObject")
czas = Now()
ex = Year(czas) & Month(czas) & Day(czas) & Hour(czas) & Minute(czas) & Second(czas)
dir_ex = dir2 & ex
fso.CreateFolder(dir_ex)
fso.CopyFolder dir & "*", dir_ex
set fso = nothing

Set WshShell = WScript.CreateObject(„WScript.Shell”)
WshShell.Run(„Notepad”)
Wscript.Sleep 3000
WshShell.AppActivate(„Bez tytułu – Notepad”)
WshShell.SendKeys(„Dodanie tekstu po 3 sekundach”)
WScript.Sleep 3000
WshShell.SendKeys „%{F4}”
Set WshShell = Nothing
WScript.Quit 0

Dim WshShell
Set WshShell = WScript.CreateObject(„WScript.Shell”)
‘Launch a couple of applications
WshShell.Run „NOTEPAD.EXE”, 1, False
WshShell.Run „CALC.EXE”, 1, False
WshShell.Run „WORDPAD.EXE”, 1, False

Set WshShell = WScript.CreateObject(„WScript.Shell”)
WshShell.Run( „calc”)
Wscript.Sleep (100)
WshShell.AppActivate( „Calculator”)
Wscript.Sleep (100)
WshShell.SendKeys( „1{+}”)
Wscript.Sleep (500)
WshShell.SendKeys („2″)
Wscript.Sleep (500)
WshShell.SendKeys( „=”)
Wscript.Sleep (500)
WshShell.SendKeys( „*4″ )
Wscript.Sleep (500)
WshShell.SendKeys( „=” )
‘ 1+2 = 3 * 4 = 12

Set WshShell = WScript.CreateObject(„WScript.Shell”)
WshShell.Run(„Notepad”)
Wscript.Sleep 3000
WshShell.AppActivate(„Bez tytułu – Notepad”)
WshShell.SendKeys(„Dodanie tekstu po 3 sekundach”)
Wygenerowanie skryptu VirtualDub z lista plików avi do polączenia
Set MyFiles = CreateObject("Scripting.FileSystemObject")
Set Folder = MyFiles.GetFolder(dir)
licznik = 0
Set WszystkiePliki = Folder.Files
For Each X in WszystkiePliki
plik = X.Path
line = scriptVCF & plik
if licznik = 0 Then
line = " VirtualDub.Open(" & Chr(34) & Replace(plik, "\", "\\") & Chr(34) & ");"
else
line = " VirtualDub.Append(" & Chr(34) & Replace(plik, "\", "\\") & Chr(34) & ");"
end if
scriptVCF = scriptVCF & line & vbNewLine
licznik = licznik + 1
Next
Strona zawiera sposoby oraz kody źródłowe pokazujące rozwiazanie napotkanych problemów