vanheartnet

AHK DOCK

Aug 14th, 2020 (edited)
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.14 KB | None | 0 0
  1. ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
  2. ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
  3. ;@Ahk2Exe-Set FileDescription, AHK Dock
  4. ;@Ahk2Exe-Set FileVersion, 1.0.0.0
  5. ;@Ahk2Exe-SetInternalName AHK Dock
  6. ;@Ahk2Exe-SetName GPoints AHK Dock
  7. ;@Ahk2Exe-SetOrigFileName AHK Dock
  8. ;@Ahk2Exe-Set ProductName, AHK Menu Launcher
  9. ;@Ahk2Exe-Set ProductVersion, 1.0.0.0
  10. ;@Ahk2Exe-Set Description, AHK Dock
  11. ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
  12.  
  13.  
  14.  
  15. #SingleInstance,Force
  16. #Persistent
  17. #NoEnv
  18. Menu,tray, NoStandard
  19. Menu,Tray,Add,Exit
  20. SetWorkingDir %A_ScriptDir%
  21. SetBatchLines, -1
  22. #MaxHotkeysPerInterval 99000000
  23. #HotkeyInterval 99000000
  24. #KeyHistory 0
  25. ListLines Off
  26. Process, Priority, , A
  27. SetKeyDelay, -1, -1
  28. SetMouseDelay, -1
  29. SetDefaultMouseSpeed, 0
  30. SetWinDelay, -1
  31. SetControlDelay, -1
  32. SendMode Input
  33.  
  34.  
  35. IfExist,cfg.ini
  36. {
  37. IniRead,Func,cfg.ini,Blank,Func
  38. IniRead,JS,cfg.ini,Blank,Startup
  39. if (JS=1)
  40. ST:=true
  41. else
  42. ST:=false
  43. }else{
  44. IniWrite,0,cfg.ini,Blank,Startup
  45. IniWrite,New,cfg.ini,Blank,NewW
  46. IniRead,0,cfg.ini,Blank,Func
  47. ST:=false
  48. }
  49.  
  50. FileRead,Read,cfg.ini
  51. str:=StrSplit(Read,"NewW=")
  52. str2:=str.2
  53.  
  54. Gui,1:+AlwaysOntop -Caption +ToolWindow
  55. Gui,1:Color,103063
  56. Gui,1:Font, s16 bold,Impact
  57. Gui,1:Add,Button,x5 y5 w100 h55 gNEW, NEW
  58. Gui,1:Add,Button,x+10 w100 h55 gSave, SAVE
  59. Gui,1:Add,Button,x+10 w100 h55 gSAVEAS, SAVE AS
  60. Gui,1:Add,Button,x+10 w100 h55 gSEARCH, SEARCH
  61. Gui,1:Add,Button,x+10 w100 h55 gREPLACE, REPLACE
  62. Gui,1:Add,Button,x+10 w100 h55 gWINSPY, WINSPY
  63. Gui,1:Add,Button,x+10 w100 h55 gMESSAGEBOX, MSGBOX
  64. Gui,1:Add,Button,x+10 w100 h55 gUNDO, UNDO
  65. Gui,1:Add,Button,x+10 w100 h55 gREDO, REDO
  66. Gui,1:Add,Button,x+10 w650 h55 vStart gStart, RUN
  67. Gui,1:Add,Button,x+10 w150 h55 gMinimize, Minimize
  68. Gui,1:Font,
  69. Gui,1:Font,cred s10 bold,Arial
  70. If (ST=true)
  71. Gui,1:Add,Checkbox,x+10 y2 w100 Checked vCB1 gCB1,Run on Startup
  72. else
  73. Gui,1:Add,Checkbox,x+10 y2 w100 vCB1 gCB1,Run on Startup
  74. Gui,1:Add,Button,x1810 y35 w80 h20 gFunc, Function
  75. Gui,1:Show,x0 y0 w1900 h64, RUN scite
  76. OnMessage(0x232,"Move_Windows")
  77. OnMessage(0x201,"Mouse_Move")
  78. SetTimer,Showme,200
  79.  
  80. return
  81.  
  82. Func:
  83. Run, Autohotkey.exe "%Func%"
  84. return
  85.  
  86. Mouse_Move()
  87. {
  88. PostMessage, 0xA1,2
  89. }
  90. Move_Windows()
  91. {
  92. IfWinExist, Gui 4
  93. {
  94. WinGetpos,X1,Y1,,,RUN scite
  95. Gui,4:Show, x%X1% y%Y1%
  96. }
  97. }
  98.  
  99. Showme:
  100. IfWinnotExist,ahk_class SciTEWindow ahk_exe SciTE.exe
  101. WinHide,RUN scite
  102. WinGet,EA,Style,ahk_class SciTEWindow ahk_exe SciTE.exe
  103. if (not EA & 0x20000000)
  104. {
  105. IfWinActive,ahk_class SciTEWindow ahk_exe SciTE.exe
  106. {
  107. IfWinExist,RUN scite
  108. {
  109. WinGet,EE,Style,RUN scite,
  110. if (! EE & 0x10000000)
  111. {
  112. Winshow,RUN scite
  113. WinActivate,ahk_class SciTEWindow ahk_exe SciTE.exe
  114. }
  115. }
  116. else
  117. {
  118. WinShow,RUN scite
  119. }
  120. }
  121. }
  122. else
  123. WinHide,RUN scite
  124.  
  125. return
  126.  
  127. CB1:
  128. Gui,1:Submit,Nohide
  129. if (CB1=0)
  130. {
  131. IniWrite,0,cfg.ini,Blank,Startup
  132. CB1:=0
  133. FileDelete,%A_AppData%\Microsoft\Windows\Start Menu\Programs\Startup\AHK Dock.lnk
  134. }
  135. else
  136. {
  137. IniWrite,1,cfg.ini,Blank,Startup
  138. Loop,AHK DOCK.exe,,1
  139. {
  140. Pathy := A_LoopFileLongPath
  141. StringReplace,TT,Pathy,\AHK DOCK.exe,,ALl
  142. IfNotExist,%A_AppData%\Microsoft\Windows\Start Menu\Programs\Startup
  143. FileCreateDir,%A_AppData%\Microsoft\Windows\Start Menu\Programs\Startup
  144. FileCreateShortcut,%Pathy%,%A_AppData%\Microsoft\Windows\Start Menu\Programs\Startup\AHK Dock.lnk,"%TT%",
  145. if (errorlevel=1)
  146. MsgBox, Failed
  147. }
  148. CB1:=1
  149. }
  150. return
  151.  
  152. NEW:
  153. IfWinExist,ahk_class SciTEWindow ahk_exe SciTE.exe
  154. {
  155. IfWinNotActive
  156. WinActivate,
  157. WinMenuSelectItem,ahk_class SciTEWindow,,File,New
  158. Clipboard=%str2%
  159. Send ^v
  160. }
  161. return
  162. Minimize:
  163. WinMinimize,ahk_class SciTEWindow ahk_exe SciTE.exe
  164. return
  165. EXIT:
  166. ExitApp
  167. return
  168. SAVEAS:
  169. IfWinExist,ahk_class SciTEWindow ahk_exe SciTE.exe
  170. {
  171. IfWinNotActive
  172. WinActivate,
  173. WinMenuSelectItem,ahk_class SciTEWindow,,File,Save As...
  174. }
  175. return
  176.  
  177. UNDO:
  178. IfWinExist,ahk_class SciTEWindow ahk_exe SciTE.exe
  179. {
  180. IfWinNotActive
  181. WinActivate,
  182. WinMenuSelectItem,ahk_class SciTEWindow,,Edit,Undo
  183. }
  184. return
  185. REDO:
  186. IfWinExist,ahk_class SciTEWindow ahk_exe SciTE.exe
  187. {
  188. IfWinNotActive
  189. WinActivate,
  190. WinMenuSelectItem,ahk_class SciTEWindow,,Edit,Redo
  191. }
  192. return
  193. MESSAGEBOX:
  194. run,C:\Program Files (x86)\AutoHotkey113200\SciTE\tools\MsgBoxC.exe
  195. return
  196. SEARCH:
  197. IfWinExist,ahk_class SciTEWindow ahk_exe SciTE.exe
  198. {
  199. IfWinNotActive
  200. WinActivate,
  201. WinMenuSelectItem,ahk_class SciTEWindow,,Search,Find...
  202. }
  203.  
  204. return
  205. REPLACE:
  206. IfWinExist,ahk_class SciTEWindow ahk_exe SciTE.exe
  207. {
  208. IfWinNotActive
  209. WinActivate,
  210. WinMenuSelectItem,ahk_class SciTEWindow,,Search,Replace...
  211. }
  212. return
  213. WINSPY:
  214. run, C:\Program Files (x86)\AutoHotkey113200\SciTE\tools\ActiveWindowInfo.exe
  215. return
  216. Save:
  217. IfWinExist,ahk_class SciTEWindow ahk_exe SciTE.exe
  218. {
  219. IfWinNotActive
  220. WinActivate,
  221. WinMenuSelectItem,ahk_class SciTEWindow,,File,Save
  222. }
  223. return
  224.  
  225. Start:
  226. IfWinExist,ahk_class SciTEWindow ahk_exe SciTE.exe
  227. {
  228. WinActivate,ahk_class SciTEWindow ahk_exe SciTE.exe
  229. WinMenuSelectItem,ahk_class SciTEWindow,,Tools,Run
  230. }
  231. return
  232.  
  233.  
  234.  
  235.  
  236. ^Esc::
  237. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment