Advertisement
Najeebsk

CMD2.ahk

Dec 25th, 2021
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv
  2. #SingleInstance, Force
  3. SetWorkingDir %A_WorkingDir%  
  4. NCMDIndex := 0
  5. loop, read, Data\CMD.ls
  6. {
  7. NCMD%A_Index% := A_LoopReadLine
  8. NCMD0 = %A_Index%
  9. }
  10.  
  11. Loop,%NCMD0%
  12.     List .= NCMD%A_Index%  . "|"
  13. Gui, Destroy
  14. Gui, Color, ECF4FC
  15. Gui, -Caption +LastFound +AlwaysOnTop
  16. Gui, Font, s10 cRed Times New Roman Bold
  17. Gui, Add, DropDownList, x2 w800 vNircmdchoice gRun2, %List%
  18. Gui, add, edit, r1 x2 w800 vRun,
  19. Gui, Font, s10 cRed, Times New Roman Bold
  20. Gui, Add, Button, x200 y60 gSubmit_All,NIR-COMMANDS
  21. Gui, Add, Button, x400 y60 gSubmit_All2,CMD-COMMANDS
  22. Gui, Show, Noactivate x60  y0 w805 h85, MacroBar
  23. Run2:
  24. Gui,Submit, Nohide
  25. Guicontrol,,Run,%Nircmdchoice%
  26. return
  27.  
  28. Submit_All:
  29. Gui,Submit, Nohide
  30. Run, nircmd.exe %Run%
  31. return
  32. Submit_All2:
  33. Gui,Submit, Nohide
  34. Run, %comspec% /c %Run%,,hide
  35. return
  36. #R::Reload
  37. #S::Suspend
  38. #P::Pause
  39. ESC::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement