Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <File.au3>
- Apri_File_Random(Richiedi_Percorso_Cartella())
- Func Richiedi_Percorso_Cartella()
- Local $Percorso_Cartella = InputBox("Percorso cartella", "Vuoto per scegliere dalla cartella attuale")
- Return $Percorso_Cartella
- EndFunc
- Func Apri_File_Random($Percorso_Cartella)
- Local $Array_Lista_Files_Cartella
- Local $Array_Lista_Files_Cartella_Size
- If $Percorso_Cartella == "" Then
- $Percorso_Cartella = @ScriptDir
- EndIf
- $Array_Lista_Files_Cartella = _FileListToArray($Percorso_Cartella, "*", 1)
- $Array_Lista_Files_Cartella_Size = UBound($Array_Lista_Files_Cartella)
- ShellExecute($Array_Lista_Files_Cartella[Random(1, $Array_Lista_Files_Cartella_Size - 1, 1)])
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement