Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; <COMPILER: v1.1.32.00>
- #SingleInstance Force
- SetworkingDir, %A_workingDir%
- F1::
- InputBox, SearchString, , % "Input string to search. By Najeeb"
- ResultList := []
- ChosenString := ""
- Loop, Read, %A_workingDir%\RUN.txt
- {
- if (InStr(A_LoopReadLine, SearchString))
- {
- ResultList.Push(A_LoopReadLine)
- }
- }
- if (!ResultList.Length())
- {
- MsgBox % "No match found!"
- return
- }
- Gui, DisplayResults:New,-MaximizeBox -MinimizeBox , Search results By Najeeb
- Gui, Add, Text, w250, % "Click on a line to select and Run it."
- for key, value in ResultList
- {
- if (key = 1)
- Gui, Add, Radio, gSelectResult vChosenString, %value%
- else
- Gui, Add, Radio, gSelectResult, %value%
- }
- Gui, DisplayResults:Show
- return
- SelectResult:
- Gui, DisplayResults:Submit
- Run % ResultList[ChosenString]
- return
- #R::Reload
- #S::Suspend
- #P::Pause
- ESC::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement