cs_LeRoux
Messages postés27Date d'inscriptionvendredi 22 février 2002StatutMembreDernière intervention 4 septembre 2002
-
6 mars 2002 à 01:45
ZTPdiffusion
Messages postés46Date d'inscriptionlundi 16 avril 2001StatutMembreDernière intervention 7 mars 2002
-
7 mars 2002 à 14:46
pour le txt, j'ai une manière mais j'aimerais savoir si sa ce fait + court:
Hasard = 5 'Example
Open AP & "gameplay\n1\cn1.qdh" For Input As #1
i = 0
Do Until EOF(1)
Line Input #1, Texte
i = i + 1If i hasard Then c.Caption Texte: Close: Exit Do
Loop
neojoce
Messages postés134Date d'inscriptionjeudi 7 février 2002StatutMembreDernière intervention16 juin 2002 6 mars 2002 à 06:23
-------------------------------
Réponse au message :
-------------------------------
pour le txt, j'ai une manière mais j'aimerais savoir si sa ce fait + court:
Hasard = 5 'Example
Open AP & "gameplay\n1\cn1.qdh" For Input As #1
i = 0
Do Until EOF(1)
Line Input #1, Texte
i = i + 1If i hasard Then c.Caption Texte: Close: Exit Do
<---- La tu as droit a un mechant plantage ! ---->
Loop
oui
'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
open "nom du fichier" for input as #1
do
input #1, text$
if text$ = ligne$ then exit do
loop until eof(1)
'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
'rendu ici tu a la ligne désirée dans la variable "text$"
Mais je voit pas d'autre facon pour aller a une ligne précise