Advertisement
pastamaker

you can move him, but i won't move!

May 29th, 2018
102
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.  
  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. UpdateLayeredWindow(win.hwnd, win.hdc, win.x, win.y, win.w, win.h)
  26. SetTimer,sub_xy,1
  27. ttt:=1
  28. return
  29. move_window:
  30. PostMessage,0xa1,2
  31.  
  32.  
  33.  
  34. return
  35. sub_xy:
  36. WinGetPos, X, Y, Width, Height,me
  37. win.x:=x
  38. win.y:=y
  39. ToolTip,% x " < > " y
  40. Fill_Box(win.g, pBrush, 0, 0, win.w, win.h)
  41. Gdip_FillEllipse(win.g, circle.brush, circle.x-win.x, circle.y-win.y,circle.d , circle.d)
  42.  
  43. UpdateLayeredWindow(win.hwnd, win.hdc)
  44. return
  45.  
  46. GuiClose:
  47. GuiEscape:
  48. *x::
  49.  
  50.  
  51. Layered_Window_ShutDown(win)
  52. gdip_deletebrush(pbrush)
  53. ExitApp
  54.  
  55. d::
  56. Fill_Box(win.g, brush[ttt], 200, 200, 50, 50)
  57. ttt++
  58. UpdateLayeredWindow(win.hwnd, win.hdc)
  59. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement