Bonjour,
Je souhaite pouvoir dire à mon Google Home : "Ouvre VLC" et grâce à IFTTT envoyer un fichier VLC.txt dans un répertoire local dropbox... Jusque là tout va bien, Google home fait le job, le script que j'ai fait ci-dessous trouve et supprimer le fichier mais malheureusement il n'ouvre pas VLC en tâche de fond (planificateur de tâche qui lance le script).
Quand je lance le script à la main aucun souci, ça ouvre bien VLC :
Merci pour votre aide,
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 #Declare Variables $SearchDirectory = "C:\Users\XXXXX\Dropbox\IFTTT" #Sleep for 1 minute before being active (to prevent boot loops if the file for some reason is not deleted) Start-Sleep -Seconds 15 #Loop checking to see if the file has been created and once it has it continues on. Sleep in the look to prevent CPU pegging Do { Start-Sleep -Seconds $SleepTime $FileCheck = Test-Path -Path "$SearchDirectory\VLC.txt" } Until ($FileCheck -eq $True) #Removes the shutdown file to prevent an imediate shutdown when the computer starts back up Remove-Item -Path "$SearchDirectory\VLC.txt" #Normally starts the f#*%ยง program vlc
Rithy666
Partager