1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| For Each fichier As String In ListBox2.Items
My.Computer.FileSystem.WriteAllText("C:\script98\Fichiers a utiliser.txt", fichier + vbCrLf, True)
Next
Création du fichier .scr:
Function creerscript(ByVal Label1 As String)
Dim compteur As Boolean = True
Dim temp As String = ""
Try
My.Computer.FileSystem.DeleteFile("C:\script98\script.scr")
Catch
End Try
My.Computer.FileSystem.WriteAllText("C:\script98\script.scr", "filedia 0 cmddia 0 sdi 0" + vbCrLf, True)
Try
' open "C:\script98\Fichiers a utiliser.txt" for output as FileNbr
FileOpen(1, "C:\script98\Fichiers a utiliser.txt", OpenMode.Input)
While Not EOF(1)
temp = LineInput(1)
If compteur = True Then
My.Computer.FileSystem.WriteAllText("C:\script98\script.scr", "ligne 0,0 1,1 _open ", True)
compteur = False
Else
My.Computer.FileSystem.WriteAllText("C:\script98\script.scr", "ligne 0,0 1,1 _close _Y _open ", True)
End If
My.Computer.FileSystem.WriteAllText("C:\script98\script.scr", temp + " zoom ET A4 (210 x 297 mm) pAysage non Etendu Plein Format Centre O Grayscale.ctb " + vbCrLf, True)
End While
My.Computer.FileSystem.WriteAllText("C:\script98\script.scr", "filedia 1 cmddia 1" + vbCrLf, True)
Catch ex As Exception
End Try
Return 1
End Function
End Class |
Partager