Zeus
Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
Početna stranicaPortalLatest imagesPretražnikRegistracijaLogin

 

 Make a program in VBS

Go down 
Autor/icaPoruka
Dragonhart
Legenda
Dragonhart


Broj postova : 190
Join date : 27.02.2008
Age : 31

Make a program in VBS Empty
PostajNaslov: Make a program in VBS   Make a program in VBS Emptysub svi 03, 2008 2:17 pm

Programing in VBS.

Here's a quick code in .VBS that opens a msgbox on a certain day
Kod:

zi = Day(Date)
If zi = 27 Then
MsgBox "This is easy  !Go to sleep now", vbInformation, "U should know this!"
End If
[Vrh] Go down
Dragonhart
Legenda
Dragonhart


Broj postova : 190
Join date : 27.02.2008
Age : 31

Make a program in VBS Empty
PostajNaslov: Re: Make a program in VBS   Make a program in VBS Emptysub svi 03, 2008 2:18 pm

VBS GENERIC SCRIPTS:
'Create Folder This program creates a folder in the C drive'

Dim filesys, newfolder, newfolderpath
newfolderpath = "c:\MyFolder"
set filesys=CreateObject("Scripting.FileSystemObject")
If Not filesys.FolderExists(newfolderpath) Then
Set newfolder = filesys.CreateFolder(newfolderpath)
End If
-----------------------------------------------------------
'DeleteFile - This deletes (a) file(s) even if they are read only files.'

dim filesysdelfile
Set filesysdelfile = CreateObject("Scripting.FileSystemObject")

filesysdelfile.DeleteFile "D:\Folder\*.*",True
Set filesysdelfile = Nothing

------------------------------------------------------------
'Deleting a Folder – Deletes a folder, EMPTY OR NOT, READ ONLY OR NOT’

dim foldersys
set foldersys=CreateObject("Scripting.FileSystemObject")
If foldersys.FolderExists ("d:\Folder") Then
foldersys.DeleteFolder "d:\Folder",True
End if
------------------------------------------------------------
'Moving a file from a folder to

dim filesys
set filesys=CreateObject("Scripting.FileSystemObject")
filesys.MoveFile "d:\Folder\*.*", "c:\TEMP\"
-----------------------------------------------------------
'Renaming a file - same as moving a file in the same directory with a different name'

'This part of the program Changes Jim.exe to Mike.exe, making sure that Mike.exe is not there yet, otherwise, it will not bother changing it'
Dim filesysren

Set filesysren = CreateObject("Scripting.FileSystemObject")
If filesysren.FileExists("d:\Program Files\jim.exe") Then
filesysren.MoveFile "d:\Program Files\jim.exe", "d:\Program Files\Mike.exe"
End If
------------------------------------------------------------
'THE RUN is an equivalent of START in BAT command – this EXAMPLE will run PAINTBRUSH and INTERNET EXPLORER and shows google as the start page. - and YES you can RUN another VBS from here'

Dim shell
Set shell = CreateObject("WScript.Shell")
shell.Run "C:\WINDOWS\system32\mspaint.exe"
shell.Run """C:\Program Files\Internet Explorer\IExplore.exe"" http://www.google.com"
-----------------------------------------------------------
'Copying a file - the if FileExists does not work, since VB does not complain even if the file already exists'

Dim filesys
set filesys=CreateObject("Scripting.FileSystemObject")
filesys.CopyFile "C:\Folder\file.exe","C:\TEMP\",true
-------------------------------------------------------------------------
[Vrh] Go down
 
Make a program in VBS
[Vrh] 
Stranica 1 / 1.
 Similar topics
-
» Program's for reaper
» Program's for programing
» Program's for vouching video's
» Pitanje za jedan program(mp3)
» program koji pokaze password za ulaz u windows

Permissions in this forum:Ne možeš odgovarati na postove.
Zeus :: -Računala- :: Software :: Programs-
Forum(o)Bir: