choisir un fichier aleatoire
#4
J'ai testé comme ca

tcl
bind time -|- {*/2 * * * *} ::AutoRotation
 
proc ::AutoRotation {min hour args} {
global botnick fname
set mydb [glob -dir scripts *.db]
set QUIZZFile [lindex $mydb [rand [llength $mydb]]]
set f [open "$fname" "a"]
puts $f "QUIZZFile=scripts/$mydb"
close $f
puthelp "PRIVMSG #chan :rotation des questions"
}



Cela ne marche pas et je n'ai aucune erreur en PL :s
Répondre Avertir


Messages dans ce sujet
choisir un fichier aleatoire - par loulou7593 - 11/10/2010, 14:08
RE: choisir un fichier aleatoire - par CrazyCat - 11/10/2010, 15:21
RE: choisir un fichier aleatoire - par loulou7593 - 11/10/2010, 16:03
RE: choisir un fichier aleatoire - par CrazyCat - 11/10/2010, 22:21
RE: choisir un fichier aleatoire - par CrazyCat - 12/10/2010, 14:16

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)
Tchat 100% gratuit -Discutez en toute liberté