hey,
ist zwar mein 1. post und gleich ne frage (was bestimmt nicht so gut ankommt) aber ich frag trotzdem ma ![]()
mein problem ist das ich mit winapi in dem grad offenen fenster einen text zeichnen will mit _WinAPI_DrawText
aber bekomme immer fehlermeldungen wenn ich das versuche
hier mal ein script von mir
[autoit]#cs ----------------------------------------------------------------------------
[/autoit][autoit][/autoit][autoit]AutoIt Version: 3.2.10.0
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
[/autoit][autoit][/autoit][autoit]; Script Start - Add your code below here
[/autoit][autoit][/autoit][autoit]#include <WinAPI.au3>
while 1
$tagRECT = "int Left;int Top;int Right;int Bottom"
$sText= "HALLO SIEHST DU MICH ODER NICHT?"
$foreground = _WinAPI_GetForegroundWindow()
$hdc= _WinAPI_GetDC($foreground)
[/autoit][autoit][/autoit][autoit]_WinAPI_DrawText($hdc,$sText,$tagRECT,$DT_CENTER)
sleep(1)
WEnd
aber immer kommt diese fehlermeldung
E:\F\AutoIt v3 Script (neu).au3(15,51) : ERROR: $tagRECT previously declared as a 'Const'
$tagRECT = "int Left;int Top;int Right;int Bottom"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\F\AutoIt v3 Script (neu).au3(22,49) : ERROR: _WinAPI_DrawText() called with Const or expression on ByRef-param(s).
_WinAPI_DrawText($hdc,$sText,$tagRECT,$DT_CENTER)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files (x86)\AutoIt3\Include\WinAPI.au3(971,59) : REF: definition of _WinAPI_DrawText().
Func _WinAPI_DrawText($hDC, $sText, ByRef $tRect, $iFlags)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\F\AutoIt v
3 Script (neu).au3 - 2 error(s), 0 warning(s)
Alles anzeigen
hoffe ihr helft mir auch wenn es mein 1. post ist ![]()