Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 01:33

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Autoit auf den Bildschirm "malen"

Discussion on Autoit auf den Bildschirm "malen" within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
TheAldi's Avatar
 
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
TheAldi is offline  
Old 12/22/2010, 14:54   #2
 
omer36's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,254
gdi+
omer36 is offline  
Old 12/22/2010, 15:19   #3
 
PenGuin :O's Avatar
 
elite*gold: 2
Join Date: Mar 2008
Posts: 1,778
Received Thanks: 1,222
Desktophandle herausfinden und los gehts ;O
PenGuin :O is offline  
Thanks
1 User
Old 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ß
.Infinite is offline  
Thanks
1 User
Old 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
Shkal is offline  
Old 12/24/2010, 16:37   #6
 
PenGuin :O's Avatar
 
elite*gold: 2
Join Date: Mar 2008
Posts: 1,778
Received Thanks: 1,222
In die _Exit funktion noch _DllClose($hDLL) :P
PenGuin :O is offline  
Reply


Similar Threads Similar Threads
Kann mir bitte jemmand eine Hmachi HP erstellen """""SOS HELP""""
09/15/2010 - Metin2 Private Server - 11 Replies
SO wie der Titel schon sagt ich suche einen der mir per Teamviwer eine hp machen kann habe schon alles ausprobiert aber es klappt nie!!!! PLS HELP...
MIT WELCHEN PROGRAMM KANN MAN AM BESTEN EIGENE WAFFEN/RÜSSIS "MALEN"
05/13/2010 - Metin2 Private Server - 0 Replies
ICH möchte eig waffen "malen" mit welchen programm geht das denn am besten=



All times are GMT +2. The time now is 01:33.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.