Bimbiller
Mar 19th, 2023
155
0
Never
This is comment for paste VLC-M-PLAYER.ahk
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* INFO
  2. VLC VIDEOS PLAYER
  3. Written by: Najeeb Shah Khan (najeebshahkhan@gmail.com)
  4. Last Modified: 3-20-2023
  5. */
  6. #warn
  7. #NoEnv
  8. #SingleInstance, Force
  9. Process, Priority, , A
  10. SendMode, Input
  11. SetBatchLines, -1
  12. ;#NoTrayIcon
  13. SetWorkingDir %A_ScriptDir%
  14. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  15. FileInstall , VLC-M-PLAYER.ahk, %A_ScriptDir%\VLC-M-PLAYER.ahk, 1
  16. FileSetAttrib +HS, %A_ScriptDir%\VLC-M-PLAYER.ahk, 2
  17. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  18. Filename1=NAJEEB SHAH KHAN VIDEO PLAYER
  19. vlc1 =%A_programfiles%\VideoLAN\VLC\vlc.exe
  20.  
  21. ;----------- FOLDERS -------------------
  22. tmr1:=""
  23. tmr2:=""
  24. tmr3:=""
  25. tmr4:=""
  26. tmr5:=""
  27. tmr6:=""
  28. tmr7:=""
  29. tmr8:=""
  30. tmr9:=""
  31. tmr10:=""
  32. tmr11:=""
  33. ;tmr12:=""
  34. tmr1=D:\VIDEOS\MP3
  35. tmr2=D:\VIDEOS\FOOD
  36. tmr3=D:\VIDEOS\SONGS
  37. tmr4=D:\VIDEOS\MOVEIS
  38. tmr5=D:\VIDEOS\OTHER
  39. tmr6=D:\VIDEOS\TUTORIAL\ANDROID-HACKING
  40. tmr7=D:\VIDEOS\TUTORIAL\CMD-COURSES
  41. tmr8=D:\VIDEOS\TUTORIAL\FINDANDRUN
  42. tmr9=D:\VIDEOS\TUTORIAL\HTA
  43. tmr10=D:\VIDEOS\TUTORIAL\OTHER
  44. tmr11=D:\VIDEOS\TUTORIAL\POWERSHELL-COURSES
  45. ;tmr12=
  46. ;---------------------------------------
  47.  
  48. ;-- all
  49. EXTX =flv,vob,mp4,mpg,wmv,avi,webm,m4a,mp3,wma,ogg ;-- << videos +audio
  50. ;-- only videos
  51. EXTvid=flv,vob,mp4,mpg,wmv,avi,webm ;- << videos
  52.  
  53.  
  54. file1:= a_scriptdir . "\black.htm"
  55. ifnotexist,%file1%
  56. {
  57. e4x=
  58. (Ltrim`r`n % `
  59. <div style="margin:0px;padding:0px;width:1024px;height:700px;border:1px solid black;background-color: #000000;">
  60. </div>
  61. )
  62. fileappend,%e4x%,%file1%
  63. }
  64.  
  65.  
  66. Gui,2:default
  67. Gui,2: Color, Black
  68. Gui,2:Color,ControlColor, Black
  69. ;Gui,2:Font, S10 CDefault , FixedSys
  70. Gui,2:Font, S12 ,Lucida Console
  71.  
  72. Gui,2:Add,ListView,backgroundBlack cGray x0 y0 w305 h600 +hscroll altsubmit vA1 gA2 checked, I|Name|FullPath
  73. LV_ModifyCol(1,60)
  74. LV_ModifyCol(2,250)
  75. LV_ModifyCol(3,0)
  76. LV_ModifyCol(1,"integer")
  77.  
  78. ;xxa=WMPlayer.ocx
  79. ;xxa=Shell.Explorer ;- IExplorer
  80. xxb=VideoLAN.VLCPlugin.2 ;- music , video , foto
  81. ;xxa=Mozilla.Browser ;- firefox
  82. wb1:=""
  83. ifexist,%vlc1%
  84. Gui,2:Add,ActiveX, x320 y11 w690 h600 vVlcx,%xxb%
  85. else
  86. {
  87. Gui,2:Add,ActiveX, x320 y11 w690 h600 vWB1 ,%xxa%
  88. WB1.Silent := false ;True
  89. ComObjError(false)
  90. }
  91. Gui,2: Add, GroupBox, x310 y0 w710 h620,
  92.  
  93.  
  94. Gui,2:add,Edit , x10 y620 h27 w280 cYellow vSearch1 gSearch1,
  95. Gui,2:Font, S11 , Lucida Console
  96. Gui,2: Add,Text , x5 y660 w600 h25 vI4 cYellow
  97. Gui,2: Show , x0 y0 w1024 h700,%filename1%
  98. gosub,fillx
  99. GuiControl,2:Focus,search1
  100. return
  101. ;-----------------------------------------------------
  102.  
  103. 2Guiclose:
  104. xx=vlc.exe
  105. process,exist,%xx%
  106. pid:=errorlevel
  107. if pid<>0
  108. Process,close,%Pid%
  109. exitapp
  110. ;-----
  111.  
  112. ;---------------- LISTVIEW ----------------------------
  113. A2:
  114. Gui,2:default
  115. Gui,2:ListView,A1
  116. Gui,2:submit,nohide
  117.  
  118. RN:=LV_GetNext("C") ;2 selected checked
  119. RF:=LV_GetNext("F") ;2 selected focused
  120. GC:=LV_GetCount() ;4 total
  121.  
  122. if A_GuiEvent = Normal
  123. {
  124. if RN<>0
  125. {
  126. LV_GetText(C3,A_EventInfo,3)
  127. GuiControl,2:Text,I4,%c3%
  128. ;SplitPath, C3, name, dir, ext, name_no_ext, drive
  129. stringreplace,c3,c3,\,/,all
  130. F3:="file:///" . c3
  131. ifexist,%vlc1%
  132. {
  133. vlcx.playlist.stop()
  134. vlcx.playlist.items.clear()
  135. vlcx.playlist.add(F3,"","""""")
  136. vlcx.playlist.next()
  137. }
  138. else
  139. WB1.Navigate(C3)
  140. }
  141. }
  142. return
  143. ;---------------------------------------------
  144.  
  145.  
  146.  
  147. ;---------- Fill-Listview ----------
  148. fillx:
  149. Gui,2:submit,nohide
  150. Gui,2:ListView,A1
  151. I=0
  152. ;GuiControl,2: -Redraw,A1
  153. LV_Delete()
  154. e4x=
  155.  
  156. ifexist,%tmr1%
  157. {
  158. tmrx=%tmr1%
  159. gosub,loopx
  160. }
  161. ifexist,%tmr2%
  162. {
  163. tmrx=%tmr2%
  164. gosub,loopx
  165. }
  166. ifexist,%tmr3%
  167. {
  168. tmrx=%tmr3%
  169. gosub,loopx
  170. }
  171. ifexist,%tmr4%
  172. {
  173. tmrx=%tmr4%
  174. gosub,loopx
  175. }
  176. ifexist,%tmr5%
  177. {
  178. tmrx=%tmr5%
  179. gosub,loopx
  180. }
  181. ifexist,%tmr6%
  182. {
  183. tmrx=%tmr6%
  184. gosub,loopx
  185. }
  186. ifexist,%tmr7%
  187. {
  188. tmrx=%tmr7%
  189. gosub,loopx
  190. }
  191. ifexist,%tmr8%
  192. {
  193. tmrx=%tmr8%
  194. gosub,loopx
  195. }
  196. ifexist,%tmr9%
  197. {
  198. tmrx=%tmr9%
  199. gosub,loopx
  200. }
  201. ifexist,%tmr10%
  202. {
  203. tmrx=%tmr10%
  204. gosub,loopx
  205. }
  206. ifexist,%tmr11%
  207. {
  208. tmrx=%tmr11%
  209. gosub,loopx
  210. }
  211. ;ifexist,%tmr12%
  212. ; {
  213. ; tmrx=%tmr12%
  214. ;gosub,loopx
  215. ; }
  216. ;GuiControl,2: +Redraw,A1
  217. LV_ModifyCol(2, "Sort")
  218. LV_Modify(LV_GetCount(), "Vis") ;scrolls down
  219. return
  220.  
  221.  
  222. loopx:
  223. {
  224. Loop, %tmrx%\*.*, 0, 1
  225. {
  226. If A_LoopFileExt in %Extx%
  227. {
  228. I++
  229. O=%A_LoopFileName%
  230. T=%A_LoopFileFullPath%
  231. LV_Add("Check" 0, I, O, T)
  232. if A_LoopFileExt in %extvid%
  233. LV_Modify(I,"Check")
  234. e4x .= I . ";" . O . ";" . T . "`r`n"
  235. }
  236. }
  237. }
  238. return
  239. ;=============================================================
  240.  
  241.  
  242.  
  243. ;------------------------------------------------
  244. SEARCH1:
  245. Gui,2:submit,nohide
  246. Gui, 2:Default
  247. Gui, 2:ListView, A1
  248. LV_DELETE()
  249. if search1=
  250. goto,Fillx
  251. i=0
  252. Loop,parse,e4x,`n,`r
  253. {
  254. x:=a_loopfield
  255. if x=
  256. continue
  257. stringsplit,c,x,`;
  258. SplitPath, c2, name, dir, ext, name_no_ext, drive
  259. IfInString,C2, %search1%
  260. {
  261. i++
  262. if Ext in %extvid%
  263. LV_Add("Check" 1, I, C2, C3)
  264. else
  265. LV_Add("Check" 0, I, C2, C3)
  266. }
  267. }
  268. LV_Modify(LV_GetCount(), "Vis") ;scrolls down
  269. if (search1="")
  270. goto,Fillx
  271. return
  272. ;=-=-=-=-=-=- END Script VideoPlay ActiveX-=-=-=-=-=-=-=-=-
  273. #S::Suspend
  274. #P::Pause
  275. ESC::ExitApp
Add Comment
Please, Sign In to add comment