Advertisement
Guest User

Untitled

a guest
Jul 6th, 2022
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. ;Color Selector Written By Joseph#0501
  3. ;Edited By Arekusei
  4. ;Osrs Tool v0.1
  5.  
  6. #SingleInstance Force
  7. SetBatchLines, -1
  8.  
  9. Menu Tray, Icon, pifmgr.DLL, 17
  10.  
  11. Gui, Font, s8, Verdana
  12. Gui, +AlwaysOnTop +hwndGUIHwnd
  13. Gui, Add, Progress, Section w50 h50 BackgroundBlack cWhite hwndProgress, 100
  14. Gui, Add, Button, w50 gClear, Clear
  15. Gui, Add, Edit, h91 ys w250 vText hwndMyEdit
  16. Gui, Add, Text, xm, CTRL + Click to select color
  17. Gui, Add, Text, xm, Alt + Drag Mouse to select coordinates
  18.  
  19.  
  20. Gui, Show,, OSRS Tool
  21. SetTimer, GetColor, 50, ON
  22. Return
  23.  
  24. GetColor:
  25.     MouseGetPos, MouseX, MouseY, MouseWin
  26.     PixelGetColor, Color, % MouseX, % MouseY, RGB
  27.     GuiControl, % "+c" SubStr(Color, 3) , % Progress
  28. Return
  29.  
  30. ^LButton::
  31.     Gui Submit, NoHide
  32.     MouseGetPos, MouseX, MouseY, MouseWin
  33.     PixelGetColor, Color, % MouseX, % MouseY, RGB
  34.     Clipboard := Color
  35.    
  36.     Contents:=  Color "`n" text
  37.     GuiControl,, % MyEdit, % Contents
  38.     SetTimer, TP, -500
  39.     ToolTip, Copied!
  40.  
  41. Return
  42.  
  43. tp:
  44.    sleep 555
  45.     ToolTip
  46. Return
  47.  
  48. clear:
  49. GuiControl,, % MyEdit
  50. Return
  51.  
  52.  
  53. GuiClose:
  54. GuiEscape:
  55.     ExitApp
  56. Return
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. marker(X:=0, Y:=0, W:=0, H:=0)
  64. {
  65. T:=3, ; Thickness of the Border
  66. w2:=W-T,
  67. h2:=H-T
  68.  
  69. Gui marker: +LastFound +AlwaysOnTop -Caption +ToolWindow +E0x08000000 +E0x80020
  70. Gui marker: Color, Red ;Color
  71. Gui marker: Show, w%W% h%H% x%X% y%Y% NA
  72.  
  73. WinSet, Transparent, 150
  74. WinSet, Region, 0-0 %W%-0 %W%-%H% 0-%H% 0-0 %T%-%T% %w2%-%T% %w2%-%h2% %T%-%h2% %T%-%T%
  75. Return  
  76. }
  77.  
  78.  
  79. !LButton::
  80.    
  81.     WinGetPos XN, YN, , , A
  82.     MouseGetPos x1, y1
  83.     x1+=XN, y1+=YN
  84.     While GetKeyState("LButton","P") {
  85.        MouseGetPos x2, y2
  86.        x2+=XN, y2+=YN
  87.        x:= (x1<x2)?(x1):(x2)    ;x-coordinate of the top left corner
  88.        y:= (y1<y2)?(y1):(y2)    ;y-coordinate of the top left corner
  89.        
  90.        w:= Abs(x2-x1), h:= Abs(y2-y1)
  91.        ToolTip % "Coords " x - xn "," y - yn "  Dim " w "x" h
  92.        
  93.        marker(x, y, w, h)
  94.  
  95.     }
  96.     Gui Submit, NoHide
  97.     output := x - xn ", " y - yn ", " x - xn + w ", " y - yn + h
  98.     Contents:=  output "`n" text
  99.     GuiControl,, % MyEdit, % Contents
  100.     clipboard := % x - xn ", " y - yn ", " x - xn + w ", " y - yn + h
  101.    
  102.     ToolTip
  103. Return
  104.  
  105. ~RButton::
  106. Gui, marker: Destroy
  107. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement