Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;#Warn
- #NoEnv
- #SingleInstance, Force
- SetWorkingDir %A_ScriptDir%
- global winTitle
- winTitle := "ahk_class ConsoleWindowClass"
- Gui, -DPIScale
- Gui,Font,s12 CYellow,Lucida Console
- Gui,Color,Black, Black
- ;--------------------------
- List =
- (Ltrim Join|
- BOOKS\CHANNELS.txt
- BOOKS\CMD.txt
- BOOKS\COM.txt
- BOOKS\DOSKEY.ahk
- BOOKS\F.txt
- BOOKS\FFMPEG.txt
- BOOKS\FOLDER.txt
- BOOKS\HELP.txt
- BOOKS\I.txt
- BOOKS\MAGICK.txt
- BOOKS\MOVIES.txt
- BOOKS\N.txt
- YOUTUBE\BOOKS\NIRCMD.txt
- BOOKS\R.txt
- BOOKS\RAR.txt
- BOOKS\SEARCH-TEXT.au3
- BOOKS\SEARCH.txt
- BOOKS\SOFTWARES.ahk
- BOOKS\W.txt
- BOOKS\WEB.txt
- BOOKS\WGET.txt
- BOOKS\WHERE.txt
- BOOKS\WMIC.txt
- BOOKS\Y.txt
- BOOKS\YOUTUBE.txt
- )
- Gui,Font,s12 CYellow,Lucida Console
- Gui,Color,Black, Black
- Gui, Add, DropDownList, x10 y10 vFilePath gCMD2 w800, % List
- Gui, Add, DropDownList, x10 y40 vCmdDropdown gCMD w800
- Gui, Add, Edit, vCmdEdit x10 y80 w800 h60
- Gui, Add, Button, x10 y160 Default, Run Command
- Gui, Add, Button, x160 y160 gREF,REFRESH
- ; Add your predefined commands to the dropdown list
- ;Commands := "dir|ipconfig|ping|netstat|systeminfo|notepad"
- Gui, Show, w820 h200 , NAJEEB CMD Command Runner
- GuiDropFiles:
- Loop, parse, A_GuiEvent, `n
- GuiControl,,FilePath,%A_LoopField%
- return
- CMD2:
- Gui, Submit, NoHide
- GuiControl, -Redraw, CmdDropdown ; Clear the dropdown list
- FileRead, Commands, %FilePath%
- Loop, Parse, Commands, `n, `r
- {
- GuiControl,, CmdDropdown, %A_LoopField%
- }
- GuiControl, +Redraw, CmdDropdown ; Redraw the dropdown list
- return
- GuiClose:
- ExitApp
- CMD:
- Gui, Submit, NoHide
- GuiControl,,CmdEdit, %CmdDropdown% ; Clear the dropdown list
- return
- ButtonRunCommand:
- Gui, Submit, NoHide
- SelectedCmd := CmdEdit ;CmdDropdown
- if (SelectedCmd != "") {
- ; Run the CMD command
- RunWait, %ComSpec% /c %SelectedCmd%, , Hide
- }
- return
- REF:
- Gui, Submit, NoHide
- Reload
- return
- ;============ END SCRIPT ==============
- #R::Reload
- #S::Suspend
- #P::Pause
- #ESC::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement