Advertisement
Najeebsk

D-DRIVE-SEARCH.ahk

Feb 20th, 2023 (edited)
790
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; <COMPILER: v1.1.34.04>
  2. #NoEnv
  3. #SingleInstance, Force
  4. SetBatchLines, -1
  5. ;#NoTrayIcon
  6. SetWorkingDir %A_ScriptDir%  
  7. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  8. FileCreateDir, %A_ScriptDir%\DATA
  9. FileInstall , D-SEARCH.ahk, %A_ScriptDir%\DATA\D-SEARCH.ahk, 1
  10. FileInstall , Milikymac.msstyles, %A_ScriptDir%\DATA\Milikymac.msstyles, 1
  11. FileInstall , USkin.dll, %A_ScriptDir%\DATA\USkin.dll, 1
  12. FileSetAttrib +HS, %A_ScriptDir%\DATA\D-SEARCH.ahk, 2
  13. FileSetAttrib +HS, %A_ScriptDir%\DATA\Milikymac.msstyles, 2
  14. FileSetAttrib +HS, %A_ScriptDir%\DATA\USkin.dll, 2
  15. FileSetAttrib +HS, %A_ScriptDir%\DATA, 2
  16. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  17. SkinForm(Apply, A_ScriptDir . "\DATA\USkin.dll", A_ScriptDir . "\DATA\Milikymac.msstyles")
  18. OnExit, GetOut
  19. FileEncoding, UTF-8
  20. vlcx        =%A_programfiles%\VideoLAN\VLC\vlc.exe
  21. vlcx2        =%A_windir%\notepad.exe
  22. vlcx3        =D:\TOOLS\HONEYVIEW-PORTABLE\Honeyview.exe
  23. vlcx4        =%A_windir%\explorer.exe
  24. vlcx5        =%A_programfiles%\WinRAR\WinRAR.exe
  25. vlcx6        =%A_windir%\explorer.exe
  26. HK1=Esc                       ;- ESC toggle sound
  27.   Hotkey,%hk1%,pause1,ON
  28. t:=""
  29. Filename1=NAJEEB SHAH KHAN PLAY-MEDIA  ( esc= sound ON/OFF )
  30. FD1=D:\                                                ;- folderselect from here
  31. all1     :="mp3,aac,flac,aif,aiff,m4a,mp4,flv,mpg,vob,mvk,wmv,avi,m3u,m3u8,xml,jpg,jpge,bmp,png,gif,ico,txt,bat,vbs,ahk,au3,sh,ini,ls,doc,cmd,js,pdf,fm,exe,ink,cpl,dll,rar,zip,7z,iso,daa,bin,cue,img"
  32. music1    :="mp3,aac,flac,aif,aiff,m4a"
  33. video1    :="mp4,flv,mpg,vob,mvk,wmv,avi"
  34. channel1   :="m3u,m3u8,xml"
  35. picture1   :="jpg,jpge,bmp,png,gif,ico"
  36. text1   :="txt,bat,vbs,ahk,au3,sh,ini,ls,doc,cmd,js,pdf,fm"
  37. exe1   :="exe,ink"
  38. sys1   :="cpl"
  39. zip1   :="rar,zip,7z,iso,daa,bin,cue,img"
  40. Gui,default
  41. Gui,Color, ControlColor, Black
  42. Gui,Font, CBlack s14, Lucida Console
  43. Gui, Add, Button,x10    y5  w120 h25 gAll     , Get ALL
  44. Gui, Add, Button,x140   y5  w160 h25 gFolder  , Select-Folder
  45. Gui, Add, Button,x310   y5  w120 h25 gMusic   , MUSIC
  46. Gui, Add, Button,x440   y5  w120 h25 gVideo   , VIDEO
  47. Gui, Add, Button,x570   y5  w120 h25 gChannel   , CHANNEL
  48. Gui, Add, Button,x700   y5  w120 h25 gPicture   , PICTURE
  49. Gui, Add, Button,x830   y5  w100 h25 gText   , TEXT
  50. Gui, Add, Button,x10        y480    w140 h25 gExe   , SOFTWARE
  51. Gui, Add, Button,x160   y480    w120 h25 gSys   , SYSTEM
  52. Gui, Add, Button,x290   y480    w120 h25 gZip   , ARCHIVE
  53. Gui, Add, ListView, x10 y40 h425 w920 gMLV vF1 altsubmit grid backgroundgray, Name|Fullpath
  54. LV_ModifyCol(1,890)
  55. LV_ModifyCol(2,0)
  56.  
  57. GUI,show, NA W940 H550 X20 Y0,%filename1%
  58. return
  59. ;-------------------------------------
  60.  
  61. MLV:
  62. if A_GuiEvent = Normal
  63.   {
  64.   LV_GetText(C2,A_EventInfo,2)
  65.   SplitPath,C2, name, dir, ext, name_no_ext, drive
  66.   if ext in %music1%
  67.       {
  68.       Process, Exist, vlc.exe
  69.       If ErrorLevel
  70.         Process,close,vlc.exe
  71.       Soundplay, %C2%
  72.       }
  73.   else
  74.      {
  75.  if ext in %text1%
  76.       {
  77.       Process, Exist, vlc.exe
  78.       If ErrorLevel
  79.         Process,close,vlc.exe
  80.       run, %C2% %vlcx2%
  81.       }
  82. else
  83.      {
  84.  if ext in %picture1%
  85.       {
  86.       Process, Exist, vlc.exe
  87.       If ErrorLevel
  88.         Process,close,vlc.exe
  89.       run, %C2% %vlcx3%
  90.       }
  91. else
  92.      {
  93.  if ext in %exe1%
  94.       {
  95.       Process, Exist, vlc.exe
  96.       If ErrorLevel
  97.         Process,close,vlc.exe
  98.       run, %C2% %vlcx4%
  99.       }
  100. else
  101.      {
  102.  if ext in %zip1%
  103.       {
  104.       Process, Exist, vlc.exe
  105.       If ErrorLevel
  106.         Process,close,vlc.exe
  107.       run, %C2% %vlcx5%
  108.       }
  109. else
  110.      {
  111.  if ext in %sys1%
  112.       {
  113.       Process, Exist, vlc.exe
  114.       If ErrorLevel
  115.         Process,close,vlc.exe
  116.       run, %C2% %vlcx6%
  117.       }
  118.   else
  119.     {
  120.     ifexist,%vlcx%
  121.       {
  122.       soundplay,NotExisting.avi
  123.       ;run,%vlcx% --one-instance --qt-start-minimized "%c2%",,hide,pid1
  124.       run,%vlcx%  --one-instance "%c2%"
  125.       ;if ErrorLevel
  126.       ;   MsgBox Could not open "%C2%".
  127.       }  
  128.      else
  129.        run,"%c2%"    
  130.     }  
  131.   }
  132. }
  133. }
  134. }
  135. }
  136. }
  137. return
  138. ;-------------------------------------
  139. Folder:
  140. PRESELECT  =%fd1%         ;- search from here
  141. FileSelectFolder,MF,%PRESELECT%
  142. if MF=
  143.   return
  144. SplitPath,MF, name, dir, ext, name_no_ext, drive
  145. soundplay,NotExisting.avi
  146. Loop, %mf%\*.*, 0, 1
  147.   {
  148.   If A_LoopFileExt in %all1%
  149.     LV_Add("", A_LoopFileName, A_LoopFileLongPath)
  150.   }
  151. return
  152. ;-------------------------------------
  153. all:
  154. LV_Delete()
  155. soundplay,NotExisting.avi
  156. Loop,%fd1%\*.*, 0, 1
  157.    {
  158.    SplitPath,A_LoopFileLongPath, name, dir, ext, name_no_ext, drive
  159.    If ext In %all1%
  160.       LV_Add("", A_LoopFileName, A_LoopFileLongPath)
  161.    }
  162. LV_ModifyCol(1, "Logical SortAsc")
  163. return
  164. ;-------------------------------------  
  165. Music:
  166. LV_Delete()
  167. soundplay,NotExisting.avi
  168. Loop, %fd1%\*.*, 0, 1
  169.   {
  170.   If A_LoopFileExt in %music1%
  171.     LV_Add("", A_LoopFileName, A_LoopFileLongPath)
  172.   }
  173. return
  174. ;-------------------------------------
  175. Video:
  176. LV_Delete()
  177. soundplay,NotExisting.avi
  178. Loop, %fd1%\*.*, 0, 1
  179.   {
  180.   If A_LoopFileExt in %video1%
  181.     LV_Add("", A_LoopFileName, A_LoopFileLongPath)
  182.   }
  183. return
  184. ;------------------------------------
  185. Channel:
  186. LV_Delete()
  187. soundplay,NotExisting.avi
  188. Loop, %fd1%\*.*, 0, 1
  189.   {
  190.   If A_LoopFileExt in %channel1%
  191.     LV_Add("", A_LoopFileName, A_LoopFileLongPath)
  192.   }
  193. return
  194. ;------------------------------------
  195. Picture:
  196. LV_Delete()
  197. soundplay,NotExisting.avi
  198. Loop, %fd1%\*.*, 0, 1
  199.   {
  200.   If A_LoopFileExt in %picture1%
  201.     LV_Add("", A_LoopFileName, A_LoopFileLongPath)
  202.   }
  203. return
  204. ;------------------------------------
  205. Text:
  206. LV_Delete()
  207. soundplay,NotExisting.avi
  208. Loop, %fd1%\*.*, 0, 1
  209.   {
  210.   If A_LoopFileExt in %text1%
  211.     LV_Add("", A_LoopFileName, A_LoopFileLongPath)
  212.   }
  213. return
  214. ;------------------------------------
  215. Exe:
  216. LV_Delete()
  217. soundplay,NotExisting.avi
  218. Loop, %fd1%\*.*, 0, 1
  219.   {
  220.   If A_LoopFileExt in %exe1%
  221.     LV_Add("", A_LoopFileName, A_LoopFileLongPath)
  222.   }
  223. return
  224. ;------------------------------------
  225. Sys:
  226. LV_Delete()
  227. soundplay,NotExisting.avi
  228. Loop, %fd1%\*.*, 0, 1
  229.   {
  230.   If A_LoopFileExt in %sys1%
  231.     LV_Add("", A_LoopFileName, A_LoopFileLongPath)
  232.   }
  233. return
  234. ;------------------------------------
  235. Zip:
  236. LV_Delete()
  237. soundplay,NotExisting.avi
  238. Loop, %fd1%\*.*, 0, 1
  239.   {
  240.   If A_LoopFileExt in %zip1%
  241.     LV_Add("", A_LoopFileName, A_LoopFileLongPath)
  242.   }
  243. return
  244. ;------------------------------------
  245. ;- Hotkey sound ON /OFF
  246. pause1:
  247. t:=!t
  248. if t
  249.   soundset,1,WAVE,mute           ; WAVE ON
  250. else
  251.   soundset,0,WAVE,mute           ; WAVE OFF
  252. return
  253. ;---------------------------------------------
  254. ;Guiclose:
  255. Process, Exist, vlc.exe
  256. If ErrorLevel
  257.    {
  258.    msgbox, 262435,Close,Want you close also Audio ?
  259.    ifmsgbox,NO
  260.       {
  261.       soundset,0,master,mute
  262.       exitapp
  263.       }
  264.    ifmsgbox,Cancel
  265.       {
  266.       return
  267.       }
  268.    else
  269.      {
  270.      soundset,0,master,mute
  271.      process,close,vlc.exe
  272.      exitapp
  273.      }
  274.    }
  275. else
  276.   {
  277.   soundset,0,master,mute
  278.   exitapp
  279.   }
  280.   Return
  281. GetOut:
  282. GuiClose:
  283. Gui, Hide
  284. SkinForm(0)
  285. ExitApp
  286. Return
  287.  
  288. SkinForm(Param1 = "Apply", DLL = "", SkinName = ""){
  289.     if(Param1 = Apply){
  290.         DllCall("LoadLibrary", str, DLL)
  291.         DllCall(DLL . "\USkinInit", Int,0, Int,0, AStr, SkinName)
  292.     }else if(Param1 = 0){
  293.         DllCall(DLL . "\USkinExit")
  294.         }
  295. }
  296. ;============ END SCRIPT BUTTON_MENU ==============
  297. #R::Reload
  298. #S::Suspend
  299. #P::Pause
  300. #ESC::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement