diff --git a/bin/SARAH_Restart.vbs b/bin/SARAH_Restart.vbs new file mode 100644 index 0000000..95197fa --- /dev/null +++ b/bin/SARAH_Restart.vbs @@ -0,0 +1,30 @@ +'===================================== +' RESTART (STOP THEN START) S.A.R.A.H. +'===================================== +Option explicit + +Dim WshShell +Dim sScriptPath, sRunSarah, sStopSarah +Dim iReturnValue +Dim Return + + +iReturnValue = -1 + +sScriptPath = Replace(WScript.ScriptFullName, WScript.ScriptName, "") +sRunSarah = "SARAH_Run.vbs" +sStopSarah = "SARAH_Stop.vbs" + +Set WshShell = WScript.CreateObject("WScript.Shell") + +' Stop SARAH, and wait until the processes are finished +Return = WshShell.Run(sScriptPath & sStopSarah, 1, true) + +' Run SARAH +Return = WshShell.Run(sScriptPath & sRunSarah, 1, False) + +Set WshShell = nothing + + +iReturnValue = 0 +WScript.Quit(iReturnValue) \ No newline at end of file diff --git a/bin/action_close_window.vbs b/bin/action_close_window.vbs new file mode 100644 index 0000000..1532926 --- /dev/null +++ b/bin/action_close_window.vbs @@ -0,0 +1,3 @@ +set WshShell = WScript.CreateObject("WScript.Shell") +WshShell.SendKeys "%{F4}" + diff --git a/bin/action_desktop.vbs b/bin/action_desktop.vbs new file mode 100644 index 0000000..da9d190 --- /dev/null +++ b/bin/action_desktop.vbs @@ -0,0 +1,3 @@ +set WshShell = WScript.CreateObject("WScript.Shell") +WshShell.SendKeys "^d" + diff --git a/bin/action_droite.vbs b/bin/action_droite.vbs new file mode 100644 index 0000000..d7a6bc2 --- /dev/null +++ b/bin/action_droite.vbs @@ -0,0 +1,4 @@ +set WshShell = WScript.CreateObject("WScript.Shell") +WshShell.SendKeys "{RIGHT}" + + diff --git a/bin/action_enter.vbs b/bin/action_enter.vbs new file mode 100644 index 0000000..80395a1 --- /dev/null +++ b/bin/action_enter.vbs @@ -0,0 +1,3 @@ +set WshShell = WScript.CreateObject("WScript.Shell") +WshShell.SendKeys "{ENTER}" + diff --git a/bin/action_f4.vbs b/bin/action_f4.vbs new file mode 100644 index 0000000..7e67b09 --- /dev/null +++ b/bin/action_f4.vbs @@ -0,0 +1,3 @@ +set WshShell = WScript.CreateObject("WScript.Shell") +WshShell.SendKeys "^{f4}" + diff --git a/bin/action_f5.vbs b/bin/action_f5.vbs new file mode 100644 index 0000000..0f75a5c --- /dev/null +++ b/bin/action_f5.vbs @@ -0,0 +1,3 @@ +set WshShell = WScript.CreateObject("WScript.Shell") +WshShell.SendKeys "{f5}" + diff --git a/bin/action_gauche.vbs b/bin/action_gauche.vbs new file mode 100644 index 0000000..621e165 --- /dev/null +++ b/bin/action_gauche.vbs @@ -0,0 +1,4 @@ +set WshShell = WScript.CreateObject("WScript.Shell") +WshShell.SendKeys "{LEFT}" + + diff --git a/bin/action_minimize.vbs b/bin/action_minimize.vbs new file mode 100644 index 0000000..e5c409b --- /dev/null +++ b/bin/action_minimize.vbs @@ -0,0 +1,3 @@ +Set Shell = WScript.CreateObject("Shell.Application") +Shell.MinimizeAll + diff --git a/bin/action_next.vbs b/bin/action_next.vbs new file mode 100644 index 0000000..2157cdd --- /dev/null +++ b/bin/action_next.vbs @@ -0,0 +1,3 @@ +set WshShell = WScript.CreateObject("WScript.Shell") +WshShell.SendKeys "%{RIGHT}" + diff --git a/bin/action_precedent.vbs b/bin/action_precedent.vbs new file mode 100644 index 0000000..99b75f2 --- /dev/null +++ b/bin/action_precedent.vbs @@ -0,0 +1,3 @@ +set WshShell = WScript.CreateObject("WScript.Shell") +WshShell.SendKeys "%{LEFT}" + diff --git a/bin/action_restore.vbs b/bin/action_restore.vbs new file mode 100644 index 0000000..4ef3f95 --- /dev/null +++ b/bin/action_restore.vbs @@ -0,0 +1,3 @@ +Set Shell = WScript.CreateObject("Shell.Application") +Shell.UndoMinimizeAll + diff --git a/bin/action_save.vbs b/bin/action_save.vbs new file mode 100644 index 0000000..26a92a4 --- /dev/null +++ b/bin/action_save.vbs @@ -0,0 +1,3 @@ +set WshShell = WScript.CreateObject("WScript.Shell") +WshShell.SendKeys "^s" + diff --git a/bin/action_tab.vbs b/bin/action_tab.vbs new file mode 100644 index 0000000..ad9db95 --- /dev/null +++ b/bin/action_tab.vbs @@ -0,0 +1,2 @@ +set WshShell = WScript.CreateObject("WScript.Shell") +WshShell.SendKeys "%{TAB}" diff --git a/bin/explorer.bat b/bin/explorer.bat new file mode 100644 index 0000000..f5cbb5e --- /dev/null +++ b/bin/explorer.bat @@ -0,0 +1 @@ +cmd /c start explorer.exe diff --git a/bin/explorer_disks.bat b/bin/explorer_disks.bat new file mode 100644 index 0000000..8a58289 --- /dev/null +++ b/bin/explorer_disks.bat @@ -0,0 +1 @@ +diskmgmt.msc \ No newline at end of file diff --git a/bin/explorer_dl.bat b/bin/explorer_dl.bat new file mode 100644 index 0000000..12e2fb4 --- /dev/null +++ b/bin/explorer_dl.bat @@ -0,0 +1 @@ +explorer "C:\Users\itrix\Downloads" \ No newline at end of file diff --git a/bin/explorer_documents.bat b/bin/explorer_documents.bat new file mode 100644 index 0000000..e63cf07 --- /dev/null +++ b/bin/explorer_documents.bat @@ -0,0 +1 @@ +explorer "C:\Users\itrix\Documents" diff --git a/bin/explorer_images.bat b/bin/explorer_images.bat new file mode 100644 index 0000000..51149b7 --- /dev/null +++ b/bin/explorer_images.bat @@ -0,0 +1 @@ +explorer "C:\Users\itrix\Pictures" diff --git a/bin/explorer_jarvis.bat b/bin/explorer_jarvis.bat new file mode 100644 index 0000000..cd9a554 --- /dev/null +++ b/bin/explorer_jarvis.bat @@ -0,0 +1 @@ +explorer "J:\" diff --git a/bin/explorer_plugins.bat b/bin/explorer_plugins.bat new file mode 100644 index 0000000..399beeb --- /dev/null +++ b/bin/explorer_plugins.bat @@ -0,0 +1 @@ +explorer "J:\plugins" diff --git a/bin/pc_desktop_hide.bat b/bin/pc_desktop_hide.bat new file mode 100644 index 0000000..2d425f2 --- /dev/null +++ b/bin/pc_desktop_hide.bat @@ -0,0 +1,2 @@ +@echo off +%CD%/plugins/jarvis/nircmd/nircmdc.exe win hide class progman diff --git a/bin/pc_desktop_show.bat b/bin/pc_desktop_show.bat new file mode 100644 index 0000000..a7384e8 --- /dev/null +++ b/bin/pc_desktop_show.bat @@ -0,0 +1,2 @@ +@echo off +%CD%/plugins/jarvis/nircmd/nircmdc.exe win show class progman diff --git a/bin/pc_mute.bat b/bin/pc_mute.bat new file mode 100644 index 0000000..1e3e4d5 --- /dev/null +++ b/bin/pc_mute.bat @@ -0,0 +1,3 @@ +@echo off +%CD%/plugins/jarvis/nircmd/nircmdc.exe mutesysvolume 1 +exit 0 \ No newline at end of file diff --git a/bin/pc_restart.bat b/bin/pc_restart.bat new file mode 100644 index 0000000..55962a2 --- /dev/null +++ b/bin/pc_restart.bat @@ -0,0 +1 @@ +start C:\"Windows\System32\shutdown.exe" -r -t 0 \ No newline at end of file diff --git a/bin/pc_shutdown.bat b/bin/pc_shutdown.bat new file mode 100644 index 0000000..be99733 --- /dev/null +++ b/bin/pc_shutdown.bat @@ -0,0 +1 @@ +start C:\"Windows\System32\shutdown.exe" -s -t 0 diff --git a/bin/pc_unmute.bat b/bin/pc_unmute.bat new file mode 100644 index 0000000..4fc8cef --- /dev/null +++ b/bin/pc_unmute.bat @@ -0,0 +1,3 @@ +@echo off +%CD%/plugins/jarvis/nircmd/nircmdc.exe mutesysvolume 0 +exit 0 \ No newline at end of file diff --git a/bin/pc_veille.bat b/bin/pc_veille.bat new file mode 100644 index 0000000..e8ce864 --- /dev/null +++ b/bin/pc_veille.bat @@ -0,0 +1,3 @@ +@echo off +%CD%/plugins/jarvis/nircmd/nircmdc.exe standby +exit 0 \ No newline at end of file diff --git a/bin/program_close_discord.bat b/bin/program_close_discord.bat new file mode 100644 index 0000000..c88d774 --- /dev/null +++ b/bin/program_close_discord.bat @@ -0,0 +1 @@ +taskkill /f /im discord.exe diff --git a/bin/program_close_firefox.bat b/bin/program_close_firefox.bat new file mode 100644 index 0000000..e01a544 --- /dev/null +++ b/bin/program_close_firefox.bat @@ -0,0 +1 @@ +taskkill /f /im firefox.exe diff --git a/bin/program_close_jarvis.bat b/bin/program_close_jarvis.bat new file mode 100644 index 0000000..6f5c5cf --- /dev/null +++ b/bin/program_close_jarvis.bat @@ -0,0 +1 @@ +taskkill /f /im Rainmeter.exe \ No newline at end of file diff --git a/bin/program_close_sublimetext.bat b/bin/program_close_sublimetext.bat new file mode 100644 index 0000000..2c17711 --- /dev/null +++ b/bin/program_close_sublimetext.bat @@ -0,0 +1 @@ +taskkill /f /im sublime_text.exe diff --git a/bin/program_run_discord.bat b/bin/program_run_discord.bat new file mode 100644 index 0000000..cd8bb8b --- /dev/null +++ b/bin/program_run_discord.bat @@ -0,0 +1,2 @@ +@echo off +start %CD%/plugins/jarvis/url/Discord.lnk \ No newline at end of file diff --git a/bin/program_run_firefox.bat b/bin/program_run_firefox.bat new file mode 100644 index 0000000..08217a2 --- /dev/null +++ b/bin/program_run_firefox.bat @@ -0,0 +1 @@ +start C:\"Program Files\Mozilla Firefox\firefox.exe" diff --git a/bin/program_run_jarvis.bat b/bin/program_run_jarvis.bat new file mode 100644 index 0000000..9d24a3d --- /dev/null +++ b/bin/program_run_jarvis.bat @@ -0,0 +1,2 @@ +start C:\"Program Files\Rainmeter\Rainmeter.exe" +%CD%/plugins/jarvis/nircmd/nircmdc.exe sendkeypress rwin+d \ No newline at end of file diff --git a/bin/program_run_sublimetext.bat b/bin/program_run_sublimetext.bat new file mode 100644 index 0000000..ffcdfdc --- /dev/null +++ b/bin/program_run_sublimetext.bat @@ -0,0 +1 @@ +start C:\"Program Files\Sublime Text 3\sublime_text.exe" \ No newline at end of file diff --git a/bin/system_dvd_off.bat b/bin/system_dvd_off.bat new file mode 100644 index 0000000..7200390 --- /dev/null +++ b/bin/system_dvd_off.bat @@ -0,0 +1,3 @@ +@echo off +%CD%/plugins/jarvis/nircmd/nircmdc.exe cdrom close e: +exit 0 \ No newline at end of file diff --git a/bin/system_dvd_on.bat b/bin/system_dvd_on.bat new file mode 100644 index 0000000..94b54f1 --- /dev/null +++ b/bin/system_dvd_on.bat @@ -0,0 +1,3 @@ +@echo off +%CD%/plugins/jarvis/nircmd/nircmdc.exe cdrom open e: +exit 0 \ No newline at end of file diff --git a/bin/system_quit_all.bat b/bin/system_quit_all.bat new file mode 100644 index 0000000..11da334 --- /dev/null +++ b/bin/system_quit_all.bat @@ -0,0 +1,9 @@ +taskkill /f /im explorer.exe +taskkill /f /im firefox.exe +taskkill /f /im notepad.exe +taskkill /f /im sublime_text.exe +taskkill /f /im discord.exe + + +start c:/Windows/explorer.exe +taskkill /f /im cmd.exe \ No newline at end of file diff --git a/bin/system_screen_off.bat b/bin/system_screen_off.bat new file mode 100644 index 0000000..f5845c9 --- /dev/null +++ b/bin/system_screen_off.bat @@ -0,0 +1,3 @@ +@echo off +%CD%/plugins/jarvis/nircmd/nircmdc.exe monitor async_off +exit 0 \ No newline at end of file diff --git a/bin/system_screen_on.vbs b/bin/system_screen_on.vbs new file mode 100644 index 0000000..6f801ca --- /dev/null +++ b/bin/system_screen_on.vbs @@ -0,0 +1,2 @@ +set WshShell = WScript.CreateObject("WScript.Shell") +WshShell.SendKeys "{ESC}" \ No newline at end of file diff --git a/bin/url_box.bat b/bin/url_box.bat new file mode 100644 index 0000000..95eb879 --- /dev/null +++ b/bin/url_box.bat @@ -0,0 +1,2 @@ +@echo off +start %CD%/plugins/jarvis/url/box.url \ No newline at end of file diff --git a/bin/url_facebook.bat b/bin/url_facebook.bat new file mode 100644 index 0000000..91c70c9 --- /dev/null +++ b/bin/url_facebook.bat @@ -0,0 +1,2 @@ +@echo off +start %CD%/plugins/jarvis/url/facebook.url \ No newline at end of file diff --git a/bin/url_home.bat b/bin/url_home.bat new file mode 100644 index 0000000..ad2daaf --- /dev/null +++ b/bin/url_home.bat @@ -0,0 +1,2 @@ +@echo off +start %CD%/plugins/jarvis/url/home.url \ No newline at end of file diff --git a/bin/url_store.bat b/bin/url_store.bat new file mode 100644 index 0000000..668c889 --- /dev/null +++ b/bin/url_store.bat @@ -0,0 +1,2 @@ +@echo off +start %CD%/plugins/jarvis/url/store.url \ No newline at end of file diff --git a/bin/url_youtube.bat b/bin/url_youtube.bat new file mode 100644 index 0000000..6116b89 --- /dev/null +++ b/bin/url_youtube.bat @@ -0,0 +1,2 @@ +@echo off +start %CD%/plugins/jarvis/url/youtube.url \ No newline at end of file diff --git a/images/10981156_1536652686607345_4137601415673570201_n.jpg b/images/10981156_1536652686607345_4137601415673570201_n.jpg new file mode 100644 index 0000000..31732aa Binary files /dev/null and b/images/10981156_1536652686607345_4137601415673570201_n.jpg differ diff --git a/images/J.A.R.V.I.S..jpg b/images/J.A.R.V.I.S..jpg new file mode 100644 index 0000000..3f247c0 Binary files /dev/null and b/images/J.A.R.V.I.S..jpg differ diff --git a/images/Jarvis.jpg b/images/Jarvis.jpg new file mode 100644 index 0000000..390f098 Binary files /dev/null and b/images/Jarvis.jpg differ diff --git a/images/jarvis.png b/images/jarvis.png new file mode 100644 index 0000000..ebb4382 Binary files /dev/null and b/images/jarvis.png differ diff --git a/jarvis.js b/jarvis.js new file mode 100644 index 0000000..377bf6e --- /dev/null +++ b/jarvis.js @@ -0,0 +1,607 @@ +exports.init = function(SARAH, SARAH2){ + console.log('Jarvis initialisation terminée.'); +} + +exports.action = function(data, callback, config, SARAH) { + + config = config.modules.jarvis; + var exec = require('child_process').exec; + + switch(data.val) { + + //Tu es là ? + case "la": + var Txt = new Array; + Txt[0] = "oui monsieur"; + Txt[1] = "oui monsieur, que puije pour vous"; + Txt[2] = "biensur"; + Txt[3] = "comme toujours"; + Txt[4] = "oui"; + Txt[4] = "Pour vous monsieur, toujours"; + break; + + + + /*** - - - - - - - - - - - - - - DATE & HEURE - - - - - - - - - - - - - - ***/ + + //Donne l'heure + case "time": + var date = new Date(); + var Txt = new Array; + var text = 'il est ' + date.getHours() + ' heure '; + if (date.getMinutes() > 0){ + text += date.getMinutes(); + } + text += ' [name]'; + + Txt[0] = text; + break; + + case "date": + var Txt = new Array; + var moment = require('moment'); + moment.lang('fr'); + var datedujour = moment().format("dddd, DD MMMM YYYY, HH [heure] mm"); + + Txt[0] = "Nous sommes le " + datedujour; + Txt[1] = "La date du jour est le " + datedujour; + Txt[2] = "Aujourd'hui nous sommes le " + datedujour; + + break; + + + + /*** - - - - - - - - - - - - - - AFFICHAGE ECRAN - - - - - - - - - - - - - - ***/ + + //Affiche son interface sur Rainmeter. + case "program_run_jarvis": + var process = '%CD%/plugins/jarvis/bin/program_run_jarvis.bat'; + var Txt = new Array; + Txt[0] = "je l'affiche"; + Txt[1] = "je lance mon interface"; + Txt[2] = "je m'en auccupe"; + Txt[3] = "tout de suite"; + break; + + //Ferme son interface sur Rainmeter. + case "program_close_jarvis": + var process = '%CD%/plugins/jarvis/bin/program_close_jarvis.bat'; + var Txt = new Array; + Txt[0] = "c'est fait monsieur"; + Txt[1] = "je l'ai fermé"; + Txt[2] = "interface fermé"; + Txt[3] = "je l'ai masqué"; + Txt[4] = "je l'ai désactivé"; + break; + + //Affiche le bureau + case "action_minimize": + process = '%CD%/plugins/jarvis/bin/action_minimize.vbs'; + var Txt = new Array; + Txt[0] = "vous etes sur le bureau"; + Txt[1] = "voici le bureau"; + Txt[2] = "affichage du bureau"; + Txt[3] = "vous voici sur le bureau monsieur" + break; + + //Restaure les fenêtres + case "action_restore": + process = '%CD%/plugins/jarvis/bin/action_restore.vbs'; + var Txt = new Array; + Txt[0] = "affichage des fenêtres"; + Txt[1] = "restoration des fenêtres"; + Txt[2] = "je remet les fenêtres"; + Txt[3] = "tout de suite"; + Txt[4] = "tout de suite monsieur"; + break; + + //Exemple ouverture et fermeture d'un jeu. + /*case "runminncraft": + var process = '%CD%/plugins/jarvis/bin/runmincraft.bat'; + var Txt = new Array; + Txt[0] = "c'est fait monsieur creusé bien"; + Txt[1] = "bon jeux"; + Txt[2] = "amusez vous bien"; + Txt[3] = "c'est partis"; + break; + + case "closeminncraft": + var process = '%CD%/plugins/jarvis/bin/Closemincraft.bat'; + var Txt = new Array; + Txt[0] = "je ferm"; + Txt[1] = "je le ferm"; + Txt[2] = "c'est fermé"; + Txt[3] = "tout de suite"; + Txt[4] = "tout de suite monsieur"; + Txt[5] = "le jeux est fermé"; + Txt[5] = "finis de jouer monsieur"; + break;*/ + + + + /*** - - - - - - - - - - - - - - PAGE INTERNET - - - - - - - - - - - - - - ***/ + + //Rafraichissement de la page + case "action_f5": + process = '%CD%/plugins/jarvis/bin/action_f5.vbs'; + var Txt = new Array; + Txt[0] = "voilà"; + Txt[1] = "j'ai actualisé la page"; + Txt[2] = "c'est fait"; + Txt[3] = "voilà monsieur"; + Txt[4] = "tout de suite"; + Txt[5] = "tout de suite monsieur"; + break; + + //Affiche la page web + case "url_home": + process = '%CD%/plugins/jarvis/bin/url_home.bat'; + var Txt = new Array; + Txt[0] = "voilà mon panneau de configuration"; + Txt[1] = "des réglages à faire, Monsieur ?"; + Txt[2] = "c'est fait"; + Txt[3] = "voilà le home"; + break; + + //Affiche le store de S.A.R.A.H sur le panel admin. + case "url_store": + process = '%CD%/plugins/jarvis/bin/url_store.bat'; + var Txt = new Array; + Txt[0] = "tout de suite"; + Txt[1] = "j'ouvre la page"; + Txt[2] = "je vais recevoir un nouveau pluguine"; + Txt[3] = "je vous ouvre ça"; + Txt[4] = "voilà le store Monsieur"; + break; + + //Affiche la page de la box internet (192.168.1.1) + case "url_box": + process = '%CD%/plugins/jarvis/bin/url_box.bat'; + var Txt = new Array; + Txt[0] = "tout de suite"; + Txt[1] = "j'ouvre la page"; + Txt[2] = "j'ouvre la box"; + Txt[3] = "je vous ouvre ça"; + Txt[4] = "voilà la page de votre box"; + Txt[5] = "page de configuration de la box"; + break; + + //Ferme l'onglet + case "action_f4": + process = '%CD%/plugins/jarvis/bin/action_f4.vbs'; + var Txt = new Array; + Txt[0] = "voilà"; + Txt[1] = "onglet fermé"; + Txt[2] = "c'est fait"; + Txt[3] = "voilà monsieur"; + Txt[4] = "tout de suite"; + Txt[5] = "tout de suite monsieur"; + break; + + //Ouvre la page facebook.com + case "url_facebook": + process = '%CD%/plugins/jarvis/bin/url_facebook.bat'; + var Txt = new Array; + Txt[0] = "voilà fessbouque"; + Txt[1] = "c'est fait"; + Txt[2] = "voilà monsieur"; + Txt[3] = "tout de suite"; + Txt[4] = "tout de suite monsieur"; + break; + + //Ouvre la page youtube.com + case "url_youtube": + process = '%CD%/plugins/jarvis/bin/url_youtube.bat'; + var Txt = new Array; + Txt[0] = "voilà youtube"; + Txt[1] = "c'est fait"; + Txt[2] = "voilà monsieur"; + Txt[3] = "tout de suite"; + Txt[4] = "tout de suite monsieur"; + break; + + + + /*** - - - - - - - - - - - - - - DOSSIERS & EXPLORATEUR - - - - - - - - - - - - - - ***/ + + //Ouvre le dossier des plugins + case "explorer_plugins": + var process = '%CD%/plugins/jarvis/bin/explorer_plugins.bat'; + var Txt = new Array; + Txt[0] = "j'ouvre le dossier"; + Txt[1] = "voici mes pluguine"; + Txt[2] = "tout de suite"; + break; + + //Ouvre le dossier principal de Jarvis + case "explorer_jarvis": + var process = '%CD%/plugins/jarvis/bin/explorer_jarvis.bat'; + break; + + //Affiche le dossier "Images" + case "explorer_images": + var process = '%CD%/plugins/jarvis/bin/explorer_images.bat'; + break; + + //Affiche le dossier "Documents" + case "explorer_documents": + var process = '%CD%/plugins/jarvis/bin/explorer_documents.bat'; + break; + + //Affiche le dossier "Téléchargements" + case "explorer_dl": + var process = '%CD%/plugins/jarvis/bin/explorer_dl.bat'; + break; + + //Affiche les disques + case "explorer_disks": + var process = '%CD%/plugins/jarvis/bin/explorer_disks.bat'; + break; + + + + /*** - - - - - - - - - - - - - - LANCEMENT & FERMETURE DE LOGICIELS - - - - - - - - - - - - - - ***/ + + //Lancement de firefox + case "program_run_firefox": + var process = '%CD%/plugins/jarvis/bin/program_run_firefox.bat'; + var Txt = new Array; + Txt[0] = "j'ouvre failleur fox"; + Txt[1] = "je lance failleur fox"; + Txt[2] = "bon surf monsieur"; + Txt[3] = "tout de suite"; + Txt[4] = "tout de suite"; + break; + + //Fermeture de firefox + case "program_close_firefox": + var process = '%CD%/plugins/jarvis/bin/program_close_firefox.bat'; + var Txt = new Array; + Txt[0] = "c'est fait monsieur"; + Txt[1] = "je l'ai fermé"; + Txt[2] = "failleur fox fermé"; + break; + + //Lancement de Sublime Text + case "program_run_sublimetext": + var process = '%CD%/plugins/jarvis/bin/program_run_sublimetext.bat'; + var Txt = new Array; + Txt[0] = "j'ouvre l'editeur"; + Txt[1] = "je lance notpade"; + Txt[2] = "tout de suite"; + break; + + //Fermeture de Sublime Text + case "program_close_sublimetext": + var process = '%CD%/plugins/jarvis/bin/program_close_sublimetext.bat'; + var Txt = new Array; + Txt[0] = "éditeur fermé monsieur"; + Txt[1] = "je l'ai fermé"; + Txt[2] = "notpad fermé"; + break; + + //Lancement de discord + case "program_run_discord": + var process = '%CD%/plugins/jarvis/bin/program_run_discord.bat'; + var Txt = new Array; + Txt[0] = "j'ouvre discorde"; + Txt[1] = "je lance discorde"; + Txt[2] = "tout de suite"; + Txt[3] = "tout de suite monsieur"; + break; + + //Fermeture de discord + case "program_close_discord": + var process = '%CD%/plugins/jarvis/bin/program_close_discord.bat'; + var Txt = new Array; + Txt[0] = "discord fermé monsieur"; + Txt[1] = "je l'ai fermé"; + Txt[2] = "discord fermé"; + break; + + + + /*** - - - - - - - - - - - - - - ACTIONS - - - - - - - - - - - - - - ***/ + + //Précédent + case "action_precedent": + process = '%CD%/plugins/jarvis/bin/action_precedent.vbs'; + var Txt = new Array; + Txt[0] = "retour en arrière"; + Txt[1] = "précédent"; + break; + + //Suivant + case "action_next": + process = '%CD%/plugins/jarvis/bin/action_next.vbs'; + var Txt = new Array; + Txt[0] = "suivant"; + break; + + //Entrer/Valider + case "action_enter": + process = '%CD%/plugins/jarvis/bin/action_enter.vbs'; + var Txt = new Array; + Txt[0] = "je valide"; + break; + + //Sauvegarder (CTRL + S) + case "action_save": + process = '%CD%/plugins/jarvis/bin/action_save.vbs'; + var Txt = new Array; + Txt[0] = "c'est fait"; + Txt[1] = "je sauvegarde"; + Txt[2] = "sauvegarde éffectué"; + Txt[3] = "fichier sauvegardé"; + Txt[4] = "c'est fait monsieur"; + Txt[5] = "je sauvegarde monsieur"; + Txt[6] = "sauvegarde éffectué monsieur"; + Txt[7] = "fichier sauvegardé monsieur"; + break; + + //Tabulation + case "action_tab": + process = '%CD%/plugins/jarvis/bin/action_tab.vbs'; + var Txt = new Array; + Txt[0] = "fenêtre suivante"; + Txt[1] = "changement de fenêtre"; + break; + + //Fermer une fenêtre + case "action_close_window": + process = '%CD%/plugins/jarvis/bin/action_close_window.vbs'; + var Txt = new Array; + Txt[0] = "je ferme"; + Txt[1] = "fermeture de la fenêtre"; + Txt[2] = "fermeture de la page"; + Txt[3] = "c'est fermé"; + Txt[4] = "tout de suite"; + Txt[5] = "tout de suite monsieur"; + break; + + //Ferme les principales fenêtres du système. + case "system_quit_all": + var process = '%CD%/plugins/jarvis/bin/system_quit_all.bat'; + var Txt = new Array; + Txt[0] = "tout est fermé"; + Txt[1] = "je m'en auccupe"; + Txt[2] = "tout de suite"; + Txt[3] = "c'est fait"; + break; + + + + /*** - - - - - - - - - - - - - - GESTION DU PC - - - - - - - - - - - - - - ***/ + + //Éteindre le PC + case "pc_shutdown": + var Txt = new Array; + Txt[0] = "je ferme la boutique"; + Txt[1] = "arret de l'ordinateur en cours"; + Txt[2] = "arret de l'ordinateur en cours Monsieur"; + Txt[3] = "arret en cours"; + Txt[4] = "j'éteint l'ordinateur"; + var process = '%CD%/plugins/jarvis/bin/pc_shutdown.bat'; + break; + + //Redémarrer le PC + case "pc_restart": + var Txt = new Array; + Txt[0] = "redémarrage de l'ordinateur en cours"; + Txt[1] = "redémarrage de l'ordinateur en cours Monsieur"; + Txt[2] = "redémarrage en cours"; + Txt[3] = "je redémarre l'ordinateur"; + var process = '%CD%/plugins/jarvis/bin/pc_restart.bat'; + break; + + //Coupe le son + case "pc_mute": + var Txt = new Array; + Txt[0] = "Système muet."; + Txt[1] = "Je coupe le son"; + var process = '%CD%/plugins/jarvis/bin/pc_mute.bat'; + break; + + //Remet le son + case "pc_unmute": + var process = '%CD%/plugins/jarvis/bin/pc_unmute.bat'; + var Txt = new Array; + Txt[0] = "J'active le son"; + Txt[1] = "Je remet le son"; + break; + + //Désactive le bureau + case "pc_desktop_hide": + var Txt = new Array; + var process = '%CD%/plugins/jarvis/bin/pc_desktop_hide.bat'; + Txt[0] = "Le bureau est désactivé monsieur"; + Txt[1] = "Je masque le bureau"; + break; + + //Active le bureau + case "pc_desktop_show": + var Txt = new Array; + var process = '%CD%/plugins/jarvis/bin/pc_desktop_show.bat'; + Txt[0] = "Le bureau est activé monsieur"; + Txt[1] = "J'affiche le bureau"; + break; + + //Active le bureau + case "pc_veille": + var Txt = new Array; + var process = '%CD%/plugins/jarvis/bin/pc_veille.bat'; + Txt[0] = "Je passe l'ordinateur en veille"; + Txt[1] = "Activation du mode veille"; + break; + + + + /*** - - - - - - - - - - - - - - GESTION DE JARVIS - - - - - - - - - - - - - - ***/ + + //Redèmarrage de Jarvis (S.A.R.A.H) + case "jarvis_reboot": + var process = '%CD%/plugins/jarvis/bin/SARAH_Restart.vbs'; + break; + + + + /*** - - - - - - - - - - - - - - GESTION DES PÉRIPHÉRIQUES - - - - - - - - - - - - - - ***/ + + //action_enter déjà défini (L. 303) + + //Éteint l/les écran(s) + case "system_screen_off": + process = '%CD%/plugins/jarvis/bin/system_screen_off.bat'; + var Txt = new Array; + Txt[0] = "les écrans s'éteignent"; + Txt[1] = "voila, écrans éteint monsieur"; + Txt[2] = "tout de suite"; + Txt[3] = "tout de suite monsieur"; + break; + + //Allume l/les écran(s) + case "system_screen_on": + process = '%CD%/plugins/jarvis/bin/system_screen_on.vbs'; + var Txt = new Array; + Txt[0] = "les écrans s'allument"; + Txt[1] = "voila, écrans allumés monsieur"; + Txt[2] = "tout de suite"; + Txt[3] = "tout de suite monsieur"; + break; + + //Ouvre le lecteur DVD + case "system_dvd_on": + process = '%CD%/plugins/jarvis/bin/system_dvd_on.bat'; + var Txt = new Array; + Txt[0] = "lecteur ouvert"; + Txt[1] = "le lecteur est ouvert"; + Txt[2] = "c'est fait"; + Txt[3] = "c'est fait monsieur"; + Txt[4] = "tout de suite"; + Txt[5] = "tout de suite monsieur"; + break; + + //Ferme le lecteur DVD + case "system_dvd_off": + process = '%CD%/plugins/jarvis/bin/system_dvd_off.bat'; + var Txt = new Array; + Txt[0] = "je le ferm"; + Txt[1] = "fermeture du lecteur"; + Txt[2] = "lecteur fermé"; + Txt[3] = "c'est fermé"; + Txt[4] = "tout de suite"; + Txt[5] = "tout de suite monsieur"; + break; + + + + /*** - - - - - - - - - - - - - - DISCUTIONS - - - - - - - - - - - - - - ***/ + + //Comment ça va ? + case "humeur": + var reponses = [ + "Ca va bien, Monsieur, et vous ?", + "Comme d'habitude Monsieur, et vous ?", + "Je me sens bien, merci. Et vous ?", + "Je sens que mes circuit chauffe un peu, mais ça va. Et vous ?" + ]; + + var choix = Math.floor(Math.random() * reponses.length); + var answer = reponses[choix]; + + SARAH.askme(answer, { + "très bien": 'good', "très bien merci": 'good', + "bien": 'good', + "je vais bien": 'good', + "comme d'habitude": 'good', + "ça va": 'good', + "sa va": 'good', + "tranquille": 'good', + "pas très bien": 'bad', + "pas super": 'bad', + "pas top": 'bad', + "bof": 'bad', + }, 10000, function(answer, end){ // the selected answer or false + if(answer == 'bad') { + var reponses4Bad = [ + "J'en suis navré Monsieur. Que puis-je faire pour vous remonter le moral", + "Ah mince, que puis-je faire pour vous ", + "Je suis désolé pour vous, que puis-je faire pour vous ?", + "Ah mince, n'hésitez pas à soliciter mon aide", + "ça change de d'habitude Monsieur, que puis-je faire pour vous remonter le moral ?" + ]; + + var choix = Math.floor(Math.random() * reponses4Bad.length); + var answer4Bad = reponses4Bad[choix]; + + SARAH.speak(answer4Bad); + } else { + var reponses4Good = [ + "Super, que puis-je faire pour vous ?", + "Génial, que puis-je faire pour vous ?", + "Je suis content pour vous Monsieur", + "Super, n'hésitez pas à soliciter mon aide", + "Ah ! Je suis content pour vous Monsieur" + ]; + + var choix = Math.floor(Math.random() * reponses4Good.length); + var answer4Good = reponses4Good[choix]; + + SARAH.speak(answer4Good); + } + end(); + }); + break; + + //Réponds au merci + case "merci": + var Txt = new Array; + Txt[0] = "Mais derien Monsieur"; + Txt[1] = "Derien"; + Txt[2] = "Sans moi vous seriez perdu Monsieur !"; + Txt[3] = "Pas de problème"; + Txt[4] = "Pas de soucis Monsieur"; + Txt[5] = "C'est un honneur."; + Txt[6] = "Ah! J'ai failli attendre monsieur"; + break; + + //Dis bonjour à Cynthia + case "dis_bonjour_a_cynthia": + var Txt = new Array; + Txt[0] = "Bonjour cintia."; + Txt[1] = "Bien le bonjour Madame"; + Txt[2] = "Bonjour Madame"; + Txt[3] = "Bonjour cintia, c'est un honneur"; + Txt[4] = "Bonjour Madame, c'est un honneur"; + break; + + //Dis bonjour à Patrick + case "dis_bonjour_a_patrick": + var Txt = new Array; + Txt[0] = "Bonjour Patrick."; + Txt[1] = "Bien le bonjour Monsieur"; + Txt[2] = "Bonjour Monsieur"; + Txt[3] = "Bonjour Patrick, c'est un honneur"; + Txt[4] = "Bonjour Monsieur, c'est un honneur"; + break; + + //Bonjour + case "bonjour": + var Txt = new Array; + Txt[0] = "Bonjour Monsieur."; + Txt[1] = "Bien le bonjour Monsieur"; + break; + } + + + + var child = exec(process, + function(error, stdout, stderr) { + console.log(process); + }); + Choix = Math.floor(Math.random() * Txt.length); + callback({ + 'tts': Txt[Choix] + }); + +} \ No newline at end of file diff --git a/jarvis.prop b/jarvis.prop new file mode 100644 index 0000000..de60333 --- /dev/null +++ b/jarvis.prop @@ -0,0 +1,9 @@ +{ + "modules": { + "jarvis": { + "description": "Jarvis inspiré des films Iron Man.", + "autheur": "Mathieu BROILLET", + "version": "1.0" + } + } +} \ No newline at end of file diff --git a/jarvis.xml b/jarvis.xml new file mode 100644 index 0000000..78d7e4a --- /dev/null +++ b/jarvis.xml @@ -0,0 +1,228 @@ + + + + Jarvis tu es la? + out.action=new Object(); + + Jarvis + + + + tu es laout.action.val="la" + + + + + il est quelle heureout.action.val="time" + c'est quel heureout.action.val="time" + quelle heure est ilout.action.val="time" + peux tu me donner l'heureout.action.val="time" + tu peux me donner l'heureout.action.val="time" + + Quelle date sommes-nousout.action.val="date" + Quel jour sommes-nousout.action.val="date" + Quelle est la dateout.action.val="date" + Quelle est la date d'aujourd'huiout.action.val="date" + Quelle date aujourd'huiout.action.val="date" + On est quandout.action.val="date" + On est quel jourout.action.val="date" + Donne moi la dateout.action.val="date" + Donne moi la date d'aujourd'huiout.action.val="date" + Je ne sais plus quel jour on estout.action.val="date" + Je ne sais plus quelle date on estout.action.val="date" + + + + + + affiche ton interfaceout.action.val="program_run_jarvis" + active ton interfaceout.action.val="program_run_jarvis" + lance ton interfaceout.action.val="program_run_jarvis" + ouvre ton interfaceout.action.val="program_run_jarvis" + masque ton interfaceout.action.val="program_close_jarvis" + ferme ton interfaceout.action.val="program_close_jarvis" + désactive ton interfaceout.action.val="program_close_jarvis" + + affiche le bureauout.action.val="action_minimize" + va sur le bureauout.action.val="action_minimize" + restoreout.action.val="action_restore" + réaffiche les fenêtresout.action.val="action_restore" + affiche les fenetresout.action.val="action_restore" + remet les fenetresout.action.val="action_restore" + + + + + actualiseout.action.val="action_f5" + raffraichisout.action.val="action_f5" + met a jourout.action.val="action_f5" + relanceout.action.val="action_f5" + + lance ta page de confout.action.val="url_home" + affiche le panelout.action.val="url_home" + ouvre le panelout.action.val="url_home" + fait voir ton panelout.action.val="url_home" + + affiche le storeout.action.val="url_store" + fait voir le storeout.action.val="url_store" + + affiche la boxeout.action.val="url_box" + fait voir la boxeout.action.val="url_box" + + ferme l'ongletout.action.val="action_f4" + + va sur fèillsbouqueout.action.val="url_facebook" + va sur youtubeout.action.val="url_youtube" + + + + + + affiche les pluguineout.action.val="explorer_plugins" + fait voir les pluguineout.action.val="explorer_plugins" + affiche tes pluguineoutaction.val="explorer_plugins" + fait voir tes pluguineout.action.val="explorer_plugins" + + fait voir ton dossierout.action.val="explorer_jarvis" + affiche ton dossierout.action.val="explorer_jarvis" + + affiche mes imagesout.action.val="explorer_images" + fait voir mes imagesout.action.val="explorer_images" + affiche les imagesout.action.val="explorer_images" + fait voir imagesout.action.val="explorer_images" + fais voir les imagesout.action.val="explorer_images" + fais voir mes imagesout.action.val="explorer_images" + + affiche mes documentsout.action.val="explorer_documents" + affiche les documentsout.action.val="explorer_documents" + + affiche les téléchargementsout.action.val="explorer_dl" + affiche les torrentout.action.val="explorer_dl" + fais voir les torraintout.action.val="explorer_dl" + + affiche les diskout.action.val="explorer_disks" + fais voir les diskout.action.val="explorer_disks" + + + + + lance failleurfoxout.action.val="program_run_firefox" + ouvre failleurfoxout.action.val="program_run_firefox" + ferme failleurfoxout.action.val="program_close_firefox" + + lance sublimetexteout.action.val="program_run_sublimetext" + lance sublime texteout.action.val="program_run_sublimetext" + lance sublimtextout.action.val="program_run_sublimetext" + lance l'editeurout.action.val="program_run_sublimetext" + ferme sublime textout.action.val="program_close_sublimetext" + ferme sublim textout.action.val="program_close_sublimetext" + ferme l'editeurout.action.val="program_close_sublimetext" + + + lance discordeout.action.val="program_run_discord" + ouvre discordeout.action.val="program_run_discord" + ouvre discordeout.action.val="program_run_discord" + ferme discordeout.action.val="program_close_discord" + ferme discordout.action.val="program_close_discord" + + + + + + précédentout.action.val="action_precedent" + suivantout.action.val="action_next" + validerout.action.val="action_enter" + entrerout.action.val="action_enter" + sauvegardeout.action.val="action_save" + fenêtre suivanteout.action.val="action_tab" + ferme la fenêtreout.action.val="action_close_window" + + ferme toutout.action.val="system_quit_all" + + + 1 plus 1out.action.val="action_enter" + + + + + éteind le PCout.action.val="pc_shutdown" + éteind l'PCout.action.val="pc_shutdown" + éteind l'ordinateurout.action.val="pc_shutdown" + arrête le PCout.action.val="pc_shutdown" + arrête l'ordinateurout.action.val="pc_shutdown" + + redémarre le PCout.action.val="pc_restart" + redémarre l'ordinateurout.action.val="pc_restart" + + coupe le sonout.action.val="pc_mute" + silence radioout.action.val="pc_mute" + désactive le sonout.action.val="pc_mute" + muetout.action.val="pc_mute" + tais toiout.action.val="pc_mute" + + remet le sonout.action.val="pc_unmute" + ré-active le sonout.action.val="pc_unmute" + + cache le bureauout.action.val="pc_desktop_hide" + masque le bureauout.action.val="pc_desktop_hide" + désactive le bureauout.action.val="pc_desktop_hide" + + remet le bureauout.action.val="pc_desktop_show" + ré-active le bureauout.action.val="pc_desktop_show" + active le bureauout.action.val="pc_desktop_show" + + mets le pc en veilleout.action.val="pc_veille" + mets l'ordinateur en veilleout.action.val="pc_veille" + active le mode veilleout.action.val="pc_veille" + + + + + + relance le systaimeout.action.val="jarvis_reboot"out.action._attributes.tts = "je relance mon système" + relance ton systaimeout.action.val="jarvis_reboot"out.action._attributes.tts = "je relance mon système" + redémar le systaimeout.action.val="jarvis_reboot"out.action._attributes.tts = "je relance mon système" + redémar ton systaimeout.action.val="jarvis_reboot"out.action._attributes.tts = "je relance mon système" + + + + + + + réveilles toiout.action.val="action_enter" + reviensout.action.val="action_enter" + éteinds l'écranout.action.val="system_screen_off" + allume l'écranout.action.val="system_screen_on" + ouvre le Dévédéout.action.val="system_dvd_on" + ferme le Dévédéout.action.val="system_dvd_off" + ouvre le lecteurout.action.val="system_dvd_on" + ferme le lecteurout.action.val="system_dvd_off" + + + + + + ça vaout.action.val="humeur" + comment tu vasout.action.val="humeur" + comment vas tuout.action.val="humeur" + tu va bienout.action.val="humeur" + comment ça vaout.action.val="humeur" + la formeout.action.val="humeur" + + + dis bonjour a cynthiaout.action.val="dis_bonjour_a_cynthia" + dis bonjour a patrickout.action.val="dis_bonjour_a_patrick" + + + + + + + out.action._attributes.uri="http://127.0.0.1:8080/sarah/jarvis"; + + \ No newline at end of file diff --git a/nircmd/nircmd.exe b/nircmd/nircmd.exe new file mode 100644 index 0000000..1d0c765 Binary files /dev/null and b/nircmd/nircmd.exe differ diff --git a/nircmd/nircmdc.exe b/nircmd/nircmdc.exe new file mode 100644 index 0000000..a6ad051 Binary files /dev/null and b/nircmd/nircmdc.exe differ diff --git a/url/Discord.lnk b/url/Discord.lnk new file mode 100644 index 0000000..ad8b3e8 Binary files /dev/null and b/url/Discord.lnk differ diff --git a/url/box.url b/url/box.url new file mode 100644 index 0000000..36829e2 --- /dev/null +++ b/url/box.url @@ -0,0 +1,6 @@ +[InternetShortcut] +URL=http://192.168.1.1/ +IDList= +HotKey=0 +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,2 diff --git a/url/facebook.url b/url/facebook.url new file mode 100644 index 0000000..3ab4a7e --- /dev/null +++ b/url/facebook.url @@ -0,0 +1,6 @@ +[InternetShortcut] +URL=https://www.facebook.com/ +IDList= +HotKey=0 +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,11 diff --git a/url/home.url b/url/home.url new file mode 100644 index 0000000..71b6a1e --- /dev/null +++ b/url/home.url @@ -0,0 +1,6 @@ +[InternetShortcut] +URL=http://127.0.0.1:8080/ +IDList= +HotKey=0 +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,2 diff --git a/url/store.url b/url/store.url new file mode 100644 index 0000000..1c24cc0 --- /dev/null +++ b/url/store.url @@ -0,0 +1,6 @@ +[InternetShortcut] +URL=http://127.0.0.1:8080/portal/store +IDList= +HotKey=0 +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,2 diff --git a/url/youtube.url b/url/youtube.url new file mode 100644 index 0000000..f9222f7 --- /dev/null +++ b/url/youtube.url @@ -0,0 +1,6 @@ +[InternetShortcut] +URL=https://www.youtube.com/ +IDList= +HotKey=0 +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,11