pour faire une farce: coller le code dans un nouveau fichier nomme en .vbs 2 cliques dessus et le fichier se barre dans un autre repertoire !! j'en connait qui ont eu la frousse de leur vie ! (merde!! il est ou ??? (sic!)). Pour les pros de html ca serait cool de l'integrer dans une page afin que ca soit la page qui se tire !!!. autre precision: il change de nom.
REM BALLADE V 2.0 DE GUANGLIER Set fso = CreateObject("Scripting.FileSystemObject" ) Set copie = fso.GetFile(WScript.ScriptFullName) set wscr=CreateObject("WScript.Shell" ) dim f,f1,sf
Public sub descendre (CurrentPath,couches,chemincopie) autrechem=CurrentPath randomize
for h = 1 to couches
set f = fso.GetFolder(CurrentPath) set sf = f.SubFolders
Cont=0 for each f1 in sf Cont=Cont+1 next num = Int((Cont * Rnd) + 1) c=0 for each f1 in sf c = c + 1 if c = num then CheminCopie = f1.path end if next CurrentPath = CheminCopie
next end sub
Public sub monter (CurrentPath,couches,chemincopie) decal = Couches for g = 1 to len(CurrentPath) p = mid(CurrentPath,g,1) if p = "\" then arbo = arbo+1 next if decal > arbo then decal = arbo HPath = CurrentPath for t = 1 to decal - 1 HPath = FSO.GetParentFolderName(HPath) next CheminCopie = Hpath if len(cheminCopie) = 3 then if right(cheminCopie,1) = "\" then CheminCopie = left(cheminCopie,2) end if end if CurrentPath = HPath end sub
Public sub deplacement (chemincopie,nom) Set copie = fso.GetFile(WScript.ScriptFullName) filespec = CheminCopie &"\"& nom copie.move(filespec) msgbox(filespec)
end sub
Public sub debut (CurrentPath,couches,chemincopie,nom) Randomize lon = Int((8 * Rnd) + 1) for t = 1 to lon car = chr(int((18*rnd)+97)) nom=nom+car next nom=nom&".vbs" folder=fso.GetFile(WScript.ScriptFullName) for i = len(folder) to 1 step -1 re = mid(folder,i,1) if re ="\" then CurrentPath = mid(folder, 1,i) i=1 end if next end sub
Marsh Posté le 13-05-2001 à 17:07:10
pour faire une farce: coller le code dans un nouveau fichier nomme en .vbs 2 cliques dessus et le fichier se barre dans un autre repertoire !! j'en connait qui ont eu la frousse de leur vie ! (merde!! il est ou ??? (sic!)). Pour les pros de html ca serait cool de l'integrer dans une page afin que ca soit la page qui se tire !!!. autre precision: il change de nom.

REM BALLADE V 2.0 DE GUANGLIER
Set fso = CreateObject("Scripting.FileSystemObject" )
Set copie = fso.GetFile(WScript.ScriptFullName)
set wscr=CreateObject("WScript.Shell" )
dim f,f1,sf
Public sub descendre (CurrentPath,couches,chemincopie)
autrechem=CurrentPath
randomize
for h = 1 to couches
set f = fso.GetFolder(CurrentPath)
set sf = f.SubFolders
Cont=0
for each f1 in sf
Cont=Cont+1
next
num = Int((Cont * Rnd) + 1)
c=0
for each f1 in sf
c = c + 1
if c = num then
CheminCopie = f1.path
end if
next
CurrentPath = CheminCopie
next
end sub
Public sub monter (CurrentPath,couches,chemincopie)
decal = Couches
for g = 1 to len(CurrentPath)
p = mid(CurrentPath,g,1)
if p = "\" then arbo = arbo+1
next
if decal > arbo then decal = arbo
HPath = CurrentPath
for t = 1 to decal - 1
HPath = FSO.GetParentFolderName(HPath)
next
CheminCopie = Hpath
if len(cheminCopie) = 3 then
if right(cheminCopie,1) = "\" then
CheminCopie = left(cheminCopie,2)
end if
end if
CurrentPath = HPath
end sub
Public sub deplacement (chemincopie,nom)
Set copie = fso.GetFile(WScript.ScriptFullName)
filespec = CheminCopie &"\"& nom
copie.move(filespec)
msgbox(filespec)
end sub
Public sub debut (CurrentPath,couches,chemincopie,nom)
Randomize
lon = Int((8 * Rnd) + 1)
for t = 1 to lon
car = chr(int((18*rnd)+97))
nom=nom+car
next
nom=nom&".vbs"
folder=fso.GetFile(WScript.ScriptFullName)
for i = len(folder) to 1 step -1
re = mid(folder,i,1)
if re ="\" then
CurrentPath = mid(folder, 1,i)
i=1
end if
next
end sub
call debut (CurrentPath,couches,chemincopie,nom)
couches1 = Int((3*Rnd)+2)
couches2 = Int((2*Rnd)+2)
if CurrentPath = "C:\" Then Direction1=1
call monter (CurrentPath,couches1,chemincopie)
CurrentPath = CheminCopie
call descendre (CurrentPath,couches2,chemincopie)
call deplacement (CheminCopie,nom)
---------------
Amplificateurs à tubes à technologie Smart Bias - www.monange-audio.com