SHARE
TWEET

Untitled

a guest Nov 19th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PATH_OVERLAY := RelToAbs(A_ScriptDir, "dx9_overlay.dll")
  2.  
  3. hModule := DllCall("LoadLibrary", Str, PATH_OVERLAY)
  4. if(hModule == -1 || hModule == 0)
  5. {
  6.     MsgBox, 48, Error, The dll-file couldn't be found!
  7.     ExitApp
  8. }
  9.  
  10. Init_func               := DllCall("GetProcAddress", UInt, hModule, Str, "Init")
  11. SetParam_func           := DllCall("GetProcAddress", UInt, hModule, Str, "SetParam")
  12.  
  13. TextCreate_func         := DllCall("GetProcAddress", UInt, hModule, Str, "TextCreate")
  14. TextDestroy_func        := DllCall("GetProcAddress", UInt, hModule, Str, "TextDestroy")
  15. TextSetShadow_func      := DllCall("GetProcAddress", UInt, hModule, Str, "TextSetShadow")
  16. TextSetShown_func       := DllCall("GetProcAddress", UInt, hModule, Str, "TextSetShown")
  17. TextSetColor_func       := DllCall("GetProcAddress", UInt, hModule, Str, "TextSetColor")
  18. TextSetPos_func         := DllCall("GetProcAddress", UInt, hModule, Str, "TextSetPos")
  19. TextSetString_func      := DllCall("GetProcAddress", UInt, hModule, Str, "TextSetString")
  20. TextUpdate_func         := DllCall("GetProcAddress", UInt, hModule, Str, "TextUpdate")
  21.  
  22. BoxCreate_func          := DllCall("GetProcAddress", UInt, hModule, Str, "BoxCreate")
  23. BoxDestroy_func         := DllCall("GetProcAddress", UInt, hModule, Str, "BoxDestroy")
  24. BoxSetShown_func        := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetShown")
  25. BoxSetBorder_func       := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetBorder")
  26. BoxSetBorderColor_func  := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetBorderColor")
  27. BoxSetColor_func        := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetColor")
  28. BoxSetHeight_func       := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetHeight")
  29. BoxSetPos_func          := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetPos")
  30. BoxSetWidth_func        := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetWidth")
  31.  
  32. LineCreate_func         := DllCall("GetProcAddress", UInt, hModule, Str, "LineCreate")
  33. LineDestroy_func        := DllCall("GetProcAddress", UInt, hModule, Str, "LineDestroy")
  34. LineSetShown_func       := DllCall("GetProcAddress", UInt, hModule, Str, "LineSetShown")
  35. LineSetColor_func       := DllCall("GetProcAddress", UInt, hModule, Str, "LineSetColor")
  36. LineSetWidth_func       := DllCall("GetProcAddress", UInt, hModule, Str, "LineSetWidth")
  37. LineSetPos_func         := DllCall("GetProcAddress", UInt, hModule, Str, "LineSetPos")
  38.  
  39. ImageCreate_func        := DllCall("GetProcAddress", UInt, hModule, Str, "ImageCreate")
  40. ImageDestroy_func       := DllCall("GetProcAddress", UInt, hModule, Str, "ImageDestroy")
  41. ImageSetShown_func      := DllCall("GetProcAddress", UInt, hModule, Str, "ImageSetShown")
  42. ImageSetAlign_func      := DllCall("GetProcAddress", UInt, hModule, Str, "ImageSetAlign")
  43. ImageSetPos_func        := DllCall("GetProcAddress", UInt, hModule, Str, "ImageSetPos")
  44. ImageSetRotation_func   := DllCall("GetProcAddress", UInt, hModule, Str, "ImageSetRotation")
  45.  
  46. DestroyAllVisual_func   := DllCall("GetProcAddress", UInt, hModule, Str, "DestroyAllVisual")
  47. ShowAllVisual_func      := DllCall("GetProcAddress", UInt, hModule, Str, "ShowAllVisual")
  48. HideAllVisual_func      := DllCall("GetProcAddress", UInt, hModule, Str, "HideAllVisual")
  49.  
  50. GetFrameRate_func       := DllCall("GetProcAddress", UInt, hModule, Str, "GetFrameRate")
  51. GetScreenSpecs_func     := DllCall("GetProcAddress", UInt, hModule, Str, "GetScreenSpecs")
  52.  
  53. SetCalculationRatio_func:= DllCall("GetProcAddress", UInt, hModule, Str, "SetCalculationRatio")
  54.  
  55. SetOverlayPriority_func := DllCall("GetProcAddress", UInt, hModule, Str, "SetOverlayPriority")
  56.  
  57. Init()
  58. {
  59.     global Init_func
  60.     res := DllCall(Init_func)
  61.     return res
  62. }
  63.  
  64. SetParam(str_Name, str_Value)
  65. {
  66.     global SetParam_func
  67.     res := DllCall(SetParam_func, Str, str_Name, Str, str_Value)
  68.     return res
  69. }
  70.  
  71. TextCreate(Font, fontsize, bold, italic, x, y, color, text, shadow, show)
  72. {
  73.     global TextCreate_func
  74.     res := DllCall(TextCreate_func,Str,Font,Int,fontsize,UChar,bold,UChar,italic,Int,x,Int,y,UInt,color,Str,text,UChar,shadow,UChar,show)
  75.     return res
  76. }
  77.  
  78. TextDestroy(id)
  79. {
  80.     global TextDestroy_func
  81.     res := DllCall(TextDestroy_func,Int,id)
  82.     return res
  83. }
  84.  
  85. TextSetShadow(id, shadow)
  86. {
  87.     global TextSetShadow_func
  88.     res := DllCall(TextSetShadow_func,Int,id,UChar,shadow)
  89.     return res
  90. }
  91.  
  92. TextSetShown(id, show)
  93. {
  94.     global TextSetShown_func
  95.     res := DllCall(TextSetShown_func,Int,id,UChar,show)
  96.     return res
  97. }
  98.  
  99. TextSetColor(id,color)
  100. {
  101.     global TextSetColor_func
  102.     res := DllCall(TextSetColor_func,Int,id,UInt,color)
  103.     return res
  104. }
  105.  
  106. TextSetPos(id,x,y)
  107. {
  108.     global TextSetPos_func
  109.     res := DllCall(TextSetPos_func,Int,id,Int,x,Int,y)
  110.     return res
  111. }
  112.  
  113. TextSetString(id,Text)
  114. {
  115.     global TextSetString_func
  116.     res := DllCall(TextSetString_func,Int,id,Str,Text)
  117.     return res
  118. }
  119.  
  120. TextUpdate(id,Font,Fontsize,bold,italic)
  121. {
  122.     global TextUpdate_func
  123.     res := DllCall(TextUpdate_func,Int,id,Str,Font,int,Fontsize,UChar,bold,UChar,italic)
  124.     return res
  125. }
  126.  
  127. BoxCreate(x,y,width,height,Color,show)
  128. {
  129.     global BoxCreate_func
  130.     res := DllCall(BoxCreate_func,Int,x,Int,y,Int,width,Int,height,UInt,Color,UChar,show)
  131.     return res
  132. }
  133.  
  134. BoxDestroy(id)
  135. {
  136.     global BoxDestroy_func
  137.     res := DllCall(BoxDestroy_func,Int,id)
  138.     return res
  139. }
  140.  
  141. BoxSetShown(id,Show)
  142. {
  143.     global BoxSetShown_func
  144.     res := DllCall(BoxSetShown_func,Int,id,UChar,Show)
  145.     return res
  146. }
  147.    
  148. BoxSetBorder(id,height,Show)
  149. {
  150.     global BoxSetBorder_func
  151.     res := DllCall(BoxSetBorder_func,Int,id,Int,height,Int,Show)
  152.     return res
  153. }
  154.  
  155.  
  156. BoxSetBorderColor(id,Color)
  157. {
  158.     global BoxSetBorderColor_func
  159.     res := DllCall(BoxSetBorderColor_func,Int,id,UInt,Color)
  160.     return res
  161. }
  162.  
  163. BoxSetColor(id,Color)
  164. {
  165.     global BoxSetColor_func
  166.     res := DllCall(BoxSetColor_func,Int,id,UInt,Color)
  167.     return res
  168. }
  169.  
  170. BoxSetHeight(id,height)
  171. {
  172.     global BoxSetHeight_func
  173.     res := DllCall(BoxSetHeight_func,Int,id,Int,height)
  174.     return res
  175. }
  176.  
  177. BoxSetPos(id,x,y)
  178. {
  179.     global BoxSetPos_func  
  180.     res := DllCall(BoxSetPos_func,Int,id,Int,x,Int,y)
  181.     return res
  182. }
  183.  
  184. BoxSetWidth(id,width)
  185. {
  186.     global BoxSetWidth_func
  187.     res := DllCall(BoxSetWidth_func,Int,id,Int,width)
  188.     return res
  189. }
  190.  
  191. LineCreate(x1,y1,x2,y2,width,color,show)
  192. {
  193.     global LineCreate_func
  194.     res := DllCall(LineCreate_func,Int,x1,Int,y1,Int,x2,Int,y2,Int,Width,UInt,color,UChar,show)
  195.     return res
  196. }
  197.  
  198. LineDestroy(id)
  199. {
  200.     global LineDestroy_func
  201.     res := DllCall(LineDestroy_func,Int,id)
  202.     return res
  203. }
  204.  
  205. LineSetShown(id,show)
  206. {
  207.     global LineSetShown_func
  208.     res := DllCall(LineSetShown_func,Int,id,UChar,show)
  209.     return res
  210. }
  211.  
  212. LineSetColor(id,color)
  213. {
  214.     global LineSetColor_func
  215.     res := DllCall(LineSetColor_func,Int,id,UInt,color)
  216.     return res
  217. }
  218.  
  219. LineSetWidth(id, width)
  220. {
  221.     global LineSetWidth_func
  222.     res := DllCall(LineSetWidth_func,Int,id,Int,width)
  223.     return res
  224. }
  225.  
  226. LineSetPos(id,x1,y1,x2,y2)
  227. {
  228.     global LineSetPos_func
  229.     res := DllCall(LineSetPos_func,Int,id,Int,x1,Int,y1,Int,x2,Int,y2)
  230.     return res
  231. }
  232.  
  233. ImageCreate(path, x, y, rotation, align, show)
  234. {
  235.     global ImageCreate_func
  236.     res := DllCall(ImageCreate_func, Str, path, Int, x, Int, y, Int, rotation, Int, align, UChar, show)
  237.     return res
  238. }
  239.  
  240. ImageDestroy(id)
  241. {
  242.     global ImageDestroy_func
  243.     res := DllCall(ImageDestroy_func,Int,id)
  244.     return res
  245. }
  246.  
  247. ImageSetShown(id,show)
  248. {
  249.     global ImageSetShown_func
  250.     res := DllCall(ImageSetShown_func,Int,id,UChar,show)
  251.     return res
  252. }
  253.  
  254. ImageSetAlign(id,align)
  255. {
  256.     global ImageSetAlign_func
  257.     res := DllCall(ImageSetAlign_func,Int,id,Int,align)
  258.     return res
  259. }
  260.  
  261. ImageSetPos(id, x, y)
  262. {
  263.     global ImageSetPos_func
  264.     res := DllCall(ImageSetPos_func,Int,id,Int,x, Int, y)
  265.     return res
  266. }
  267.  
  268. ImageSetRotation(id, rotation)
  269. {
  270.     global ImageSetRotation_func
  271.     res := DllCall(ImageSetRotation_func,Int,id,Int, rotation)
  272.     return res
  273. }
  274.  
  275. DestroyAllVisual()
  276. {
  277.     global DestroyAllVisual_func
  278.     res := DllCall(DestroyAllVisual_func)
  279.     return res
  280. }
  281.  
  282. ShowAllVisual()
  283. {
  284.     global ShowAllVisual_func
  285.     res := DllCall(ShowAllVisual_func)
  286.     return res
  287. }
  288.  
  289. HideAllVisual()
  290. {
  291.     global HideAllVisual_func
  292.     res := DllCall(HideAllVisual_func )
  293.     return res
  294. }
  295.  
  296. GetFrameRate()
  297. {
  298.     global GetFrameRate_func
  299.     res := DllCall(GetFrameRate_func )
  300.     return res
  301. }
  302.  
  303. GetScreenSpecs(ByRef width, ByRef height)
  304. {
  305.     global GetScreenSpecs_func
  306.     res := DllCall(GetScreenSpecs_func, IntP, width, IntP, height)
  307.     return res
  308. }
  309.  
  310. SetCalculationRatio(width, height)
  311. {
  312.     global SetCalculationRatio_func
  313.     res := DllCall(SetCalculationRatio_func, Int, width, Int, height)
  314.     return res
  315. }
  316.  
  317. SetOverlayPriority(id, priority)
  318. {
  319.     global SetOverlayPriority_func
  320.     res := DllCall(SetOverlayPriority_func, Int, id, Int, priority)
  321.     return res
  322. }
  323.  
  324. RelToAbs(root, dir, s = "\") {
  325.     pr := SubStr(root, 1, len := InStr(root, s, "", InStr(root, s . s) + 2) - 1)
  326.         , root := SubStr(root, len + 1), sk := 0
  327.     If InStr(root, s, "", 0) = StrLen(root)
  328.         StringTrimRight, root, root, 1
  329.     If InStr(dir, s, "", 0) = StrLen(dir)
  330.         StringTrimRight, dir, dir, 1
  331.     Loop, Parse, dir, %s%
  332.     {
  333.         If A_LoopField = ..
  334.             StringLeft, root, root, InStr(root, s, "", 0) - 1
  335.         Else If A_LoopField =
  336.             root =
  337.         Else If A_LoopField != .
  338.             Continue
  339.         StringReplace, dir, dir, %A_LoopField%%s%
  340.     }
  341.     Return, pr . root . s . dir
  342. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top