SHARE
TWEET

Untitled

a guest Jul 28th, 2019 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <File.au3>
  2.  
  3. Apri_File_Random(Richiedi_Percorso_Cartella())
  4.  
  5. Func Richiedi_Percorso_Cartella()
  6.  
  7.     Local $Percorso_Cartella = InputBox("Percorso cartella", "Vuoto per scegliere dalla cartella attuale")
  8.     Return $Percorso_Cartella
  9.  
  10. EndFunc
  11.  
  12. Func Apri_File_Random($Percorso_Cartella)
  13.  
  14.     Local $Array_Lista_Files_Cartella
  15.     Local $Array_Lista_Files_Cartella_Size
  16.  
  17.     If $Percorso_Cartella == "" Then
  18.         $Percorso_Cartella = @ScriptDir
  19.     EndIf
  20.  
  21.     $Array_Lista_Files_Cartella = _FileListToArray($Percorso_Cartella, "*", 1)
  22.     $Array_Lista_Files_Cartella_Size = UBound($Array_Lista_Files_Cartella)
  23.  
  24.     ShellExecute($Array_Lista_Files_Cartella[Random(1, $Array_Lista_Files_Cartella_Size - 1, 1)])
  25.  
  26. EndFunc
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top