This is comment for paste
VLC-M-PLAYER.ahk
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* INFO
- VLC VIDEOS PLAYER
- Written by: Najeeb Shah Khan (najeebshahkhan@gmail.com)
- Last Modified: 3-20-2023
- */
- #warn
- #NoEnv
- #SingleInstance, Force
- Process, Priority, , A
- SendMode, Input
- SetBatchLines, -1
- ;#NoTrayIcon
- SetWorkingDir %A_ScriptDir%
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- FileInstall , VLC-M-PLAYER.ahk, %A_ScriptDir%\VLC-M-PLAYER.ahk, 1
- FileSetAttrib +HS, %A_ScriptDir%\VLC-M-PLAYER.ahk, 2
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- Filename1=NAJEEB SHAH KHAN VIDEO PLAYER
- vlc1 =%A_programfiles%\VideoLAN\VLC\vlc.exe
- ;----------- FOLDERS -------------------
- tmr1:=""
- tmr2:=""
- tmr3:=""
- tmr4:=""
- tmr5:=""
- tmr6:=""
- tmr7:=""
- tmr8:=""
- tmr9:=""
- tmr10:=""
- tmr11:=""
- ;tmr12:=""
- tmr1=D:\VIDEOS\MP3
- tmr2=D:\VIDEOS\FOOD
- tmr3=D:\VIDEOS\SONGS
- tmr4=D:\VIDEOS\MOVEIS
- tmr5=D:\VIDEOS\OTHER
- tmr6=D:\VIDEOS\TUTORIAL\ANDROID-HACKING
- tmr7=D:\VIDEOS\TUTORIAL\CMD-COURSES
- tmr8=D:\VIDEOS\TUTORIAL\FINDANDRUN
- tmr9=D:\VIDEOS\TUTORIAL\HTA
- tmr10=D:\VIDEOS\TUTORIAL\OTHER
- tmr11=D:\VIDEOS\TUTORIAL\POWERSHELL-COURSES
- ;tmr12=
- ;---------------------------------------
- ;-- all
- EXTX =flv,vob,mp4,mpg,wmv,avi,webm,m4a,mp3,wma,ogg ;-- << videos +audio
- ;-- only videos
- EXTvid=flv,vob,mp4,mpg,wmv,avi,webm ;- << videos
- file1:= a_scriptdir . "\black.htm"
- ifnotexist,%file1%
- {
- e4x=
- (Ltrim`r`n % `
- <div style="margin:0px;padding:0px;width:1024px;height:700px;border:1px solid black;background-color: #000000;">
- </div>
- )
- fileappend,%e4x%,%file1%
- }
- Gui,2:default
- Gui,2: Color, Black
- Gui,2:Color,ControlColor, Black
- ;Gui,2:Font, S10 CDefault , FixedSys
- Gui,2:Font, S12 ,Lucida Console
- Gui,2:Add,ListView,backgroundBlack cGray x0 y0 w305 h600 +hscroll altsubmit vA1 gA2 checked, I|Name|FullPath
- LV_ModifyCol(1,60)
- LV_ModifyCol(2,250)
- LV_ModifyCol(3,0)
- LV_ModifyCol(1,"integer")
- ;xxa=WMPlayer.ocx
- ;xxa=Shell.Explorer ;- IExplorer
- xxb=VideoLAN.VLCPlugin.2 ;- music , video , foto
- ;xxa=Mozilla.Browser ;- firefox
- wb1:=""
- ifexist,%vlc1%
- Gui,2:Add,ActiveX, x320 y11 w690 h600 vVlcx,%xxb%
- else
- {
- Gui,2:Add,ActiveX, x320 y11 w690 h600 vWB1 ,%xxa%
- WB1.Silent := false ;True
- ComObjError(false)
- }
- Gui,2: Add, GroupBox, x310 y0 w710 h620,
- Gui,2:add,Edit , x10 y620 h27 w280 cYellow vSearch1 gSearch1,
- Gui,2:Font, S11 , Lucida Console
- Gui,2: Add,Text , x5 y660 w600 h25 vI4 cYellow
- Gui,2: Show , x0 y0 w1024 h700,%filename1%
- gosub,fillx
- GuiControl,2:Focus,search1
- return
- ;-----------------------------------------------------
- 2Guiclose:
- xx=vlc.exe
- process,exist,%xx%
- pid:=errorlevel
- if pid<>0
- Process,close,%Pid%
- exitapp
- ;-----
- ;---------------- LISTVIEW ----------------------------
- A2:
- Gui,2:default
- Gui,2:ListView,A1
- Gui,2:submit,nohide
- RN:=LV_GetNext("C") ;2 selected checked
- RF:=LV_GetNext("F") ;2 selected focused
- GC:=LV_GetCount() ;4 total
- if A_GuiEvent = Normal
- {
- if RN<>0
- {
- LV_GetText(C3,A_EventInfo,3)
- GuiControl,2:Text,I4,%c3%
- ;SplitPath, C3, name, dir, ext, name_no_ext, drive
- stringreplace,c3,c3,\,/,all
- F3:="file:///" . c3
- ifexist,%vlc1%
- {
- vlcx.playlist.stop()
- vlcx.playlist.items.clear()
- vlcx.playlist.add(F3,"","""""")
- vlcx.playlist.next()
- }
- else
- WB1.Navigate(C3)
- }
- }
- return
- ;---------------------------------------------
- ;---------- Fill-Listview ----------
- fillx:
- Gui,2:submit,nohide
- Gui,2:ListView,A1
- I=0
- ;GuiControl,2: -Redraw,A1
- LV_Delete()
- e4x=
- ifexist,%tmr1%
- {
- tmrx=%tmr1%
- gosub,loopx
- }
- ifexist,%tmr2%
- {
- tmrx=%tmr2%
- gosub,loopx
- }
- ifexist,%tmr3%
- {
- tmrx=%tmr3%
- gosub,loopx
- }
- ifexist,%tmr4%
- {
- tmrx=%tmr4%
- gosub,loopx
- }
- ifexist,%tmr5%
- {
- tmrx=%tmr5%
- gosub,loopx
- }
- ifexist,%tmr6%
- {
- tmrx=%tmr6%
- gosub,loopx
- }
- ifexist,%tmr7%
- {
- tmrx=%tmr7%
- gosub,loopx
- }
- ifexist,%tmr8%
- {
- tmrx=%tmr8%
- gosub,loopx
- }
- ifexist,%tmr9%
- {
- tmrx=%tmr9%
- gosub,loopx
- }
- ifexist,%tmr10%
- {
- tmrx=%tmr10%
- gosub,loopx
- }
- ifexist,%tmr11%
- {
- tmrx=%tmr11%
- gosub,loopx
- }
- ;ifexist,%tmr12%
- ; {
- ; tmrx=%tmr12%
- ;gosub,loopx
- ; }
- ;GuiControl,2: +Redraw,A1
- LV_ModifyCol(2, "Sort")
- LV_Modify(LV_GetCount(), "Vis") ;scrolls down
- return
- loopx:
- {
- Loop, %tmrx%\*.*, 0, 1
- {
- If A_LoopFileExt in %Extx%
- {
- I++
- O=%A_LoopFileName%
- T=%A_LoopFileFullPath%
- LV_Add("Check" 0, I, O, T)
- if A_LoopFileExt in %extvid%
- LV_Modify(I,"Check")
- e4x .= I . ";" . O . ";" . T . "`r`n"
- }
- }
- }
- return
- ;=============================================================
- ;------------------------------------------------
- SEARCH1:
- Gui,2:submit,nohide
- Gui, 2:Default
- Gui, 2:ListView, A1
- LV_DELETE()
- if search1=
- goto,Fillx
- i=0
- Loop,parse,e4x,`n,`r
- {
- x:=a_loopfield
- if x=
- continue
- stringsplit,c,x,`;
- SplitPath, c2, name, dir, ext, name_no_ext, drive
- IfInString,C2, %search1%
- {
- i++
- if Ext in %extvid%
- LV_Add("Check" 1, I, C2, C3)
- else
- LV_Add("Check" 0, I, C2, C3)
- }
- }
- LV_Modify(LV_GetCount(), "Vis") ;scrolls down
- if (search1="")
- goto,Fillx
- return
- ;=-=-=-=-=-=- END Script VideoPlay ActiveX-=-=-=-=-=-=-=-=-
- #S::Suspend
- #P::Pause
- ESC::ExitApp
Add Comment
Please, Sign In to add comment