[Hilfe (F1) > User Defined Functions Reference > SQLite Management (SQLite user defined functions Reference)]
Beiträge von HopFail
-
-
Was mir auffällt ist, das du_GDIPlus_Startup viel zu spät aufrufst. Du benutzt _GDIPlus_ImageLoadFromFile schon vorher.
Ich hab das gestern neu geordnet und nicht bemerkt.
Danke, jetzt kommt die Fehlermeldung nicht mehr
Nur jetzt sieht man die Bilder nicht mehr (Background + Roten Balloon)
-
Da hast du nichts mit GDI+ gemacht oder?
Wenn nicht, was ist der ModName bei deiner Fehlermeldung? -
Hey,
ich habe gestern spaßeshalber den SmoothingMode auf weiß ich was hoch gestellt.
Nun meldet AutoIt beim Ausführen des Skripts immer folgenden Fehler:Fehlermeldung
Der Inhalt kann nicht angezeigt werden, da er nicht mehr verfügbar ist.
autoit3.exe hat ein Problem festgestellt und muss beendet werden (ModName: gdiplus.dll)Fehler
- _GDIPlus_Startup() wurde nach dem Verwenden von GDIPlus-Funktionen gesetzt
Fehlerskript
[autoit]#include <GDIPlus.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]
OnAutoItExitRegister("_Exit"); Variablen ============================================================================
[/autoit] [autoit][/autoit] [autoit]Global $iWidth = 500, $iHeight = 600
[/autoit] [autoit][/autoit] [autoit]
Global $iX = 0, $iY = 0
Global $hBackground = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\background.png")
Global $balloon_red = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\balloon_red.png")
Global $balloon_green = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\balloon_green.png")
Global $balloon_blue = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\balloon_blue.png")
Global $balloon_yellow = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\balloon_yellow.png")
Global $balloon_pink = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\balloon_pink.png")
Global $balloonX = Random(0,450)
Global $balloonY = 0; GUI ============================================================================
[/autoit] [autoit][/autoit] [autoit]$hGUI = GUICreate("TrapTheBalloon",$iWidth,$iHeight)
[/autoit] [autoit][/autoit] [autoit]
$hWnd = WinGetHandle("TrapTheBalloon")
GUISetState()
GUISetOnEvent(-3, "_Exit")
GUIRegisterMsg(0x000F, "WM_PAINT"); GDI+ ============================================================================
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
;Erstmal das normale Grafik-Objekt erstellen.
$hBitmap = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hGraphic)
;Statt uns mit dem normalen Frontbuffer zufrieden zu geben, erstellen wir erstmal eine
;Bitmap, mit Bezug auf unser Grafikobjekt.
$hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
;Nachdem unser Bitmap erstellt ist, holen wir uns den Graphics Context. Dieser
;wird von uns verwendet, um darin zu zeichnen
_GDIPlus_GraphicsSetSmoothingMode($hBackBuffer, 2); While-Schleife ============================================================================
[/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_GraphicsClear($hBackbuffer)
[/autoit] [autoit][/autoit] [autoit]
; Superradierer benutzen um alten Backbuffer zu löschen
_GDIPlus_GraphicsDrawRect($hBackbuffer,50,50,100,150)
_WinAPI_RedrawWindow($hWnd, 0, 0,$RDW_INTERNALPAINT)
; WM_PAINT wird nur aufgerufen, wenn alle Berechnungen fertig sind!
; In WM_PAINT wird selbst nichts berechnet, oder gezeichnet. diese Funktion wird nur das
; Bitmap-Objekt in das Grafik-Objekt übertragen.
WEnd; Funktionen ============================================================================
[/autoit] [autoit][/autoit] [autoit]Func _Exit() ; Clean up resources
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
_GDIPlus_GraphicsDispose($hGraphic) ; Grafikobjekt auflösen
_GDIPlus_BitmapDispose($hBitmap); Bitmap auflösen
_GDIPlus_ImageDispose($balloon_red); Bild auflösen
_GDIPlus_ImageDispose($balloon_green); Bild auflösen
_GDIPlus_ImageDispose($balloon_blue); Bild auflösen
_GDIPlus_ImageDispose($balloon_yellow); Bild auflösen
_GDIPlus_ImageDispose($balloon_pink); Bild auflösen
_GDIPlus_ImageDispose($hBackground); Bild auflösen
_GDIPlus_Shutdown() ; GDI+ Engine beenden
Exit
EndFunc ;==>_ExitFunc WM_PAINT()
[/autoit]
_GDIPlus_GraphicsDrawImageRect($hBackbuffer, $hBackground, 0, 0, $iWidth, $iHeight)
_GDIPlus_GraphicsDrawImage($hBackbuffer, $balloon_red, 50, 50)
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, $iX, $iY, $iWidth, $iHeight)
; _GDIPlus_GraphicsDrawImageRect() überträgt den Backbuffer in den Frontbuffer.
; Der erste Parameter ist unser Frontbuffer (Grafik Objekt).
; Der zweite ist unsere Bitmap, welche ja als BackBuffer fungiert.
; Darauf folgt der Abschnitt den man übertragen will.
; i.d.R. ist es 0, 0 für X und Y koordinaten, und die GUI Breite und Höhe für
; Width und Height. Kommt natürlich immer drauf an, wie groß euer Grafikobjekt ist,
; und ob ihr den vollen Teil zeichnen wollt.
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_PAINTLösung
- _GDIPlus_Startup() richtig gesetzt
Korrektes Skript
[autoit]#include <GDIPlus.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]
OnAutoItExitRegister("_Exit")
_GDIPlus_Startup(); Variablen ============================================================================
[/autoit] [autoit][/autoit] [autoit]Global $iWidth = 500, $iHeight = 600
[/autoit] [autoit][/autoit] [autoit]
Global $iX = 0, $iY = 0
Global $hBackground = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\background.png")
Global $balloon_red = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\balloon_red.png")
Global $balloon_green = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\balloon_green.png")
Global $balloon_blue = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\balloon_blue.png")
Global $balloon_yellow = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\balloon_yellow.png")
Global $balloon_pink = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\balloon_pink.png")
Global $balloonX = Random(0,450)
Global $balloonY = 0; GUI ============================================================================
[/autoit] [autoit][/autoit] [autoit]$hGUI = GUICreate("TrapTheBalloon",$iWidth,$iHeight)
[/autoit] [autoit][/autoit] [autoit]
$hWnd = WinGetHandle("TrapTheBalloon")
GUISetState()
GUISetOnEvent(-3, "_Exit")
GUIRegisterMsg(0x000F, "WM_PAINT"); GDI+ ============================================================================
[/autoit] [autoit][/autoit] [autoit]$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
[/autoit] [autoit][/autoit] [autoit]
;Erstmal das normale Grafik-Objekt erstellen.
$hBitmap = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hGraphic)
;Statt uns mit dem normalen Frontbuffer zufrieden zu geben, erstellen wir erstmal eine
;Bitmap, mit Bezug auf unser Grafikobjekt.
$hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
;Nachdem unser Bitmap erstellt ist, holen wir uns den Graphics Context. Dieser
;wird von uns verwendet, um darin zu zeichnen
_GDIPlus_GraphicsSetSmoothingMode($hBackBuffer, 2); While-Schleife ============================================================================
[/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_GraphicsClear($hBackbuffer)
[/autoit] [autoit][/autoit] [autoit]
; Superradierer benutzen um alten Backbuffer zu löschen
_GDIPlus_GraphicsDrawImageRect($hBackbuffer, $hBackground, 0, 0, $iWidth, $iHeight)
_GDIPlus_GraphicsDrawImage($hBackbuffer, $balloon_red, 50, 50)
_WinAPI_RedrawWindow($hWnd, 0, 0,$RDW_INTERNALPAINT)
; WM_PAINT wird nur aufgerufen, wenn alle Berechnungen fertig sind!
; In WM_PAINT wird selbst nichts berechnet, oder gezeichnet. diese Funktion wird nur das
; Bitmap-Objekt in das Grafik-Objekt übertragen.
WEnd; Funktionen ============================================================================
[/autoit] [autoit][/autoit] [autoit]Func _Exit() ; Clean up resources
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
_GDIPlus_GraphicsDispose($hGraphic) ; Grafikobjekt auflösen
_GDIPlus_BitmapDispose($hBitmap); Bitmap auflösen
_GDIPlus_ImageDispose($balloon_red); Bild auflösen
_GDIPlus_ImageDispose($balloon_green); Bild auflösen
_GDIPlus_ImageDispose($balloon_blue); Bild auflösen
_GDIPlus_ImageDispose($balloon_yellow); Bild auflösen
_GDIPlus_ImageDispose($balloon_pink); Bild auflösen
_GDIPlus_ImageDispose($hBackground); Bild auflösen
_GDIPlus_Shutdown() ; GDI+ Engine beenden
Exit
EndFunc ;==>_ExitFunc WM_PAINT()
[/autoit]
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, $iX, $iY, $iWidth, $iHeight)
; _GDIPlus_GraphicsDrawImageRect() überträgt den Backbuffer in den Frontbuffer.
; Der erste Parameter ist unser Frontbuffer (Grafik Objekt).
; Der zweite ist unsere Bitmap, welche ja als BackBuffer fungiert.
; Darauf folgt der Abschnitt den man übertragen will.
; i.d.R. ist es 0, 0 für X und Y koordinaten, und die GUI Breite und Höhe für
; Width und Height. Kommt natürlich immer drauf an, wie groß euer Grafikobjekt ist,
; und ob ihr den vollen Teil zeichnen wollt.
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_PAINTDie gdiplus.dll habe ich auch schon ersetzt, hat nichts gebracht.
Weiß einer, wie ich das lösen kann?Edit: Präfix "gelöst" gesetzt, korrektes Skript oben
-
-
xD ich liebe euch. (und muss jetzt auch los).
-
Lol, ich habe das einmal falsch geschrieben und kopiert

Aber das ändert auch nichts am Problem
Trotzdem danke. -
Alles anzeigen
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]
OnAutoItExitRegister("_Exit")_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]Global $iWidth = 500, $iHeight = 600
[/autoit] [autoit][/autoit] [autoit]
Global $iX = 0, $iY = 0
$hGUI = GUICreate("TrapTheBalloon",$iWidth,$iHeight)
$hWnd = WinGetHandle("TrapTheBalloon")
GUISetState()
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
;Erstmal das normale Grafik-Objekt erstellen.
$hBitmap = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hGraphic)
;Statt uns mit dem normalen Frontbuffer zufrieden zu geben, erstellen wir erstmal eine
;Bitmap, mit Bezug auf unser Grafikobjekt.
$hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
;Nachdem unser Bitmap erstellt ist, holen wir uns den Graphics Context. Dieser
;wird von uns verwendet, um darin zu zeichnen
$red = 0xFFFF0000
$green = 0xFF00FF00
$blue = 0xFF0000FF
$yellow = 0xFFFFFF00
$pink = 0xFFFF1493
Global $hBackground = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\background.png")
Global $balloon_red = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\ballon_red.png")
Global $balloon_green = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\ballon_green.png")
Global $balloon_blue = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\ballon_blue.png")
Global $balloon_yellow = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\ballon_yellow.png")
Global $balloon_pink = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\graphics\ballon_pink.png")
_GDIPlus_GraphicsDrawEllipse($hBitmap,50,60,50,60,$red)
GUISetOnEvent(-3, "_Exit")While 1
[/autoit] [autoit][/autoit] [autoit]
_WinAPI_RedrawWindow($hWnd, 0, 0,$RDW_INTERNALPAINT)
_GDIPlus_GraphicsClear($hBackbuffer)
_GDIPlus_GraphicsDrawImage($hBackbuffer, $balloon_red, 50, 50)
_gdiplus_graphicsdrawimagerect($hGraphic,$hBitmap,0,0,$iWidth,$iHeight)
; WM_PAINT wird nur aufgerufen, wenn alle Berechnungen fertig sind!
; In WM_PAINT wird selbst nichts berechnet, oder gezeichnet. diese Funktion wird nur das
; Bitmap-Objekt in das Grafik-Objekt übertragen.
Sleep(1000)
WEndFunc _Exit() ; Clean up resources
[/autoit]
_GDIPlus_GraphicsDispose($hGraphic) ; Grafikobjekt auflösen
_GDIPlus_BitmapDispose($hBitmap); Bitmap auflösen
_GDIPlus_ImageDispose($balloon_red); Bild auflösen
_GDIPlus_ImageDispose($balloon_green); Bild auflösen
_GDIPlus_ImageDispose($balloon_blue); Bild auflösen
_GDIPlus_ImageDispose($balloon_yellow); Bild auflösen
_GDIPlus_ImageDispose($balloon_pink); Bild auflösen
_GDIPlus_ImageDispose($hBackground); Bild auflösen
_GDIPlus_Shutdown() ; GDI+ Engine beenden
Exit
EndFunc ;==>_ExitDu hast öfter den Backbuffer gelöscht, bevor er auch nur auf das Fenster gemalt werden konnte.
Ich habe es jetzt auch ohne die letzte Funktion gemachtJetzt habe ich einen schwarzen Hintergund und keinen Ballon (Ellipse)?
-
Alles anzeigen
auserdem müsste das ganze script umgeschriben werden
also statt _GdiPlus_GraphicsDrawImage()
müsste man imma _GdiPlus_GraphicsDrawImageRect() schreiben und dan noch die bildgröße angeben
wenste willst kannstes gerne machen nur der aufwand is mir zur zeit leider zu vielähmm und wegen dem php des gästebuchs
ich häng da grad n bissel
ich werd heute abend ma schaun was sich ändern lässtMan merkt, dass du wenig Zeit hast

-
Danke, aber das macht auch keinen Unterschied

-
Alles anzeigen
hab's mir gedownloadet...
Sehr gute Arbeit würd ich mal sagen
Ich glaub ich habe einen kleinen Bug gefunden...
Ich hatte gerade diese Springerstiefel bekommen,
und bin direkt danach Tod gegangen...
anschließend bin ich im nächsten Spiel mit den Stiefeln gestartet...
Hat mich verwirrt...ist das normal?
Gruß,
Buckiuxx
Vielleicht updaten?
-
-
wieso wäre doch ganz cool
Lass uns hören was die Entwickler dazu sagen

-
Vll so ?
[autoit]; == Fenster Modus
[/autoit]
If WinWaitActive("Name") Then
$X = @DesktopHeight
$Y =@DesktopWidth
WinMove ( "Namet", "", 0, 0, $X, $Y )
EndIfDas ist mir schon klar, dass das geht. Nur das würde Anpassung erfordern und zerstört zudem das Aussehen.
-
mfg Ubuntu
Ich weiß ich weiß...
Es gibt aber immer noch ein paar Dateien (die in dem Archiv), die das Programm nicht brauchbar machen kann.Edit: Ich merke gerade, dass nur die Game-Tiles alle nicht geöffnet werden können. Der Rest ist bearbeitbar.
Noch eine Frage: Wird das Script an die Bilder angepasst, oder die Bilder an das Script? -
Neulinging hat ja mal eine Sammlung reingestellt, ich brauche nur eine "bearbeitbare" Version von folgenden Dateien, um die Bilder reinzustellen.
http://www.file-upload.net/download-25368…ateien.rar.html
Dateigröße: 1587 Kbyte -
wie wärs wenn man in den optionen noch vollbild einstellen könnte

Wie willst du das denn machen?
-
Wenn du meinst, fiel mir nur grade so auf ;D
-
Habe noch einen Vorschlag:
Für mehr Übersicht sollte ein Thread für Bugs erstellt werden.
-
In der Hilfe (F1) sind unter [Function Reference > Network Management] mehrere TCP- Befehle erklärt. Schau dir das mal an.