Beiträge von Darter
-
-
So Funktionierts !
Wie Seubo schon sage mit guigetmsg(1)
So wie du es aufgebaut hast ist es klar, dass er im ersten Fenster nichts mehr macht er ist ja auch nicht in der Schleife um das zu überprüfen. Also alles schön in einer Schleife machen und mit dem dem jeweligen Fensterhandle arbeiten. Ist recht unkompliziert, funktioniert einwandfrei und ist einfach die Beste Lösung mener meinung nachAutoBerts Idee ist auch nicht schlecht aber ich finde zu umständlich.
Spoiler anzeigen
[autoit]#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
#include <EditConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$gui1 = GUICreate('HauptGUI', 500, 300, -1, -1)
$gui1handle = WinGetHandle('HauptGUI')
$button1 = GUICtrlCreateButton('2. GUI', 20, 20, 100, 21)
GUISetState (@SW_SHOW)While 1
[/autoit] [autoit][/autoit] [autoit]
$msg = GUIGetMsg(1)
SelectCase $msg[0] = $button1 And $msg [1] = $gui1handle
[/autoit] [autoit][/autoit] [autoit]
profilfinder()
Case $msg[0] = $GUI_EVENT_CLOSE And $msg [1] = $gui1handle
Exit
Case $msg[0] = $GUI_EVENT_CLOSE And $msg [1] = $Form1_1handle
GUIDelete()
ExitLoop
Case $msg[0] = $Input1 And $msg [1] = $Form1_1handle
Case $msg[0] = $Input2 And $msg [1] = $Form1_1handle
Case $msg[0] = $Input3 And $msg [1] = $Form1_1handle
Case $msg[0] = $Input4 And $msg [1] = $Form1_1handle
Case $msg[0] = $Input5 And $msg [1] = $Form1_1handle
Case $msg[0] = $Input6 And $msg [1] = $Form1_1handle
Case $msg[0] = $Input7 And $msg [1] = $Form1_1handle
Case $msg[0] = $Input8 And $msg [1] = $Form1_1handle
Case $msg[0] = $Input9 And $msg [1] = $Form1_1handle
Case $msg[0] = $Profil_finden And $msg [1] = $Form1_1handle
;~ profilliste()
Case $msg[0] = $Abbrechen And $msg [1] = $Form1_1handle
EndSelect
WEndFunc profilfinder()
[/autoit] [autoit][/autoit] [autoit]$Form1_1 = GUICreate("Profilsuche", 974, 718, -1, -1, BitOR($WS_SIZEBOX, $WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_GROUP, $WS_CLIPSIBLINGS, $ES_AUTOHSCROLL, $ES_AUTOVSCROLL))
[/autoit] [autoit][/autoit] [autoit]
$Form1_1handle = WinGetHandle("Profilsuche")
$MenuItem4 = GUICtrlCreateMenu("&Datei")
$MenuItem3 = GUICtrlCreateMenu("&Bearbeiten")
$MenuItem2 = GUICtrlCreateMenu("&Optionen")
$MenuItem1 = GUICtrlCreateMenu("&Hilfe")
GUISetIcon("N:\neu.exe")
GUISetBkColor(0xFFFFFF)
GUICtrlSetResizing(-1, $GUI_DOCKALL)$Text_Progname = GUICtrlCreateLabel("Profilsuche", 282, 48, 314, 30)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetFont(-1, 16, 800, 0, "MS Reference Sans Serif")
GUICtrlSetColor(-1, 0x000080)$Pic1 = GUICtrlCreatePic(@ScriptDir & "\ESCO_2.l", 39, 39, 121, 40, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlSetResizing(-1, $GUI_DOCKALL)$Pic2 = GUICtrlCreatePic("N:\profil.bmp", 3, 153, 956, 502, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlSetResizing(-1, $GUI_DOCKALL)$Label1 = GUICtrlCreateLabel("Geben Sie bitte die benötigten Maße an:", 12, 129, 195, 17)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetResizing(-1, $GUI_DOCKALL)$Input1 = GUICtrlCreateInput("Flügel BT", 6, 327, 85, 21, BitOR($ES_CENTER, $ES_AUTOHSCROLL, $ES_NUMBER, $WS_BORDER))
[/autoit]
GUICtrlSetBkColor(-1, 0xFFFF00)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Input2 = GUICtrlCreateInput("Überschl. Breite", 519, 591, 85, 21, BitOR($ES_CENTER, $ES_AUTOHSCROLL, $ES_NUMBER, $WS_BORDER))
GUICtrlSetBkColor(-1, 0xFFFF00)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Input3 = GUICtrlCreateInput("Bl.R. Freimaß", 642, 591, 85, 21, BitOR($ES_CENTER, $ES_AUTOHSCROLL, $ES_NUMBER, $WS_BORDER))
GUICtrlSetBkColor(-1, 0xFFFF00)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Input4 = GUICtrlCreateInput("Überschl.Überd.", 564, 555, 85, 21, BitOR($ES_CENTER, $ES_AUTOHSCROLL, $ES_NUMBER, $WS_BORDER))
GUICtrlSetBkColor(-1, 0xFFFF00)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Input5 = GUICtrlCreateInput("Kammermaß", 516, 393, 85, 21, BitOR($ES_CENTER, $ES_AUTOHSCROLL, $ES_NUMBER, $WS_BORDER))
GUICtrlSetBkColor(-1, 0xFFFF00)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Input6 = GUICtrlCreateInput("Rahmen BT", 834, 306, 85, 21, BitOR($ES_CENTER, $ES_AUTOHSCROLL, $ES_NUMBER, $WS_BORDER))
GUICtrlSetBkColor(-1, 0xFFFF00)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Input7 = GUICtrlCreateInput("Beschlagachse", 879, 420, 85, 21, BitOR($ES_CENTER, $ES_AUTOHSCROLL, $ES_NUMBER, $WS_BORDER))
GUICtrlSetBkColor(-1, 0xFFFF00)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Input8 = GUICtrlCreateInput("Falzluft", 516, 360, 85, 21, BitOR($ES_CENTER, $ES_AUTOHSCROLL, $ES_NUMBER, $WS_BORDER))
GUICtrlSetBkColor(-1, 0xFFFF00)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Input9 = GUICtrlCreateInput("Überschl.höhe", 627, 471, 85, 21, BitOR($ES_CENTER, $ES_AUTOHSCROLL, $ES_NUMBER, $WS_BORDER))
GUICtrlSetBkColor(-1, 0xFFFF00)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Profil_finden = GUICtrlCreateButton("Profil finden", 21, 585, 99, 25, $WS_GROUP)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Abbrechen = GUICtrlCreateButton("Abbrechen", 129, 585, 99, 25, $WS_GROUP)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUISetState(@SW_SHOW)
EndFunc ;==>profilfinderLG Darter
-
Ah ok erst mal thx.
Aber leider ist das Scrip da groß und ich weiß nicht genau was das GUI transparen und waum es transparent wird.Ich denke mal das ist wohl der teil der das ganze mach oder
ist daraus: https://autoit.de/index.php?page=Thread&threadID=15293
zweiter SpoilerSpoiler anzeigen
[autoit]Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]
$hwnd = GUICreate($title, $width, $height, -1, -1, 0, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST))
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]
$graphics = _GDIPlus_GraphicsCreateFromHWND($hwnd)
$bitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $graphics)
$backbuffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
_GDIPlus_GraphicsSetSmoothingMode($backbuffer, 2)$ScreenDc = _WinAPI_GetDC($hWnd)
[/autoit] [autoit][/autoit] [autoit]
$gdibitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($bitmap)
$dc = _WinAPI_CreateCompatibleDC($ScreenDc)
_WinAPI_SelectObject($dc, $gdibitmap)
; _WinAPI_UpdateLayeredWindow parameters
$tSize = DllStructCreate($tagSIZE)
$pSize = DllStructGetPtr($tSize)
DllStructSetData($tSize, "X", $width)
DllStructSetData($tSize, "Y", $height)
$tSource = DllStructCreate($tagPOINT)
$pSource = DllStructGetPtr($tSource)
$tBlend = DllStructCreate($tagBLENDFUNCTION)
$pBlend = DllStructGetPtr($tBlend)
Global $alpha = 200
Global $alpha_steps = 5
DllStructSetData($tBlend, "Alpha", $alpha)
DllStructSetData($tBlend, "Format", 1)
$tPoint = DllStructCreate($tagPOINT)
$pPoint = DllStructGetPtr($tPoint)
DllStructSetData($tPoint, "X", 0)
DllStructSetData($tPoint, "Y", 0)GUISetState()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit]Du als Meister für alles kannst mir doch mit sicherheit erklären, was was macht oder?
-
Hey danke erst mal aber bringt mir ja überhaupt nix. ich möchte das ganze nicht in einem extra Fenster haben sondern direkt auf den Desktop zeichnen(wie ich oben schon gesagt hab)
Nur hab ich eben probleme bei dem Aktualisiern, sodass das Bild wieder verschwindet(hab ich auch oben beschrieben) -
Moin ich wollte ein Bild in mein Programm einfliegen lassen, nur ich habe das Problem:
Ich Zeichne ja im Prinzip immer Einzellbilder auf den Desktop und schon hab ich das Problem ich weiß nicht wie ich den destop immer wieder aktualisieren soll, denn die Einzellbilder bleiben ja immer da.hier mal das was ich ich hab.
Spoiler anzeigen
[autoit]#include <WindowsConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <WinAPI.au3>
#Include <GDIPlus.au3>
#Include <ScreenCapture.au3>HotKeySet("{ESC}","_exit")
[/autoit] [autoit][/autoit] [autoit]Global $x, $y
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$x = 0
$y = 0
$xb = 0
$yb = 0_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]
$win = _WinAPI_GetDesktopWindow()
$hDC = _WinAPI_GetWindowDC(0) ; Gerätekontext (DC) des gesamten Bildschirms (Desktop)
$GHandle = _GDIPlus_GraphicsCreateFromHDC($hDC)
$hBitmap = _GDIPlus_BitmapCreateFromFile("Bilder\reiszwecke.ico")
$screenhandle = _ScreenCapture_Capture()
$screenhandle2 = _GDIPlus_BitmapCreateFromHBITMAP($screenhandle)For $i = 1 To 10
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_GraphicsDrawImageRect($GHandle, $hBitmap, 500 +$x , 500 + $y, 100 + $xb, 100 + $yb)
$x += 50
$y += 50
$xb -= 5
$yb -= 5
Sleep(100)
Next_GDIPlus_GraphicsDispose($GHandle)
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_Shutdown()
_WinAPI_RedrawWindow($win, 0, 0, $RDW_INVALIDATE + $RDW_ALLCHILDREN);; damit hab ich es Probiert funzt aber nichtFunc _exit()
[/autoit]
exit
EndFunc -
Ok danke schon mal aber wie genau mach ich das?
-
Nabend
Ich habe gehört, dass man seine eigenen UDF´s in die Registery eintragen kann, Sodass bei den eigene Funktioen auch ein tooltip auftauch und diese auch hellblau sind wie die "richtigen" UDF´s.
Daraufhin hab ich etwas in den Autoit oder herumgestöbert und bin auch die datei :au3.api(AutoIt3\SciTE\api) gestoßen.
Für mich sieht es so aus als ob da alel UDF´s definiert sind.
Dann habe ich einfach versucht eine Funktion einzutragen. Da kam dann der Fehler, dass diese Datei zurzeit von einem anderen programm benutzt wird. natürlich habe ich alle Autoit Programme zu
Weiß einer woran das liegt oder bin ich da überhaupt im richitgen verzeichniss?mfg
-
Moin
ich hab ein Problem. Ich möchte ein skript erstellen, welches nach einstellbarer zeit z.B. 10 min eine Vorgegebene Taste der Tastatur drück.
weiß da einer was??