Advertisement
pastamaker

wasd x exit transparent with black frame

May 29th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn  ; Enable warnings to assist with detecting common errors.
  3. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  5.  
  6. #maxhotkeysperinterval 100000
  7. #Include,<hellbents_gdip>
  8. SetBatchLines, -1
  9.  
  10.  
  11.  
  12. win:=Layered_Window_SetUp(4,20,20,500,500,1,"+alwaysontop")
  13. gui,1:show,,me
  14. gui,1: add,text,x0 y0 w1366 h768 gmove_window
  15. pbrush1:=New_Brush("0000ff")
  16. circle:={d:100,x:500,y:300,brush:pbrush1}
  17.  
  18. pbrush:=New_Brush("000000","ff")
  19. ;~ Fill_Box(win.g, pBrush, 0, 0, win.w, win.h)
  20. Gdip_FillEllipse(win.g, circle.brush, circle.x-win.x, circle.y-win.y,circle.d , circle.d)
  21. brush:=[]
  22. brush.push(New_Brush("f0ff00"))
  23. brush.push(New_Brush("f0fffa"))
  24. brush.push(New_Brush("aaaaaa"))
  25. pbrushclear:=New_Brush("ffffff","00")
  26. UpdateLayeredWindow(win.hwnd, win.hdc, win.x, win.y, win.w, win.h)
  27. ;~ SetTimer,sub_xy,1
  28. ttt:=1
  29. return
  30. move_window:
  31. PostMessage,0xa1,2
  32.  
  33.  
  34.  
  35. return
  36. sub_xy:
  37. WinGetPos, X, Y, Width, Height,me
  38. win.x:=x
  39. win.y:=y
  40. ToolTip,% x " < > " y
  41. ;~ Fill_Box(win.g, pBrush, 0, 0, win.w, win.h)
  42. Gdip_FillEllipse(win.g, circle.brush, circle.x-win.x, circle.y-win.y,circle.d , circle.d)
  43.  
  44. UpdateLayeredWindow(win.hwnd, win.hdc)
  45. return
  46.  
  47. GuiClose:
  48. GuiEscape:
  49. *x::
  50.  
  51.  
  52. Layered_Window_ShutDown(win)
  53. gdip_deletebrush(pbrush)
  54. ExitApp
  55.  
  56. ;~ d::
  57. ;~ Fill_Box(win.g, brush[ttt], 200, 200, 50, 50)
  58. ;~ ttt++
  59. ;~ UpdateLayeredWindow(win.hwnd, win.hdc)
  60. ;~ return
  61.  
  62.  
  63.  
  64.  
  65. a::
  66.  
  67. win.x-=5
  68.  
  69.  
  70. gosub update
  71. return
  72.  
  73.  
  74. d::
  75.  
  76.  
  77. win.x+=5
  78.  
  79.  
  80. gosub update
  81. return
  82.  
  83. w::
  84.  
  85. win.y-=5
  86.  
  87. gosub update
  88.  
  89. return
  90.  
  91.  
  92. s::
  93.  
  94.  
  95. win.y+=5
  96.  
  97.  
  98. gosub update
  99. return
  100.  
  101. update:
  102. Gdip_GraphicsClear(win.g)
  103.  
  104. Gdip_FillEllipse(win.g, circle.brush, circle.x-win.x, circle.y-win.y,circle.d , circle.d)
  105. colour=000000
  106. Drawbox_2(win.g,colour,"ff",0,0,win.w,win.h,10)
  107. UpdateLayeredWindow(win.hwnd, win.hdc,win.x,win.y)
  108. return
  109.  
  110.  
  111. Drawbox_2(g,colour,Alpha,x0,y0,w0,h0,d0){
  112. pPen1:=New_Pen(colour,Alpha,d0)
  113. Gdip_DrawRectangle(g, pPen1, x0+d0/2, y0+d0/2, w0-d0, h0-d0)
  114.  
  115.  
  116. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement