je cherche à extraire 3 informations différentes d'un fichier txt.
J'ai trouvé ce code de base dans un autre sujet que j'essaie d'adapter
Code : Tout sélectionner
$file = FileOpen("InfoSourceVDI.txt", 0)
While 1
$chars = FileReadLine($file)
If @error Then ExitLoop
If StringInStr($chars,"UUID",1) Then
$chars = stringsplit($chars,":")
$chars = $chars[2]
MsgBox(0, "Char read:", $chars)
EndIf
If StringInStr($chars,"Accessible",1) Then
$chars = stringsplit($chars,":")
$chars = $chars[2]
MsgBox(0, "Char read:", $chars)
EndIf
If StringInStr($chars,"Logical size",1) Then
$chars = stringsplit($chars,":")
$chars = $chars[2]
MsgBox(0, "Char read:", $chars)
EndIf
Wend
FileClose($file)
In use by VMs: XNGDOWS (UUID: ae7f4d38-bd27-4bf4-828f-b048a8a556a4)
comment la supprimer la supprimer du résultat ?
Et comment séparer chaque information pour afficher le résultat dans 3 inputbox ?
Sun VirtualBox Command Line Management Interface Version 3.1.6
(C) 2005-2010 Sun Microsystems, Inc.
All rights reserved.
UUID: 1182fa1e-c74c-45d0-97a5-7ab6b3a65946
Accessible: yes
Description:
Logical size: 10240 MBytes
Current size on disk: 6714 MBytes
Type: normal (base)
Storage format: VDI
In use by VMs: WINDOWS (UUID: ae7f4d38-bd27-4bf4-828f-b048a8a556a4)






