Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; <COMPILER: v1.1.34.04>
- /* INFO
- READ TEXT EXT=txt,ini,bat,m3u,ahk IN SEARCH FOLDER (PUTTING TXT FILES IN SEARCH FOLDER AND READ)
- 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%
- Folder := A_WorkingDir . "\SEARCH"
- ;Ext=txt,ini,bat,m3u,ahk
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- FileCreateDir, %A_ScriptDir%\DATA
- FileCreateDir, %A_ScriptDir%\SEARCH
- FileInstall , SEARCH-TEXT.ahk, %A_ScriptDir%\DATA\SEARCH-TEXT.ahk, 1
- FileInstall , S69.she, %A_ScriptDir%\DATA\S69.she, 1
- FileInstall , SkinH_EL.dll, %A_ScriptDir%\DATA\SkinH_EL.dll, 1
- FileSetAttrib +HS, %A_ScriptDir%\DATA\SEARCH-TEXT.ahk, 2
- FileSetAttrib +HS, %A_ScriptDir%\DATA\S69.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\S69.she")
- OnExit, GetOut
- Gui,Font,S16 CRed Bold,Verdana ;Calibri
- Gui, Add, Text,CRed x75 y2, NAJEEB SEARCH FILES FOLDERS AND COMMANDS
- Gui,Font,S12 CBlack ;Bold,Verdana ;Calibri
- Gui, Add, Edit, x10 y30 w786 vneedle grefresh,
- Gui, Add, ListBox, x10 y62 vresults r28 w786
- Gui, Add, Button, x218 y580 gRUN,Run Exe
- Gui, Add, Button, x316 y580 gRUN3,Run Cmd
- Gui, Add, Button, x420 y580 gRUN4,Open Folder
- Gui, Add, Button, x550 y580 gRUN5,Video
- Gui, Add, Button, x620 y580 gMP3,MP3
- Gui, Add, Button, x680 y580 gRUN6,WEB
- Gui, Add, Button, x744 y580 gClip2,CLIP
- listboxvisible := true
- Gui, Add, DropDownList, x10 y582 W200 gDDL vColorChoice,
- GoSub, DDL
- Gui, Add, Text, x20 y640 w800,-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- Gui, Show, w810 h660, NAJEEB CHANGE EXTENSION AND RENAMER
- GuiControl, Focus, needle
- Return
- Refresh:
- Gui, Submit, NoHide
- choicelimit := 0
- GuiControl,, results, |
- listbox:=""
- if (needle != "")
- {
- Guicontrol, show, results
- listboxvisible := true
- Loop, parse, FileContents, `n, `r
- {
- haystack:=A_LoopField
- position := instr(haystack, needle)
- if (position = 1) ;if it matches from the left
- {
- listbox.="|" . haystack
- choicelimit := choicelimit + 1
- }
- }
- Loop, parse, FileContents, `n, `r
- {
- haystack:=A_LoopField
- position := instr(haystack, needle)
- if (position > 1)
- {
- listbox.="|" . haystack
- choicelimit := choicelimit + 1
- }
- }
- if (listbox = "" || listbox = "|") {
- listboxvisible := false
- return
- }
- GuiControl,, results, %listbox%
- GuiControl, choose, results, 1
- resultchosen := 1
- }
- return
- DDL:
- Loop, %Folder%\*.*, 0, 1
- {
- GuiControl, , ColorChoice, %A_LoopFileName%
- GuiControlGet, ColorChoice
- FileRead, FileContents, %A_WorkingDir%\SEARCH\%ColorChoice%
- Sort, FileContents
- }
- Return
- Run:
- Gui,submit,nohide
- Run, %results%
- Return
- Run3:
- Gui,submit,nohide
- Run, %comspec% /c %results%
- Return
- Run4:
- Gui,submit,nohide
- Run, C:\Windows\explorer.exe shell:%results%
- Return
- Run5:
- Gui,submit,nohide
- Run, %A_programfiles%\VideoLAN\VLC\vlc.exe %results%
- Return
- MP3:
- Gui,submit,nohide
- Soundplay, %results%
- Return
- Run6:
- Gui,submit,nohide
- Run, "%A_programfiles%\Mozilla Firefox\firefox.exe" %results%
- Return
- Clip2:
- Gui,submit,nohide
- Clipboard := results
- ClipWait ; Wait for the clipboard to contain text.
- MsgBox %clipboard%
- 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