|
You last visited: Today at 01:33
Advertisement
Autoit auf den Bildschirm "malen"
Discussion on Autoit auf den Bildschirm "malen" within the AutoIt forum part of the Coders Den category.
12/22/2010, 11:14
|
#1
|
elite*gold: 21
Join Date: Jan 2010
Posts: 1,904
Received Thanks: 462
|
Autoit auf den Bildschirm "malen"
Hi
ich wollte mal fragen wie es möglich ist mit Autoit auf den Bildschirm zu "malen"
Z.b Punkte oder sonstiges markieren und AutoIt "malt" an diese Stelle z.b. einen Punkt oder sonst etwas hin
Sollte in überwiegend jedem Programm gehen. Wie Firefox,IE und so
Wenn jemand ne Idee hat und sie postet wäre ich sehr dankbar
|
|
|
12/22/2010, 14:54
|
#2
|
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,254
|
gdi+
|
|
|
12/22/2010, 15:19
|
#3
|
elite*gold: 2
Join Date: Mar 2008
Posts: 1,778
Received Thanks: 1,222
|
Desktophandle herausfinden und los gehts ;O
|
|
|
12/22/2010, 17:21
|
#4
|
elite*gold: 9
Join Date: Dec 2009
Posts: 1,071
Received Thanks: 819
|
Entweder mit GDI+ :
oder mit der WinAPI. Einfach mal _winapi eingeben und die Befehlsliste angucken. Erklärt sich eigentlich von selbst. Sonst einfach die AutoIt Hilfe benutzen Viel Spaß
|
|
|
12/24/2010, 14:10
|
#5
|
elite*gold: 0
Join Date: Feb 2009
Posts: 53
Received Thanks: 20
|
Vielleicht hilft ja das hier:
Starten, und mit der Shift-Taste malen
Code:
#cs
GDI+ Example - Draw on Transparent & Click-Through GUI
by SEuBo, 24.12.2010
http://www.elitepvpers.com/forum/autoit/903693-autoit-auf-den-bildschirm-malen.html
#ce
#include <Misc.au3>
#include <GDIPlus.au3>
#include <WindowsConstants.au3>
;Variablen deklarieren
Local $hGUI, $hGraphics, $hBitmap, $hBackBuffer, $hPen
Local $hDLL, $aMPos, $aMPos_New
;GDI+ initialisieren, DLL für _IsPressed öffnen und ESC als HotKey festlegen
_GDIPlus_Startup()
$hDLL = DllOpen("user32.dll")
HotKeySet("{ESC}","_Exit")
;Transparente GUI erstellen
$hDummy = GUICreate("") ; Dummy GUI, damit richtiges nicht in Taskleiste auftaucht.
$hGUI = GUICreate("", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST,$WS_EX_TRANSPARENT),$hDummy)
GUISetBkColor(0xABCDEF, $hGUI)
_WinAPI_SetLayeredWindowAttributes($hGUI, 0xABCDEF, 255)
;Graphic-Objekt, Pinsel und Backbuffer erstellen und GUI anzeigen
$hPen = _GDIPlus_PenCreate(0xFFFF0000,4) ; Roten Pinsel mit Breite von 4 px.
$hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics(@DesktopWidth, @DesktopHeight, $hGraphics)
$hBackBuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
GUISetState()
While Sleep(10)
$aMPos = MouseGetPos()
While _IsPressed(10, $hDLL)
$aMPos_New = MouseGetPos()
;~ If Not IsArray($aMPos) Then $aMPos = $aMPos_New
If $aMPos[0] <> $aMPos_New[0] Or $aMPos[1] <> $aMPos_New[1] Then
_GDIPlus_GraphicsDrawLine($hBackBuffer, $aMPos[0], $aMPos[1], $aMPos_New[0], $aMPos_New[1],$hPen)
_GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
$aMPos = $aMPos_New
EndIf
WEnd
WEnd
Func _Exit()
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_PenDispose($hPen)
GUIDelete($hGUI)
Exit
EndFunc
|
|
|
12/24/2010, 16:37
|
#6
|
elite*gold: 2
Join Date: Mar 2008
Posts: 1,778
Received Thanks: 1,222
|
In die _Exit funktion noch _DllClose($hDLL) :P
|
|
|
All times are GMT +2. The time now is 01:33.
|
|