Advertisement
Najeebsk

MY-TRAY-MENU.ahk

Dec 30th, 2021
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #SingleInstance Force
  2. #Persistent
  3. #NoEnv
  4. SetBatchLines, -1
  5. CustomColor = EEAA99  ; Can be any RGB color (it will be made transparent below).
  6. Gui +LastFound +AlwaysOnTop -Caption +ToolWindow  ; +ToolWindow avoids a taskbar button and an alt-tab menu item.
  7. Gui, Color, %CustomColor%
  8. Gui, Font, s8  ; Set a large font size (32-point).
  9. ; Make all pixels of this color transparent and make the text itself translucent (150):
  10. WinSet, TransColor, %CustomColor% 150
  11. SetTimer, UpdateOSD, 200
  12. Gosub, UpdateOSD  ; Make the first update immediate rather than waiting for the timer.
  13. Gui, Add, Text, cBlue x60 y0 w70 h20 +Center, NAJEEB MENU
  14. Gui, Add, Text, vMyText cRed x60 y30 w70 h20 +Center, XXXXX YYYYY  ; XX & YY serve to auto-size the window.
  15. Gui, Add, Button, x60 y60 w55 h20 +Center, Google
  16. Gui, Add, Button, x60 y90 w55 h20 +Center, Notepad
  17. Gui, Add, Button, x60 y120 w55 h20 +Center, Youtube
  18. Gui, Add, Button, x60 y150 w55 h20 +Center, Mspaint
  19. Gui, Add, Button, x60 y180 w55 h20 +Center, Drive
  20. Gui, Add, Button, x60 y210 w55 h20 +Center, Paste
  21. Gui, Add, Button, x60 y240 w55 h20 +Center, NCMD
  22. Gui, Add, Button, x60 y270 w55 h20 +Center, Startup
  23. Gui, Add, Button, x60 y300 w55 h20 +Center, Videos
  24. Gui +AlwaysOnTop
  25.  
  26. bw := 25   ; button width
  27. bh := 25   ; button height
  28. my := 3      ; y margin
  29. mx := 2      ; x margin
  30.  
  31. Hotkey, IfWinActive, HH Tools
  32. Hotkey, LButton, minimizeClicked
  33.  
  34. Gui, Show, Hide Autosize x890 y250 w75 h600, HH Tools
  35.  
  36. Menu, Tray, NoStandard
  37. Menu, Tray, Tip, HH Tools
  38. menu, tray, add, NAJEEB MENU, RestoreWindow
  39. menu, tray, add, Google-Images, ButtonGoogle
  40. menu, tray, add, Notepad, ButtonNotepad
  41. menu, tray, add, Youtube, ButtonYoutube
  42. menu, tray, add, Mspaint, ButtonMspaint
  43. menu, tray, add, My-Drive, ButtonDrive
  44. menu, tray, add, Najeebsk, ButtonNajeebPastebin
  45. menu, tray, add, N-CMD, ButtonNCMD
  46. menu, tray, add, Startup, ButtonStartup
  47. menu, tray, add, My Videos, ButtonVideos
  48. menu, tray, add
  49. menu, tray, add, View Toolbar, RestoreWindow
  50. menu, tray, add
  51. menu, tray, add, Close Program, CloseProgram
  52. Return
  53.  
  54. ;==============================
  55. ; Labels
  56. ;==============================
  57.  
  58. RestoreWindow:
  59.   WinShow, HH Tools
  60.    return
  61.  
  62. CloseProgram:
  63.   Exitapp
  64.    return
  65.  
  66. minimizeClicked:
  67.   Hotkey, LButton, Off
  68.    MouseGetPos, x, y, win
  69.    WinGetPos, , , w, h, ahk_id %win%
  70.    If (y > my and y < my + bh
  71.       and x > w - 3 * (mx + bw)
  72.       and x < w - 3 * (mx + bw) + bw)
  73.    {
  74.       ;MsgBox, You clicked the minimize button
  75.       WinHide, HH Tools
  76.       Hotkey, LButton, ON
  77.       return
  78.      
  79.    }  
  80.    else
  81.    {
  82.       if (y > my and y < my + bh
  83.          and x > w - 3 * (mx + bw)
  84.          and x > w - (3 * (mx + bw) - bw - bw))
  85.          {
  86.          ;MsgBox, You clicked the close button
  87.          MouseClick, left, x, y
  88.          Hotkey, LButton, ON
  89.          return
  90.                
  91.       }
  92.       else
  93.       {
  94.          MouseClick, left, x, y,,,D
  95.          Hotkey, LButton, ON
  96.          Return
  97.          
  98.       }
  99.    }
  100.  
  101. ButtonGoogle:
  102. Run, https://www.google.com.pk/imghp?hl=en&authuser=0&ogbl
  103. Return
  104.  
  105. ButtonYoutube:
  106. Run, https://www.youtube.com/
  107. Return
  108.  
  109. ButtonNotepad:
  110. IfWinExist Untitled - Notepad
  111. {
  112.     WinActivate
  113. }
  114. else
  115. {
  116.     Run Notepad
  117.     WinWait Untitled - Notepad
  118.     WinActivate
  119. }
  120. Return
  121. ButtonMspaint:
  122. IfWinExist Untitled - Mspaint
  123. {
  124.     WinActivate
  125. }
  126. else
  127. {
  128.     Run mspaint
  129.     WinWait Untitled - Mspaint
  130.     WinActivate
  131. }
  132. Return
  133.  
  134. UpdateOSD:
  135. MouseGetPos, MouseX, MouseY
  136. GuiControl,, MyText, X%MouseX%, Y%MouseY%
  137. return
  138. ButtonDrive:
  139. Run, https://drive.google.com/drive/my-drive
  140. Return
  141.  
  142. ButtonNajeebPastebin:
  143. Run, https://pastebin.com/u/Najeebsk
  144. Return
  145.  
  146. ButtonNCMD:
  147. Run, %A_WinDir%\CMD4.exe
  148. Return
  149.  
  150. ButtonStartup:
  151. Run, shell:startup
  152. Return
  153.  
  154. ButtonVideos:
  155. Run, D:\VIDEOS
  156. Return
  157.  
  158. ;Send to Development Alt+F1
  159. !F1::
  160. SendInput Case Not Closed Pending Development Resolution{Enter}
  161. SendInput Title of the Issue and Defect Number:{Enter}
  162. SendInput Customer Email Address:{Enter}
  163. SendInput User ID:{Enter}
  164. SendInput Password:{Enter}
  165. SendInput Did you communicate the workaround to the customer, if one is documented (Y/N)?{Enter}
  166. SendInput Did the documented workaround resolve the issue (Y/N)?{Enter}
  167. SendInput Would the customer like to be contacted after the issue has been resolved (Y/N)?{Enter}
  168. SendInput If yes, what method of communication is preferred (e-mail/phone)?{Enter}
  169. return
  170.  
  171. ;   ALT+F2
  172. !F2::
  173. SendInput Requestor first and last name:{Enter}
  174. SendInput Requestor role (must be User, CHEERS contact, AE, CTC) :{Enter}
  175. SendInput AE Name (REQUIRED if CTC) :{Enter}
  176. SendInput AE Employee # (REQUIRED if CTC) :{Enter}
  177. SendInput Requestor phone number:{Enter}
  178. SendInput Requestor e-mail address:{Enter}
  179. SendInput account number:{Enter}
  180. SendInput User ID to be deleted:{Enter}
  181. SendInput User First and Last Name (name that appears in FCL Profile):{Enter}
  182. SendInput Answer to secret question (only if requestor is the user):{Enter}
  183. SendInput Reason for deletion:{Enter}
  184. SendInput Would the customer like to be contacted after the ID has been deleted (Y/N)?{Enter}
  185. SendInput - If yes, what method of communication is preferred (e-mail/phone)?{Enter}
  186. return
  187. GuiClose:
  188. ESC::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement