#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <FontConstants.au3>
Global $tRECT, $hFont, $hOldFont, $hDC, $hWnd
HotKeySet("{ESC}", "_Exit")
HotKeySet("#!{LEFT}", "MoveText")
HotKeySet("#!{RIGHT}", "MoveText")
HotKeySet("#!{UP}", "MoveText")
HotKeySet("#!{DOWN}", "MoveText")
$tRECT = DllStructCreate($tagRect)
DllStructSetData($tRECT, "Left", 500) ; <= Координаты
DllStructSetData($tRECT, "Top", 100) ; <= относительно
DllStructSetData($tRECT, "Right", 900) ; <= левого верхнего
DllStructSetData($tRECT, "Bottom", 200) ; <= угла нужного окна
$Step = 10 ; <= Смещение в пикселях
$hWnd = WinGetHandle("[class:SciTEWindow]") ; <= Нужное окно
While 1
$hDC = _WinAPI_GetWindowDC($hWnd)
$hFont = _WinAPI_CreateFont(32, 0, 0, 0, 400, False, False, False, $DEFAULT_CHARSET, _ ; <= Атрибуты
$OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $DEFAULT_QUALITY, 0, 'Arial') ; <= текста
$hOldFont = _WinAPI_SelectObject($hDC, $hFont)
_WinAPI_SetTextColor($hDC, 0x0000FF) ; <= Цвет текста
_WinAPI_SetBkColor($hDC, 0x000000) ; <= Цвет фона
_WinAPI_SetBkMode($hDC, $TRANSPARENT) ; <= Прозрачный фон
_WinAPI_DrawText($hDC, "Вот бы тут такой текст забабахать с привязкой к положению окна", $tRECT, $DT_WORDBREAK) ; <= Сам текст и методы форматирования
_WinAPI_SelectObject($hDC, $hOldFont)
_WinAPI_DeleteObject($hFont)
_WinAPI_ReleaseDC(0, $hDC)
Sleep(10)
WEnd
Func _Exit()
_WinAPI_InvalidateRect(0)
$tRECT = 0
Exit
EndFunc ;==>_Exit
Func MoveText()
Switch @HotKeyPressed
Case "#!{LEFT}"
DllStructSetData($tRECT, "Left", DllStructGetData($tRECT, "Left") - $Step)
DllStructSetData($tRECT, "Right", DllStructGetData($tRECT, "Right") - $Step)
Case "#!{RIGHT}"
DllStructSetData($tRECT, "Left", DllStructGetData($tRECT, "Left") + $Step)
DllStructSetData($tRECT, "Right", DllStructGetData($tRECT, "Right") + $Step)
Case "#!{UP}"
DllStructSetData($tRECT, "Top", DllStructGetData($tRECT, "Top") - $Step)
DllStructSetData($tRECT, "Bottom", DllStructGetData($tRECT, "Bottom") - $Step)
Case "#!{DOWN}"
DllStructSetData($tRECT, "Top", DllStructGetData($tRECT, "Top") + $Step)
DllStructSetData($tRECT, "Bottom", DllStructGetData($tRECT, "Bottom") + $Step)
EndSwitch
_WinAPI_InvalidateRect(0)
EndFunc