Advertisement
Najeebsk

NCOM.ahk

Jul 17th, 2022
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  ; <COMPILER: v1.1.31.01>
  2. #NoEnv
  3. #SingleInstance, Force
  4. SetBatchLines, -1
  5. #NoTrayIcon
  6. IniRead, CMD1, %A_ScriptDir%\NCOM.ini, CMD1
  7. IniRead, FLIST, %A_ScriptDir%\NCOM.ini, FLIST
  8. IniRead, FLIST2, %A_ScriptDir%\NCOM.ini, FLIST2
  9. IniRead, SCRIPT, %A_ScriptDir%\NCOM.ini, SCRIPT
  10. PATH=
  11. (Ltrim Join|
  12. SELECT PATH TO SAVE FILE|
  13. C:\Users\%A_USERNAME%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\
  14. %A_ScriptDir%\
  15. %A_Desktop%\
  16. %A_Temp%\
  17. %A_WinDir%\
  18. %A_ProgramFiles%\
  19. %A_AppData%\
  20. %A_MyDocuments%\
  21. %A_WorkingDir%\
  22. )
  23. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  24. Gui +LastFound +AlwaysOnTop -Caption +ToolWindow +Border
  25. ;Gui, +LastFound -Caption +AlwaysOnTop
  26. ;Gui, color, 213410, 213410
  27. ;Gui, Color, 884488
  28. CustomColor = 884488
  29. Gui, Color, %CustomColor%
  30. ;WinSet, TransColor, %CustomColor% 150
  31. Gui,Font,S14 Bold,Verdana
  32. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  33. ;Gui, Add, Text, x0 y0 w800 h18 +BackgroundTrans +0x201, NAJEEB ALL COMMANDS
  34. Gui, Add, Text,CYellow, ~~~***NAJEEB CMD ALL COMMANDS***~~~
  35. Gui, Add, Text,, COMMANDS:
  36. Gui, Add, Edit, w760 vMyEdit hwndMyEditHwnd gg_MyEdit
  37. ;Gui, Add, Edit, w400 gD vCMD1,
  38. Gui, Add, DropDownList, w760 gchoose vCMD2 hwndMyDdlHwnd, %CMD1% ;Commands
  39.  
  40. Gui, Add, Text,, EDIT COMMAND:
  41. Gui, Add, DropDownList, x215 y165 w560 gchoose2 vCMD3, %SCRIPT% ;Commands
  42. Gui, Add, Edit, x20 y200 w760 h80 vTXT, %CMD2%
  43.  
  44. Gui, Add, Text,, PATH:
  45. Gui, Add, DropDownList, w760 vPath, %PATH%
  46.  
  47. Gui, Add, Text,, FILE NAME.EXT:
  48. Gui, Add, Edit, w200 vEXTE,%EXT% ;Extension
  49. Gui, Add, DropDownList, x235 y400 w400  vList1 gOnSelect, %FLIST%|
  50. Gui, Add, DropDownList, x235 y440 w545  vList2 gOnSelect2, %FLIST2%|
  51.  
  52. gui, add, button, x20 y440 ,SUBMIT
  53. gui, add, button, Default x150 y440,RUN
  54. Gui, Add, Text, x0 y0 w80 h18 gGuiMove 0x5
  55. Gui, Show, h500 w800, NAJEEB CMD
  56. WinSet, Region, 0-0 W800 H500 R20-20,
  57. WinMove, 0, 0
  58. Return
  59. g_MyEdit:                                                                           ;gLabel for edit control - fired when a change is made to the edit control
  60. gui,submit, nohide
  61. searchStr       := MyEdit
  62. SendMessage, 0x014C, -1, &searchStr,, ahk_id %MyDdlHwnd%                            ;CB_FINDSTRING
  63. if (ErrorLevel != 4294967295)                                                       ;4294967295=string not found
  64.     SendMessage, 0x14D, -1, &searchStr,, ahk_id %MyDdlHwnd%                         ;CB_SELECTSTRING
  65. else
  66.     {
  67.         searchStr := SubStr(searchStr, 1, StrLen(searchStr) -1)
  68.         GuiControl,, %MyEditHwnd%, %searchStr%
  69.     }
  70. searchStrLen := StrLen(searchStr)
  71. SendMessage, 0xB1, %searchStrLen%, %searchStrLen%,, ahk_id %MyEditHwnd%             ;EM_SETSEL
  72. return
  73.  
  74.  
  75. g_MyDdl:                                                                            ;gLabel for the ddl control, fired when selection has been changed
  76. gui, submit, noHide                
  77. GuiControl,, %MyEditHwnd%, %MyDdl%
  78. return
  79. OnSelect:
  80. Gui, Submit, nohide
  81. Run, C:\Windows\explorer.exe shell:%List1%
  82. return
  83. OnSelect2:
  84. Gui, Submit, nohide
  85. Run, %List2%
  86. return
  87. choose:
  88. gui, submit, nohide
  89. guicontrol, , TXT, %CMD2%
  90. return
  91. choose2:
  92. gui, submit, nohide
  93. guicontrol, , TXT, %CMD3%
  94. return
  95. ButtonSubmit:
  96.     Gui, Submit, NoHide
  97.     FileAppend, % TXT, %Path%%EXTE%
  98. return
  99. GuiMove:
  100.  PostMessage, 0xA1, 2,,, A
  101. Return
  102. buttonRun:
  103. gui, submit, nohide
  104. Runwait,%comspec% /k %TXT%
  105. return
  106. #R::Reload  ;<--  ~ Reload Script ~
  107. #S::Suspend ;<--  ~ Suspend Script ~
  108. #P::Pause   ;<--  ~ Pause Script ~
  109. #M::WinMinimize, ;<--  ~ Minimize Script ~
  110. ESC::ExitApp     ;<--  ~ Exit Script ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement