Advertisement
Najeebsk

ALL-SEARCH.ahk

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