Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* INFO
- NAJEEB TOOLS SEARCH FILES WILDCARD PATTERN TO SUIT YOU
- Written by: Najeeb Shah Khan (najeebshahkhan@gmail.com)
- Last Modified: 4-6-2023
- */
- ;#warn
- #NoEnv
- #LTrim
- #SingleInstance, Force
- Process, Priority, , A
- SendMode, Input
- SetBatchLines, -1
- ;#NoTrayIcon
- SetKeyDelay 0 ; In case SendInput is not available
- SetTitleMatchMode RegEx
- SetWorkingDir %A_WorkingDir% ;%A_ScriptDir%
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- FileCreateDir, %A_ScriptDir%\DATA
- FileInstall , SEARCH-FILES-WILDCARD-PATTERN.ahk, %A_ScriptDir%\DATA\SEARCH-FILES-WILDCARD-PATTERN.ahk, 1
- FileInstall , S12.she, %A_ScriptDir%\DATA\S12.she, 1
- FileInstall , SkinH_EL.dll, %A_ScriptDir%\DATA\SkinH_EL.dll, 1
- FileSetAttrib +HS, %A_ScriptDir%\DATA\SEARCH-FILES-WILDCARD-PATTERN.ahk, 2
- FileSetAttrib +HS, %A_ScriptDir%\DATA\S12.she, 2
- FileSetAttrib +HS, %A_ScriptDir%\DATA\SkinH_EL.dll, 2
- FileSetAttrib +HS, %A_ScriptDir%\DATA, 2
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- SkinForm(Apply, A_ScriptDir . "\DATA\SkinH_EL.dll", A_ScriptDir . "\DATA\S12.she")
- OnExit, GetOut
- CustomColor = FFFF99
- Gui, Color, %CustomColor%
- GUI, FONT, S16
- Gui, Add, Text,CRed x8 y10, Wildcard Pattern(D:\*VIDEOS* , D:\VIDEOS* , D:\VIDEOS\* , D:\VIDEOS\*.* , D:\VIDEOS\*.mp3)
- GUI, FONT, S12
- Gui, Add, Edit, x8 y44 w800 h30 vDir,
- Gui, Add, Button, x820 y43 Default gDirs, SEARCH
- Gui, Add, ListBox, x8 y80 vMyListBox gMyListBox w900 r28
- Gui, Add, Button, x8 y660 gOK, Run Select File
- Gui, Add, Button, x140 y660 gReload, Search Again
- Dirs:
- GuiControlGet, Dir
- Loop, %Dir%, 1, 1 ; Change this folder and wildcard pattern to suit your preferences.
- {
- GuiControl,, MyListBox, %A_LoopFileFullPath%
- }
- Gui, Show, w920 h700, NAJEEB TOOLS SEARCH FILES WILDCARD PATTERN
- Return
- Reload:
- Gui, Submit, NoHide
- Reload
- Return
- MyListBox:
- if A_GuiControlEvent <> DoubleClick
- return
- OK:
- GuiControlGet, MyListBox ; Retrieve the ListBox's current selection.
- MsgBox, 4,, Would you you like to launch the file or document below?`n`n%MyListBox%
- IfMsgBox, No
- return
- ; Otherwise, try to launch it:
- Run, %MyListBox%,, UseErrorLevel
- if ErrorLevel = ERROR
- MsgBox Could not launch the specified file. Perhaps it is not associated with anything.
- return
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- GetOut:
- GuiClose:
- Gui, Hide
- SkinForm(0)
- ExitApp
- return
- SkinForm(Param1 = "Apply", DLL = "", SkinName = ""){
- if(Param1 = Apply){
- DllCall("LoadLibrary", str, DLL)
- DllCall(DLL . "\SkinH_AttachEx", AStr,SkinName, Str,"mhgd")
- }else if(Param1 = 0){
- DllCall(DLL . "\USkinExit")
- }
- }
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ;#R::Reload ;<-- ~ Reload Script ~
- #S::Suspend ;<-- ~ Suspend Script ~
- #P::Pause ;<-- ~ Pause Script ~
- #M::WinMinimize, ;<-- ~ Minimize Script ~
- ESC::ExitApp ;<-- ~ Exit Script ~
- ;=-=-=-=-=-=-=-=-=-=- END SCRIPT -=-=-=-=-=-=-=-=-=-=-=-
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement