Advertisement
Najeebsk

COMMANDER.ahk

Dec 2nd, 2023 (edited)
1,113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Warn
  2. #NoEnv
  3. #SingleInstance, Force
  4. SetWorkingDir %A_ScriptDir%
  5. global winTitle
  6. winTitle := "ahk_class ConsoleWindowClass"
  7. Gui, -DPIScale
  8. Gui,Font,s12 CYellow,Lucida Console
  9. Gui,Color,Black, Black
  10. ;--------------------------
  11. PR=%A_ScriptDir%\APP\ffmpeg.exe
  12. PR2=%A_ScriptDir%\APP\youtube-dl.exe
  13. PR3=%A_ScriptDir%\APP\wget.exe
  14. PR4=%A_ScriptDir%\APP\nircmd.exe
  15. VLC=%A_ProgramFiles%\VideoLAN\VLC\vlc.exe
  16. AA=%A_Desktop%                 ; <<< Browse search fileselectfile from here
  17. ;---------------------------
  18. edcol1=white
  19. btcol =Gray
  20. Gui,Add, Edit, w700 h30 c%edcol1% vFilePath,BOOKS\HELP.txt
  21. ;-- 2 - buttons
  22. Gui,Add,Progress,            x735  y10   w150   h27  Disabled Background%btcol%
  23. Gui,Add,Text,                xp    yp     wp    hp   cYellow  BackgroundTrans center 0x200 gOpenFile ,OPEN FILE
  24. ;Gui,Add,Progress,            x10  y60   w870   h27  Disabled Background%btcol%
  25. Gui,Add, DropDownList, vCmdDropdown gCMD x10 y60 w870
  26. ;--------------
  27. Gui,Add, Edit, x10     y100  w870 h250  c%edcol1% vF1,
  28. Gui,Add,Progress,            x10  y360   w170   h27  Disabled Background%btcol%
  29. Gui,Add, Text,   xp    yp     wp    hp   cYellow  BackgroundTrans center 0x200 gExecuteCommand,EXECUTE COMMAND
  30. ;---------------------
  31. Gui,Add,Progress,            x190  y360   w130   h27  Disabled Background%btcol%
  32. Gui,Add, Text,   xp    yp     wp    hp   cYellow  BackgroundTrans center 0x200 gRUN,RUN COMMAND
  33. ;-----------------------
  34. Gui,Add,Progress,            x330  y360   w130   h27  Disabled Background%btcol%
  35. Gui,Add, Text,   xp    yp     wp    hp   cYellow  BackgroundTrans center 0x200 gVL,IPTV PLAYER
  36. ;-----------------------
  37. Gui,Add,Progress,            x470  y360   w130   h27  Disabled Background%btcol%
  38. Gui,Add, Text,   xp    yp     wp    hp   cYellow  BackgroundTrans center 0x200 gRUN2,RUN CMD
  39. ;-----------------------
  40. Gui,Add,Progress,            x610  y360   w130   h27  Disabled Background%btcol%
  41. Gui,Add, Text,   xp    yp     wp    hp   cYellow  BackgroundTrans center 0x200 gWHE,WHERE
  42. ;-----------------------
  43. Gui,Add,Progress,            x755  y360   w130   h27  Disabled Background%btcol%
  44. Gui,Add, Text,   xp    yp     wp    hp   cYellow  BackgroundTrans center 0x200 gREF,REFRESH
  45. ;------------------------
  46. Gui,show, NA x20 y20 W900 h400, Drag & Drop or Browse for Video-files / Najeeb Converter And Video Cutter And Downlaoder And Record DeskTop
  47. return
  48. ;----------------------------------------------------------
  49. GuiDropFiles:
  50. Loop, parse, A_GuiEvent, `n
  51.    GuiControl,,FilePath,%A_LoopField%
  52. return
  53. ;----------------------------------------------------------
  54. GuiClose:
  55. ExitApp
  56. ;----------------------------------------------------------
  57. OpenFile:
  58.    Gui, Submit, NoHide
  59.     GuiControl, -Redraw, CmdDropdown ; Clear the dropdown list
  60.    
  61.     FileRead, Commands, %FilePath%
  62.     Loop, Parse, Commands, `n, `r
  63.     {
  64.         GuiControl,, CmdDropdown, %A_LoopField%
  65.     }
  66.    
  67.     GuiControl, +Redraw, CmdDropdown ; Redraw the dropdown list
  68. return
  69. CMD:
  70. Gui, Submit, NoHide
  71.     GuiControl,,F1, %CmdDropdown% ; Clear the dropdown list
  72. return
  73. ExecuteCommand:
  74.    Gui, Submit, NoHide
  75.     SelectedCmd := F1
  76.    
  77.     if (SelectedCmd != "") {
  78.         ; Run the selected command
  79.         ; RunWait, %SelectedCmd%, , Hide
  80.         RunWait,%comspec% /k %SelectedCmd%
  81.     }
  82. return
  83. ;-------------------------------
  84. RUN:
  85.     Gui, Submit, NoHide
  86. {
  87.    run, %f1%
  88.   ; run,%filedest%
  89.    }
  90. return
  91. ;------------------------------------------
  92. VL:
  93. Gui,submit,nohide
  94. {
  95.  Run, %vlc% %f1%
  96.   ; run,%filedest%
  97.    }
  98. return
  99. ;-------------------------------
  100. WHE:
  101. Gui, Submit, NoHide
  102.   {
  103.   RunWait,%comspec% /k %f1%
  104.   ; run,%f1%
  105.   }
  106. return
  107. ;-------------------------------
  108. RUN2:
  109. Gui, Submit, NoHide
  110.   {
  111.  RunWait,%comspec% /k cd /d & %f1%
  112.   ; run,%filedest%
  113.   }
  114. return
  115. ;-------------------------------
  116. REF:
  117.    Gui, Submit, NoHide
  118. Reload
  119. return
  120. ;============ END SCRIPT ==============
  121. #R::Reload
  122. #S::Suspend
  123. #P::Pause
  124. #ESC::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement