|
You last visited: Today at 23:00
Advertisement
Fenster über Direct3d
Discussion on Fenster über Direct3d within the AutoIt forum part of the Coders Den category.
11/25/2011, 18:49
|
#1
|
elite*gold: 0
Join Date: Dec 2008
Posts: 1,304
Received Thanks: 485
|
Fenster über Direct3d
Hey,
ich bräuchte mal eure Hilfe für folgendes Problem:
Da ich, während ich LoL spiele, oft Technobase höre, will ich mir ein Programm schreiben, dass mir oben rechts den Name des aktuellen Lieds einblendet. Liedname rauskriegen ist kein Problem, darum geht es auch nicht. Erstmal mein aktueller Code:
Code:
#include <WindowsConstants.au3>
#include <WinAPI.au3>
#include <ButtonConstants.au3>
#include <GUIConstants.au3>
$gui = GUICreate("Test Windows regions", 396, 100, @Desktopwidth - 446, 100, $WS_POPUP, $WS_EX_TOPMOST)
$Pic1 = GUICtrlCreatePic(@Scriptdir & "/test.JPG", -1, 0, 396, 22)
$label = GUIctrlcreatelabel("TESTTESTTEST", 20, 5)
GuiCtrlSetColor($label, 0xAAAAFF)
GUICtrlSetBkColor($label, $GUI_BKCOLOR_TRANSPARENT)
GUISetState(@SW_SHOW)
$pos = WinGetPos($gui)
_GuiHole($gui, 0, 0, 150, 150)
While 1
WEnd
Func _GuiHole($h_win, $i_x, $i_y, $i_sizew, $i_sizeh)
Local $outer_rgn, $inner_rgn, $combined_rgn
$combined_rgn = _WinAPI_CreateRectRgn(0, 0, 0, 0)
_WinAPI_DeleteObject($outer_rgn)
_WinAPI_DeleteObject($inner_rgn)
_AddCtrlRegion($combined_rgn, $Pic1)
_WinAPI_SetWindowRgn($h_win, $combined_rgn)
EndFunc ;==>_GuiHole
Func _AddCtrlRegion($full_rgn, $ctrl_id)
Local $ctrl_pos, $ctrl_rgn
If IsArray($ctrl_id) Then
For $i = 0 To UBound($ctrl_id) -1
$ctrl_pos = ControlGetPos($gui, "", $ctrl_id[$i])
$ctrl_rgn = _WinAPI_CreateRectRgn($ctrl_pos[0], $ctrl_pos[1], $ctrl_pos[0] + $ctrl_pos[2], $ctrl_pos[1] + $ctrl_pos[3])
_WinAPI_CombineRgn($full_rgn, $full_rgn, $ctrl_rgn, $RGN_OR)
_WinAPI_DeleteObject($ctrl_rgn)
Next
Else
$ctrl_pos = ControlGetPos($gui, "", $ctrl_id)
$ctrl_rgn = _WinAPI_CreateRectRgn($ctrl_pos[0], $ctrl_pos[1], $ctrl_pos[0] + $ctrl_pos[2], $ctrl_pos[1] + $ctrl_pos[3])
_WinAPI_CombineRgn($full_rgn, $full_rgn, $ctrl_rgn, $RGN_OR)
_WinAPI_DeleteObject($ctrl_rgn)
EndIf
EndFunc ;==>_AddCtrlRegion
Soweit geht es auch, beim öffnen erscheint oben rechts das Pic + der Label, die beiden sind auch so gut wie immer im Vordergrund... nur leider bei LoL nicht, da LoL Direct3d verwendet und sich in den Vordergrund schiebt! Wenn ich per Alt+Tab die GUI aktiviere, ist sie zwar wieder zu sehen, aber ich kann logischer Weise nicht mehr spielen... habt ihr eine Idee, wie ich das Problem lösen könnte?
Gruß Reeek
|
|
|
11/25/2011, 22:05
|
#2
|
elite*gold: 0
Join Date: Jan 2008
Posts: 539
Received Thanks: 46
|
WinSetOnTop () hatte mir mal in einer ähnlichen Sache geholfen :P
|
|
|
11/25/2011, 22:52
|
#3
|
elite*gold: 0
Join Date: Dec 2008
Posts: 1,304
Received Thanks: 485
|
Bringt nichts, da es nur die topmost-flag des Fensters setzt, die aber eh schon auf 1 steht
kleines Update... mit der WinApi habe ich mal versucht, direkt einen Text zu "zeichnen". Klappt sogar, ist über dem LoL-Fenster obwohl es nicht aktiv ist. Leider schiebt sich das LoL-Fenster über die Schrift, wodurch die Schrift dauerhaft am blinken ist, also unsichtbar-sichtbar...
Script:
Code:
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <FontConstants.au3>
Global $tRECT, $hFont, $hOldFont, $hDC
HotKeySet("{ESC}", "_Exit")
$tRECT = DllStructCreate($tagRect)
DllStructSetData($tRECT, "Left", 5)
DllStructSetData($tRECT, "Top", 5)
DllStructSetData($tRECT, "Right", 300)
DllStructSetData($tRECT, "Bottom", 50)
$hDC = _WinAPI_GetDC(0)
$hFont = _WinAPI_CreateFont(50, 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)
; Kommentiere die nächste Zeile aus, um einen schwarzen statt transparenten Hintergrund zu erhalten.
_WinAPI_SetBkMode($hDC, $TRANSPARENT)
While 1
_WinAPI_DrawText($hDC, "www.autoit.de", $tRECT, $DT_CENTER)
sleep(5)
WEnd
Func _Exit()
_WinAPI_SelectObject($hDC, $hOldFont)
_WinAPI_DeleteObject($hFont)
_WinAPI_ReleaseDC(0, $hDC)
_WinAPI_InvalidateRect(0, 0)
$tRECT = 0
Exit
EndFunc ;==>_Exit
Je kleiner der Sleep, desto schneller flackert der Text und desto höher steigt die Prozessorleistung... mal sehen, was ich noch machen kann. Irgendwer Tipps?
|
|
|
 |
Similar Threads
|
Direct3D??
07/14/2011 - League of Legends - 20 Replies
hallo leute,
ich könnte hilfe gebrauchen ... unzwar hab ich meinen pc neu aufgesetzt und jetzt sagt der pc jedes mal wenn ich LoL starte dass direct3D nicht geladen werden konnte
hab schon 2 neue directX versionen runtergeladen und mein graka treiber ist auf dem neusten stand ;)
weiß jemand weiter?
|
BWH 1.5 - WOW Direct3D Hack for 1.7/1.8
07/04/2006 - WoW Exploits, Hacks, Tools & Macros - 208 Replies
BWH Anleitung
Bubba sei dank....
BWH 1.5 für version 1.7
have fun leute
:bandit:
link vergessen...peinlich ... :rolleyes:
|
BWH 1.4 - WOW Direct3D Hack for 1.5/1.6
02/27/2006 - WoW Exploits, Hacks, Tools & Macros - 186 Replies
Bubba:
Well I think I've worked out all the bugs that I know about. Hopefully it will work perfectly for everyone now. That's not very realistic though, so if you have problems then feel free to ask AFTER you have read the readme.
Sorry about the crappy download site... rapidshare is fubar right now.
Download:
http://rapidshare.de/files/2621901/bwh-1.4.rar.ht ml
|
bwh 1.4.b1 - Direct3D hack for wow 1.4.2
06/14/2005 - WoW Exploits, Hacks, Tools & Macros - 51 Replies
Update 1.4.b1
I'm releasing a beta verson of 1.4 because I believe it is currently useable. There are still a few odds and ends I want to tie up, but I don't have the time to mess with this now because I need to hit the books for finals. This is the so called "undetectable" version. This version is not any more detectable than an outside running program like mobius; in fact, in some ways it can be even less detectable than mobius if you don't leave the loader running.
First of all, this...
|
All times are GMT +1. The time now is 23:02.
|
|