SOCORRO NO MS-DOS
Olá amigos! Eu estou com um programa escrito em c baseado no ambiente MS-DOS. Eu passo parametros de um programa feito em vb para esse programa e conseguir direcionar a saida do programa para um arquivo de log. segue a saida
frame= 1 q= 3.2 f_size= 8893 s_size= 9kB time= 0.017 br= 4268.6kbits/s avg_br= 4268.6kbits/s type= I
frame= 2 q= 2.0 f_size= 4278 s_size= 13kB time= 0.033 br= 2053.4kbits/s avg_br= 3161.0kbits/s type= P
frame= 4 q= 2.0 f_size= 322 s_size= 13kB time= 0.067 br= 154.6kbits/s avg_br= 1619.2kbits/s type= P
frame= 6 q= 2.0 f_size= 351 s_size= 14kB time= 0.100 br= 168.5kbits/s avg_br= 1107.5kbits/s type= P
frame= 8 q= 2.0 f_size= 477 s_size= 14kB time= 0.133 br= 229.0kbits/s avg_br= 859.3kbits/s type= P
frame= 10 q= 2.0 f_size= 464 s_size= 14kB time= 0.167 br= 222.7kbits/s avg_br= 709.7kbits/s type= P
frame= 12 q= 2.0 f_size= 498 s_size= 15kB time= 0.200 br= 239.0kbits/s avg_br= 611.3kbits/s type= P
frame= 14 q= 2.0 f_size= 1873 s_size= 17kB time= 0.233 br= 899.0kbits/s avg_br= 588.2kbits/s type= P
frame= 16 q= 2.0 f_size= 479 s_size= 17kB time= 0.267 br= 229.9kbits/s avg_br= 529.0kbits/s type= P
frame= 18 q= 2.0 f_size= 485 s_size= 18kB time= 0.300 br= 232.8kbits/s avg_br= 483.2kbits/s type= P
frame= 20 q= 2.0 f_size= 410 s_size= 18kB time= 0.333 br= 196.8kbits/s avg_br= 444.7kbits/s type= P
frame= 22 q= 2.0 f_size= 469 s_size= 19kB time= 0.367 br= 225.1kbits/s avg_br= 414.5kbits/s type= P
frame= 24 q= 2.0 f_size= 409 s_size= 19kB time= 0.400 br= 196.3kbits/s avg_br= 388.2kbits/s type= P
frame= 26 q= 2.0 f_size= 1659 s_size= 21kB time= 0.433 br= 796.3kbits/s avg_br= 388.9kbits/s type= P
frame= 28 q= 2.0 f_size= 424 s_size= 21kB time= 0.467 br= 203.5kbits/s avg_br= 368.4kbits/s type= P
frame= 30 q= 2.0 f_size= 373 s_size= 21kB time= 0.500 br= 179.0kbits/s avg_br= 349.8kbits/s type= P
frame= 32 q= 2.0 f_size= 288 s_size= 22kB time= 0.533 br= 138.2kbits/s avg_br= 332.3kbits/s type= P
frame= 34 q= 2.0 f_size= 368 s_size= 22kB time= 0.567 br= 176.6kbits/s avg_br= 317.9kbits/s type= P
frame= 36 q= 2.0 f_size= 422 s_size= 22kB time= 0.600 br= 202.6kbits/s avg_br= 305.9kbits/s type= P
frame= 38 q= 2.0 f_size= 1716 s_size= 24kB time= 0.633 br= 823.7kbits/s avg_br= 311.5kbits/s type= P
frame= 40 q= 2.0 f_size= 439 s_size= 25kB time= 0.667 br= 210.7kbits/s avg_br= 301.2kbits/s type= P
frame= 42 q= 2.0 f_size= 489 s_size= 25kB time= 0.700 br= 234.7kbits/s avg_br= 292.4kbits/s type= P
frame= 44 q= 2.0 f_size= 388 s_size= 25kB time= 0.733 br= 186.2kbits/s avg_br= 283.4kbits/s type= P
frame= 46 q= 2.0 f_size= 427 s_size= 26kB time= 0.767 br= 205.0kbits/s avg_br= 275.5kbits/s type= P
frame= 48 q= 2.0 f_size= 495 s_size= 26kB time= 0.800 br= 237.6kbits/s avg_br= 269.0kbits/s type= P
frame= 50 q= 2.0 f_size= 1849 s_size= 28kB time= 0.833 br= 887.5kbits/s avg_br= 276.0kbits/s type= P
frame= 52 q= 2.0 f_size= 501 s_size= 29kB time= 0.867 br= 240.5kbits/s avg_br= 270.0kbits/s type= P
frame= 54 q= 2.0 f_size= 454 s_size= 29kB time= 0.900 br= 217.9kbits/s avg_br= 264.0kbits/s type= P
frame= 56 q= 2.0 f_size= 370 s_size= 29kB time= 0.933 br= 177.6kbits/s avg_br= 257.7kbits/s type= P
frame= 58 q= 2.0 f_size= 442 s_size= 30kB time= 0.967 br= 212.2kbits/s avg_br= 252.5kbits/s type= P
frame= 60 q= 2.0 f_size= 562 s_size= 30kB time= 1.000 br= 269.8kbits/s avg_br= 248.6kbits/s type= P
frame= 62 q= 2.0 f_size= 1587 s_size= 32kB time= 1.033 br= 761.8kbits/s avg_br= 252.9kbits/s type= P
frame= 64 q= 2.0 f_size= 341 s_size= 32kB time= 1.067 br= 163.7kbits/s avg_br= 247.5kbits/s type= P
frame= 66 q= 2.0 f_size= 386 s_size= 33kB time= 1.100 br= 185.3kbits/s avg_br= 242.8kbits/s type= P
frame= 68 q= 2.0 f_size= 381 s_size= 33kB time= 1.133 br= 182.9kbits/s avg_br= 238.4kbits/s type= P
frame= 70 q= 2.0 f_size= 428 s_size= 33kB time= 1.167 br= 205.4kbits/s avg_br= 234.5kbits/s type= P
frame= 72 q= 2.0 f_size= 472 s_size= 34kB time= 1.200 br= 226.6kbits/s avg_br= 231.1kbits/s type= P
frame= 74 q= 2.0 f_size= 1847 s_size= 36kB time= 1.233 br= 886.6kbits/s avg_br= 236.9kbits/s type= P
frame= 76 q= 2.0 f_size= 548 s_size= 36kB time= 1.267 br= 263.0kbits/s avg_br= 234.1kbits/s type= P
frame= 78 q= 2.0 f_size= 476 s_size= 37kB time= 1.300 br= 228.5kbits/s avg_br= 231.0kbits/s type= P
frame= 80 q= 2.0 f_size= 428 s_size= 37kB time= 1.333 br= 205.4kbits/s avg_br= 227.8kbits/s type= P
frame= 82 q= 2.0 f_size= 470 s_size= 38kB time= 1.367 br= 225.6kbits/s avg_br= 225.0kbits/s type= P
frame= 84 q= 2.0 f_size= 411 s_size= 38kB time= 1.400 br= 197.3kbits/s avg_br= 222.0kbits/s type= P
frame= 86 q= 2.0 f_size= 1780 s_size= 40kB time= 1.433 br= 854.4kbits/s avg_br= 226.8kbits/s type= P
frame= 88 q= 2.0 f_size= 450 s_size= 40kB time= 1.467 br= 216.0kbits/s avg_br= 224.1kbits/s type= P
frame= 90 q= 2.0 f_size= 398 s_size= 41kB time= 1.500 br= 191.0kbits/s avg_br= 221.2kbits/s type= P
frame= 92 q= 2.0 f_size= 350 s_size= 41kB time= 1.533 br= 168.0kbits/s avg_br= 218.2kbits/s type= P
frame= 94 q= 2.0 f_size= 392 s_size= 41kB time= 1.567 br= 188.2kbits/s avg_br= 215.6kbits/s type= P
frame= 96 q= 2.0 f_size= 526 s_size= 42kB time= 1.600 br= 252.5kbits/s avg_br= 213.7kbits/s type= P
frame= 98 q= 2.0 f_size= 1759 s_size= 43kB time= 1.633 br= 844.3kbits/s avg_br= 218.0kbits/s type= P
frame= 100 q= 2.0 f_size= 496 s_size= 44kB time= 1.667 br= 238.1kbits/s avg_br= 216.0kbits/s type= P
frame= 102 q= 2.0 f_size= 584 s_size= 45kB time= 1.700 br= 280.3kbits/s avg_br= 214.5kbits/s type= P
frame= 104 q= 2.0 f_size= 465 s_size= 45kB time= 1.733 br= 223.2kbits/s avg_br= 212.5kbits/s type= P
frame= 106 q= 2.0 f_size= 494 s_size= 45kB time= 1.767 br= 237.1kbits/s avg_br= 210.8kbits/s type= P
frame= 108 q= 2.0 f_size= 462 s_size= 46kB time= 1.800 br= 221.8kbits/s avg_br= 208.9kbits/s type= P
frame= 110 q= 2.0 f_size= 1994 s_size= 48kB time= 1.833 br= 957.1kbits/s avg_br= 213.8kbits/s type= P
frame= 112 q= 2.0 f_size= 429 s_size= 48kB time= 1.867 br= 205.9kbits/s avg_br= 211.8kbits/s type= P
frame= 114 q= 2.0 f_size= 536 s_size= 49kB time= 1.900 br= 257.3kbits/s avg_br= 210.4kbits/s type= P
frame= 116 q= 2.0 f_size= 398 s_size= 49kB time= 1.933 br= 191.0kbits/s avg_br= 208.4kbits/s type= P
frame= 118 q= 2.0 f_size= 435 s_size= 50kB time= 1.967 br= 208.8kbits/s avg_br= 206.6kbits/s type= P
frame= 120 q= 2.0 f_size= 609 s_size= 50kB time= 2.000 br= 292.3kbits/s avg_br= 205.6kbits/s type= P
frame= 122 q= 2.0 f_size= 1669 s_size= 52kB time= 2.033 br= 801.1kbits/s avg_br= 208.8kbits/s type= P
a cada segundo ele gera uma nova frase escrito o nº de frames, e eu queria lê todas elas, mas quando eu tento consigo apenas o da primeira linha. como eu faço pra lê somente o q esta escrito frame e o q a elel esta atribuido, mas um de cada vez...
frame= 1 q= 3.2 f_size= 8893 s_size= 9kB time= 0.017 br= 4268.6kbits/s avg_br= 4268.6kbits/s type= I
frame= 2 q= 2.0 f_size= 4278 s_size= 13kB time= 0.033 br= 2053.4kbits/s avg_br= 3161.0kbits/s type= P
frame= 4 q= 2.0 f_size= 322 s_size= 13kB time= 0.067 br= 154.6kbits/s avg_br= 1619.2kbits/s type= P
frame= 6 q= 2.0 f_size= 351 s_size= 14kB time= 0.100 br= 168.5kbits/s avg_br= 1107.5kbits/s type= P
frame= 8 q= 2.0 f_size= 477 s_size= 14kB time= 0.133 br= 229.0kbits/s avg_br= 859.3kbits/s type= P
frame= 10 q= 2.0 f_size= 464 s_size= 14kB time= 0.167 br= 222.7kbits/s avg_br= 709.7kbits/s type= P
frame= 12 q= 2.0 f_size= 498 s_size= 15kB time= 0.200 br= 239.0kbits/s avg_br= 611.3kbits/s type= P
frame= 14 q= 2.0 f_size= 1873 s_size= 17kB time= 0.233 br= 899.0kbits/s avg_br= 588.2kbits/s type= P
frame= 16 q= 2.0 f_size= 479 s_size= 17kB time= 0.267 br= 229.9kbits/s avg_br= 529.0kbits/s type= P
frame= 18 q= 2.0 f_size= 485 s_size= 18kB time= 0.300 br= 232.8kbits/s avg_br= 483.2kbits/s type= P
frame= 20 q= 2.0 f_size= 410 s_size= 18kB time= 0.333 br= 196.8kbits/s avg_br= 444.7kbits/s type= P
frame= 22 q= 2.0 f_size= 469 s_size= 19kB time= 0.367 br= 225.1kbits/s avg_br= 414.5kbits/s type= P
frame= 24 q= 2.0 f_size= 409 s_size= 19kB time= 0.400 br= 196.3kbits/s avg_br= 388.2kbits/s type= P
frame= 26 q= 2.0 f_size= 1659 s_size= 21kB time= 0.433 br= 796.3kbits/s avg_br= 388.9kbits/s type= P
frame= 28 q= 2.0 f_size= 424 s_size= 21kB time= 0.467 br= 203.5kbits/s avg_br= 368.4kbits/s type= P
frame= 30 q= 2.0 f_size= 373 s_size= 21kB time= 0.500 br= 179.0kbits/s avg_br= 349.8kbits/s type= P
frame= 32 q= 2.0 f_size= 288 s_size= 22kB time= 0.533 br= 138.2kbits/s avg_br= 332.3kbits/s type= P
frame= 34 q= 2.0 f_size= 368 s_size= 22kB time= 0.567 br= 176.6kbits/s avg_br= 317.9kbits/s type= P
frame= 36 q= 2.0 f_size= 422 s_size= 22kB time= 0.600 br= 202.6kbits/s avg_br= 305.9kbits/s type= P
frame= 38 q= 2.0 f_size= 1716 s_size= 24kB time= 0.633 br= 823.7kbits/s avg_br= 311.5kbits/s type= P
frame= 40 q= 2.0 f_size= 439 s_size= 25kB time= 0.667 br= 210.7kbits/s avg_br= 301.2kbits/s type= P
frame= 42 q= 2.0 f_size= 489 s_size= 25kB time= 0.700 br= 234.7kbits/s avg_br= 292.4kbits/s type= P
frame= 44 q= 2.0 f_size= 388 s_size= 25kB time= 0.733 br= 186.2kbits/s avg_br= 283.4kbits/s type= P
frame= 46 q= 2.0 f_size= 427 s_size= 26kB time= 0.767 br= 205.0kbits/s avg_br= 275.5kbits/s type= P
frame= 48 q= 2.0 f_size= 495 s_size= 26kB time= 0.800 br= 237.6kbits/s avg_br= 269.0kbits/s type= P
frame= 50 q= 2.0 f_size= 1849 s_size= 28kB time= 0.833 br= 887.5kbits/s avg_br= 276.0kbits/s type= P
frame= 52 q= 2.0 f_size= 501 s_size= 29kB time= 0.867 br= 240.5kbits/s avg_br= 270.0kbits/s type= P
frame= 54 q= 2.0 f_size= 454 s_size= 29kB time= 0.900 br= 217.9kbits/s avg_br= 264.0kbits/s type= P
frame= 56 q= 2.0 f_size= 370 s_size= 29kB time= 0.933 br= 177.6kbits/s avg_br= 257.7kbits/s type= P
frame= 58 q= 2.0 f_size= 442 s_size= 30kB time= 0.967 br= 212.2kbits/s avg_br= 252.5kbits/s type= P
frame= 60 q= 2.0 f_size= 562 s_size= 30kB time= 1.000 br= 269.8kbits/s avg_br= 248.6kbits/s type= P
frame= 62 q= 2.0 f_size= 1587 s_size= 32kB time= 1.033 br= 761.8kbits/s avg_br= 252.9kbits/s type= P
frame= 64 q= 2.0 f_size= 341 s_size= 32kB time= 1.067 br= 163.7kbits/s avg_br= 247.5kbits/s type= P
frame= 66 q= 2.0 f_size= 386 s_size= 33kB time= 1.100 br= 185.3kbits/s avg_br= 242.8kbits/s type= P
frame= 68 q= 2.0 f_size= 381 s_size= 33kB time= 1.133 br= 182.9kbits/s avg_br= 238.4kbits/s type= P
frame= 70 q= 2.0 f_size= 428 s_size= 33kB time= 1.167 br= 205.4kbits/s avg_br= 234.5kbits/s type= P
frame= 72 q= 2.0 f_size= 472 s_size= 34kB time= 1.200 br= 226.6kbits/s avg_br= 231.1kbits/s type= P
frame= 74 q= 2.0 f_size= 1847 s_size= 36kB time= 1.233 br= 886.6kbits/s avg_br= 236.9kbits/s type= P
frame= 76 q= 2.0 f_size= 548 s_size= 36kB time= 1.267 br= 263.0kbits/s avg_br= 234.1kbits/s type= P
frame= 78 q= 2.0 f_size= 476 s_size= 37kB time= 1.300 br= 228.5kbits/s avg_br= 231.0kbits/s type= P
frame= 80 q= 2.0 f_size= 428 s_size= 37kB time= 1.333 br= 205.4kbits/s avg_br= 227.8kbits/s type= P
frame= 82 q= 2.0 f_size= 470 s_size= 38kB time= 1.367 br= 225.6kbits/s avg_br= 225.0kbits/s type= P
frame= 84 q= 2.0 f_size= 411 s_size= 38kB time= 1.400 br= 197.3kbits/s avg_br= 222.0kbits/s type= P
frame= 86 q= 2.0 f_size= 1780 s_size= 40kB time= 1.433 br= 854.4kbits/s avg_br= 226.8kbits/s type= P
frame= 88 q= 2.0 f_size= 450 s_size= 40kB time= 1.467 br= 216.0kbits/s avg_br= 224.1kbits/s type= P
frame= 90 q= 2.0 f_size= 398 s_size= 41kB time= 1.500 br= 191.0kbits/s avg_br= 221.2kbits/s type= P
frame= 92 q= 2.0 f_size= 350 s_size= 41kB time= 1.533 br= 168.0kbits/s avg_br= 218.2kbits/s type= P
frame= 94 q= 2.0 f_size= 392 s_size= 41kB time= 1.567 br= 188.2kbits/s avg_br= 215.6kbits/s type= P
frame= 96 q= 2.0 f_size= 526 s_size= 42kB time= 1.600 br= 252.5kbits/s avg_br= 213.7kbits/s type= P
frame= 98 q= 2.0 f_size= 1759 s_size= 43kB time= 1.633 br= 844.3kbits/s avg_br= 218.0kbits/s type= P
frame= 100 q= 2.0 f_size= 496 s_size= 44kB time= 1.667 br= 238.1kbits/s avg_br= 216.0kbits/s type= P
frame= 102 q= 2.0 f_size= 584 s_size= 45kB time= 1.700 br= 280.3kbits/s avg_br= 214.5kbits/s type= P
frame= 104 q= 2.0 f_size= 465 s_size= 45kB time= 1.733 br= 223.2kbits/s avg_br= 212.5kbits/s type= P
frame= 106 q= 2.0 f_size= 494 s_size= 45kB time= 1.767 br= 237.1kbits/s avg_br= 210.8kbits/s type= P
frame= 108 q= 2.0 f_size= 462 s_size= 46kB time= 1.800 br= 221.8kbits/s avg_br= 208.9kbits/s type= P
frame= 110 q= 2.0 f_size= 1994 s_size= 48kB time= 1.833 br= 957.1kbits/s avg_br= 213.8kbits/s type= P
frame= 112 q= 2.0 f_size= 429 s_size= 48kB time= 1.867 br= 205.9kbits/s avg_br= 211.8kbits/s type= P
frame= 114 q= 2.0 f_size= 536 s_size= 49kB time= 1.900 br= 257.3kbits/s avg_br= 210.4kbits/s type= P
frame= 116 q= 2.0 f_size= 398 s_size= 49kB time= 1.933 br= 191.0kbits/s avg_br= 208.4kbits/s type= P
frame= 118 q= 2.0 f_size= 435 s_size= 50kB time= 1.967 br= 208.8kbits/s avg_br= 206.6kbits/s type= P
frame= 120 q= 2.0 f_size= 609 s_size= 50kB time= 2.000 br= 292.3kbits/s avg_br= 205.6kbits/s type= P
frame= 122 q= 2.0 f_size= 1669 s_size= 52kB time= 2.033 br= 801.1kbits/s avg_br= 208.8kbits/s type= P
a cada segundo ele gera uma nova frase escrito o nº de frames, e eu queria lê todas elas, mas quando eu tento consigo apenas o da primeira linha. como eu faço pra lê somente o q esta escrito frame e o q a elel esta atribuido, mas um de cada vez...
Cara, se foi como eu entendi, tá aÃÂÂ, comentado linha a linha:
Qualquer dúvida poste...flw
Dim f As Integer, Linha As String
'Pega um ID de arquivo livre
f = FreeFile
'Abre o arquivo em modo de leitura
Open "C:\Teste.txt" For Input As #f
'Loop para ler todas linhas
Do While Not EOF(f)
'Atribui o valor da linha àvariável linha
Line Input #f, Linha
'Pega o valor do Frame
Linha = Mid(Linha, InStr(Linha, "=") + 1)
Linha = Trim(Mid(Linha, 1, InStr(Linha, "=") - 1))
'Adiciona no listbox
List1.AddItem Linha
Loop
'Fecha o arquivo
Close #f
Qualquer dúvida poste...flw
Salve MATIOLI
Tópico encerrado , respostas não são mais permitidas