comme son nom l'indique, je suis à la recherche d'une commande permettant de connaître le nom d'un document...
J'ai essayer en utilisant le chemin du document mais ça ne marche pas. Voici mon Script:
► Afficher le texte
Cordialement

Code : Tout sélectionner
#include <Array.au3>
#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Générateur Easyrewards", 268, 193, 362, 257)
$Button1 = GUICtrlCreateButton("Créer un nouveau fichier", 48, 20, 169, 41, 0)
$Button2 = GUICtrlCreateButton("...", 192, 128, 49, 25, 0)
$Label1 = GUICtrlCreateLabel("Date de creation:", 48, 128, 122, 21)
GUICtrlSetFont(-1, 11, 800, 0, "Caviar Dreams")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$zero = ""
$voy = StringSplit("aeiouy", "")
$cons = StringSplit("rtpsdfgjlmcvbn", "")
for $a = 1 to 3
$numv = Random(1, $voy[0],1)
$numc = Random(1, $cons[0],1)
$zero = $zero & $voy[$numv] & $cons[$numc]
Next
FileWrite($zero & ".txt", @MON & @CRLF & @MDAY & @CRLF & @CRLF & "La clé d'activation est : " & $zero)
Case $Button2
$chemin = FileOpenDialog("Date",@DesktopDir,"Texte (*.txt)")
$fichier = Stringsplit ($chemin,"\")
MsgBox (0,"",$fichier[$fichier[0]])
EndSwitch
WEnd