#MaxThreads 1 ; ------------------------------------------------------------ ; Ajout de l'image de fond ; ------------------------------------------------------------ Gui, Add, Picture, x0 y0, fond.jpg ; ------------------------------------------------------------ ; Définition du nombre de vidéos ; ------------------------------------------------------------ NbVideoParColonne := 6 ; ------------------------------------------------------------ ; Prévision en attente d'une solution plus générique ; ------------------------------------------------------------ NbVideo := 10 NbColonne := 2 ; ------------------------------------------------------------ ; Initialisation de variables ; ------------------------------------------------------------ activeX := 1 activeY := 1 curseurx := 10 curseury := 220 videoon :=0 ; ------------------------------------------------------------ ; Création du curseur ; ------------------------------------------------------------ Gui, Add, Picture, x%curseurx% y%curseury% vmovingPicture +BackgroundTrans, %A_WorkingDir%\curseur.png ; ------------------------------------------------------------ ; Création des vidéos et de leur légende ; ------------------------------------------------------------ ; Première Colonne de 5 lignes Gui, Add, Picture, x50 y200 +BackgroundTrans w90 h90, video1.png Gui, Font, s14, Verdana Gui, Add, Text, x160 y210 CBlack +BackgroundTrans, Surtitre A Gui, Font, s12, Verdana Gui, Add, Text, x165 y240 c666666 +BackgroundTrans, SousTitre A Gui, Font, s12, Verdana Gui, Add, Text, x165 y260 c666666 +BackgroundTrans, SousSoustitre A Gui, Add, Picture, x50 y350 +BackgroundTrans w90 h90, video2.png Gui, Font, s14, Verdana Gui, Add, Text, x160 y360 CBlack +BackgroundTrans, Surtitre B Gui, Font, s12, Verdana Gui, Add, Text, x165 y390 c444444 +BackgroundTrans, SousTitre Gui, Font, s11, Verdana Gui, Add, Text, x165 y410 c666666 +BackgroundTrans, SousSoustitre Gui, Add, Picture, x50 y500 +BackgroundTrans w90 h90, video3.png Gui, Font, s14, Verdana Gui, Add, Text, x160 y510 CBlack +BackgroundTrans, Surtitre C Gui, Font, s12, Verdana Gui, Add, Text, x165 y540 c444444 +BackgroundTrans, SousTitre Gui, Font, s12, Verdana Gui, Add, Text, x165 y560 c666666 +BackgroundTrans, SousSoustitre Gui, Add, Picture, x50 y650 +BackgroundTrans w90 h90, video4.png Gui, Font, s14, Verdana Gui, Add, Text, x160 y660 CBlack +BackgroundTrans, Surtitre D Gui, Font, s12, Verdana Gui, Add, Text, x165 y690 c444444 +BackgroundTrans, SousTitre Gui, Font, s12, Verdana Gui, Add, Text, x165 y710 c666666 +BackgroundTrans, SousSoustitre Gui, Add, Picture, x50 y800 +BackgroundTrans w90 h90, video5.png Gui, Font, s14, Verdana Gui, Add, Text, x160 y810 CBlack +BackgroundTrans, Surtitre E Gui, Font, s12, Verdana Gui, Add, Text, x165 y840 c444444 +BackgroundTrans, SousTitre Gui, Font, s12, Verdana Gui, Add, Text, x165 y860 c666666 +BackgroundTrans, SousSoustitre ; Seconde colonne de 5 lignes Gui, Add, Picture, x650 y200 +BackgroundTrans w90 h90, video6.png Gui, Font, s14, Verdana Gui, Add, Text, x760 y210 CBlack +BackgroundTrans, Surtitre F Gui, Font, s12, Verdana Gui, Add, Text, x765 y240 c444444 +BackgroundTrans, SousTitre Gui, Font, s12, Verdana Gui, Add, Text, x765 y260 c666666 +BackgroundTrans, SousSoustitre Gui, Add, Picture, x650 y350 +BackgroundTrans w90 h90, video7.png Gui, Font, s14, Verdana Gui, Add, Text, x760 y360 CBlack +BackgroundTrans, Surtitre G Gui, Font, s12, Verdana Gui, Add, Text, x765 y390 c444444 +BackgroundTrans, SousTitre Gui, Font, s12, Verdana Gui, Add, Text, x765 y410 c666666 +BackgroundTrans, SousSoustitre Gui, Add, Picture, x650 y500 +BackgroundTrans w90 h90, video8.png Gui, Font, s14, Verdana Gui, Add, Text, x760 y510 CBlack +BackgroundTrans, Surtitre H Gui, Font, s12, Verdana Gui, Add, Text, x765 y540 c444444 +BackgroundTrans, SousTitre Gui, Font, s12, Verdana Gui, Add, Text, x765 y560 c666666 +BackgroundTrans, SousSoustitre Gui, Add, Picture, x650 y650 +BackgroundTrans w90 h90, video9.png Gui, Font, s14, Verdana Gui, Add, Text, x760 y660 CBlack +BackgroundTrans, Surtitre I Gui, Font, s12, Verdana Gui, Add, Text, x765 y690 c444444 +BackgroundTrans, SousTitre Gui, Font, s12, Verdana Gui, Add, Text, x765 y710 c666666 +BackgroundTrans, SousSoustitre Gui, Add, Picture, x650 y800 +BackgroundTrans w90 h90, video10.png Gui, Font, s14, Verdana Gui, Add, Text, x760 y810 CBlack +BackgroundTrans, Surtitre J Gui, Font, s12, Verdana Gui, Add, Text, x765 y840 c444444 +BackgroundTrans, SousTitre Gui, Font, s12, Verdana Gui, Add, Text, x765 y860 c666666 +BackgroundTrans, SousSoustitre ; ------------------------------------------------------------ ; Affichage de la fenêtre ; ------------------------------------------------------------ Gui, Show, Maximize , Borne Interactive Gui, -Caption return ; ------------------------------------------------------------ ; Action sur fermeture de la fenêtre ou de la touche Esc ; ------------------------------------------------------------ GuiClose: ExitApp return ESC:: ExitApp return ; ------------------------------------------------------------ ; Action sur touche b : video précédente ; ------------------------------------------------------------ ~b:: if (activeY =1) { activeY := nbVideo/2 if (activeX=2) { activeX := 1 } else { activeX := 2 } } else { activeY := activeY-1 } curseury := 220 + 150*(activeY-1) curseurx := 10 + 600*(activeX-1) GuiControl Move, movingPicture, x%curseurx% y%curseury% return ; ------------------------------------------------------------ ; Action sur touche n : video suivante ; ------------------------------------------------------------ ~n:: if (activeY =nbVideo/2) { activeY := 1 if (activeX=1) { activeX := 2 } else { activeX := 1 } } else { activeY := activeY+1 } curseury := 220 + 150*(activeY-1) curseurx := 10 + 600*(activeX-1) GuiControl Move, movingPicture, x%curseurx% y%curseury% return ; ------------------------------------------------------------ ; Action sur touche v : visionnage video ; Note : VLC doit être programmer pour que la touche n quitte le programme ; ------------------------------------------------------------ ~v:: if (videoon = 0) { videoon :=1 goto LancementVideo } return LancementVideo: active := Ceil(activeY+5*(activeX-1)) sleep, 100 if (winexist("video")) { winactivate, video } nomfichier = %A_WorkingDir%\video%active%.mp4 RunWait, vlc.exe --one-instance --playlist-enqueue --fullscreen --no-qt-fs-controller --play-and-exit --no-video-title "%nomfichier%" videoon:=0 return