<script language="VBScript">
Sub ReadDirectory()
Dim Result
Dim FName
Dim Index
Dim Count
Dim FItem
Count = DirList.length
For Index = 0 to Count - 1
DirList.Remove 0
Next
Set namedObj = Nothing
Set namedObj = CreateObject("UnitechAmericaInc.OnlineCom")
If NOT IsObject(namedObj) Then Exit Sub
If namedObj.Ready <> 1 Then
MsgBox "OnlineDll.Dll is missing!"
Set namedObj = Nothing
Exit Sub
End If
Result = namedObj.SetupEx(1, 38400, 1, "N")
Result = namedObj.Connect()
If Result<>1 Then
MsgBox "Com1 is not available!"
Set namedObj = Nothing
Exit Sub
End If
' Read Directory
Index = 1
Result = namedObj.FindFirst("A")
FName = namedObj.FindName
Do While FName<>""
Set FItem = document.createElement("OPTION")
DirList.options.add(FItem)
FItem.innerText = FName
FItem.value = Index
Index = Index + 1
Result = namedObj.FindNext ("A")
FName = namedObj.FindName
Loop
Call namedObj.Disconnect()
Set namedObj = Nothing
End Sub
</script>
Cette contribution était de : http://old.wdforge.org/newbb/viewtopic.php?forum=19&topic_id=5905&post_id=23838