Eine Lösung hätte ich eventuell: http://danbystrom.se/2009/01/12/thu…lection-in-gdi/ (Punkt 3)
Vielen Dank!
Werde ich mir anschauen und versuchen zu verstehen!
Gruß,
UEZ
Eine Lösung hätte ich eventuell: http://danbystrom.se/2009/01/12/thu…lection-in-gdi/ (Punkt 3)
Vielen Dank!
Werde ich mir anschauen und versuchen zu verstehen!
Gruß,
UEZ
_GDIPlus_DrawImagePoints kann nur Parallelogramme erstellen und keine Trapeze, daher geht eine richtige 3D-Darstellung wohl nicht. Eventuel funktioniert es mit Matrizen besser.
Ich weiß und genau dort liegt der Hase begraben! Ob und wie das mit Matrizen funktionert, weiß ich noch nicht.
Mal schauen...
Gruß,
UEZ
Das Problem mit dem Fenster tritt auch unter WinXP SP3 auf!
Nützliches Tool für meine Tochter! Sie wird jetzt bei YouTube einiges umwandeln... ![]()
Gruß,
UEZ
Cool! ![]()
Wenn jetzt noch ein "Undo" möglich wäre, könnte man sich das Laden immer ersparen, um die Effekte auszuprobieren!
Bei einer PNG schmiert das Skript ab!
Gruß,
UEZ
Hallo AutoBert,
wie funktioniert dein Tool? Wie kann ich den YouTube Link einfügen?
Folgenden Dinge sind mir noch aufgefallen:
Gruß,
UEZ
Du kannst auch "manuell" ein AU3 Code kompilieren!
Dazu benötigst du folgende Dateien:
Kompilieren kannst du wie folgt in einer CMD: AutoIt3Wrapper.exe /in [script.au3]
Ich hoffe, dass hilft dir!
Gruß,
UEZ
Hier mein Feedback zu Apfelmaennchen_fasm_bytecode:
Gruß,
UEZ
Die Idee ging mir schon lange durch den Kopf, weil ich für AUTOITEROIDS das Outro so machen wollte, nur das Füllen von perspektivisch korrekten Flächen ist leider nur über Umwege anscheinend möglich. ![]()
Klasse gemacht - läuft sauber auf meinem Vista x32 Notebook bei einer Auflösung von 1920x1200!
Da bin ich wohl nicht der einzig GDI+ verspielte "Freak"! ![]()
Gruß,
UEZ
Kleines Update!
Der Würfel "Rotating Cube 2 + Textures" hat jetzt ein pseudo Lichteffekt, d.h. wenn sich eine Seite nach hinten dreht, wird die Seite (das Bild) dunkeler! ![]()
Downloads wie immer im ersten Beitrag !
Gruß,
UEZ
Meinst du so was:
;fast hack by UEZ
#include <GuiConstantsEx.au3>
#include <GDIPlus.au3>
#include <ScreenCapture.au3>
Opt('MustDeclareVars', 1)
[/autoit] [autoit][/autoit] [autoit]_Main()
[/autoit] [autoit][/autoit] [autoit]Func _Main()
Local $hGUI1, $hGUI2, $hGUI3, $hImage, $hGraphic1, $hGraphic2, $hGraphic3, $sCLSID
Local $bitmap1, $bitmap2, $bitmap3, $image1, $image2, $image3
Local $tData, $tParams, $pParams, $pData
; Capture top left corner of the screen
_ScreenCapture_Capture (@MyDocumentsDir & "\GDIPlus_Image.jpg", 0, 0, 400, 300)
; Create a GUI for the original image
$hGUI1 = GUICreate("Original", 400, 300, 0, 0)
GUISetState()
; Create a GUI for the zoomed image
$hGUI2 = GUICreate("Scaled Up", 800, 600, 0, 350)
GUISetState()
; Create a GUI for the scaled down image
$hGUI3 = GUICreate("Scaled Down", 200, 150, 820, 400)
GUISetState()
; Initialize GDI+ library and load image
_GDIPlus_Startup ()
$hImage = _GDIPlus_ImageLoadFromFile (@MyDocumentsDir & "\GDIPlus_Image.jpg")
$sCLSID = _GDIPlus_EncodersGetCLSID ("JPG")
[/autoit] [autoit][/autoit] [autoit]; Draw original image
$hGraphic1 = _GDIPlus_GraphicsCreateFromHWND ($hGUI1)
$bitmap1 = _GDIPlus_BitmapCreateFromGraphics(400, 300, $hGraphic1)
$image1 = _GDIPlus_ImageGetGraphicsContext($bitmap1)
_GDIPlus_GraphicsDrawImageRect($image1, $hImage, 0, 0, 400, 300)
_GDIPlus_GraphicsDrawImageRect($hGraphic1, $bitmap1, 0, 0, 400, 300)
_GDIPlus_ImageSaveToFileEx($bitmap1, @ScriptDir & "\GDIPlus_Image1.jpg", $sCLSID)
_WinAPI_DeleteObject($bitmap1)
_GDIPlus_GraphicsDispose($image1)
; Draw 2x scaled up image and save with lower jpg quality
$hGraphic2 = _GDIPlus_GraphicsCreateFromHWND ($hGUI2)
$bitmap2 = _GDIPlus_BitmapCreateFromGraphics(800, 600, $hGraphic2)
$image2 = _GDIPlus_ImageGetGraphicsContext($bitmap2)
_GDIPlus_GraphicsDrawImageRectRect ($image2, $hImage, 0, 0, 400, 300, 0, 0, 800, 600)
_GDIPlus_GraphicsDrawImageRect($hGraphic2, $bitmap2, 0, 0, 800, 600)
$tParams = _GDIPlus_ParamInit (1)
$tData = DllStructCreate("int Quality")
DllStructSetData($tData, "Quality", 10) ;quality 0-100
$pData = DllStructGetPtr($tData)
_GDIPlus_ParamAdd($tParams, $GDIP_EPGQUALITY, 1, $GDIP_EPTLONG, $pData)
$pParams = DllStructGetPtr($tParams)
_GDIPlus_ImageSaveToFileEx($bitmap2, @ScriptDir & "\GDIPlus_Image2.jpg", $sCLSID, $pParams)
_WinAPI_DeleteObject($bitmap2)
_GDIPlus_GraphicsDispose($image2)
$tData = 0
; Draw 2x scaled down image
$hGraphic3 = _GDIPlus_GraphicsCreateFromHWND ($hGUI3)
$bitmap3 = _GDIPlus_BitmapCreateFromGraphics(200, 150, $hGraphic3)
$image3 = _GDIPlus_ImageGetGraphicsContext($bitmap3)
_GDIPlus_GraphicsDrawImageRectRect ($image3, $hImage, 0, 0, 400, 300, 0, 0, 200, 150)
_GDIPlus_GraphicsDrawImageRect($hGraphic3, $bitmap3, 0, 0, 200, 150)
_GDIPlus_ImageSaveToFileEx($bitmap3, @ScriptDir & "\GDIPlus_Image3.jpg", $sCLSID)
_WinAPI_DeleteObject($bitmap3)
_GDIPlus_GraphicsDispose($image3)
; Release resources
_GDIPlus_GraphicsDispose ($hGraphic1)
_GDIPlus_GraphicsDispose ($hGraphic2)
_GDIPlus_GraphicsDispose ($hGraphic3)
_GDIPlus_ImageDispose ($hImage)
_GDIPlus_Shutdown ()
; Clean up screen shot file
FileDelete(@MyDocumentsDir & "\GDIPlus_Image.jpg")
; Loop until user exits
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
Exit
[/autoit] [autoit][/autoit] [autoit]EndFunc ;==>_Main
[/autoit]Gruß,
UEZ
Sieht sehr schön aus ![]()
Nur die CPU Last ist sehr hoch.
Mein Vorschlag
[autoit]
...
;~ AdlibRegister("_Draw", 10)
AdlibRegister("_Key", 50)
While 1
Sleep(30)
_Draw()
WEnd
...
Gruß,
UEZ
Ich hätte noch ein Blitz 3D Tutorial/Buch als PDF. Im Grunde lässt sich aber ein alles auf AutoIt übertragen.
Bei Bedarf schick ich es dir gerne per PN.
Ich würde es gerne haben ![]()
Gruß,
UEZ
Hier eine Funktion, um die installierte Software auszulesen:
;Coded by UEZ 2009
#AutoIt3Wrapper_Change2CUI=y
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=y
#include <array.au3>
Global $server = "localhost"
If $CmdLine[0] > 0 Then $server = $CmdLine[1]
$objWMIService = ObjGet("winmgmts:{impersonationLevel = impersonate}!\\" & $server & "\root\cimv2")
[/autoit] [autoit][/autoit] [autoit]ConsoleWrite(@CRLF & "Installed software on " & $server & @CRLF & @CRLF)
Software($server)
Func Software($srv) ; registry read version 2
Local $function_name = "Software"
Local $objReg, $HKLM, $BaseKey, $BaseKey64, $server, $arrSubKeys, $SubKey, $Value, $objRegService, $chk_nr, $chk_url, $chk_sc
Local $software, $Key, $key_value, $SW_DisplayName, $SW_DisplayVersion, $SW_Publisher, $SW_InstallDate, $line, $TimeStamp
Local $filename_sw = $function_name & "_" & $srv
Local $filename_error_current = $function_name & "_" & $srv & "_error.log"
$HKLM = 0x80000002
$BaseKey = "Software\Microsoft\Windows\CurrentVersion\Uninstall\"
$BaseKey64 = "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\"
If @OSArch = "X64" And ($srv = @ComputerName Or _
$srv = "localhost" Or _
$srv = @IPAddress1 Or _
$srv = @IPAddress2 Or _
$srv = @IPAddress3 Or _
$srv = @IPAddress4) Then
$i = 1
While 1
$Key = RegEnumKey("HKEY_LOCAL_MACHINE\" & $BaseKey, $i)
If @error <> 0 Then ExitLoop
$key_value = RegRead("HKEY_LOCAL_MACHINE\" & $BaseKey & "\" & $Key, "DisplayName")
$chk_sc = RegRead("HKEY_LOCAL_MACHINE\" & $BaseKey & "\" & $Key, "SystemComponent")
$chk_url = RegRead("HKEY_LOCAL_MACHINE\" & $BaseKey & "\" & $Key, "MoreInfoURL")
$chk_nr = RegRead("HKEY_LOCAL_MACHINE\" & $BaseKey & "\" & $Key, "NoRemove")
If $key_value <> "" And _
StringIsASCII($key_value) <> 0 And _
$key_value <> "Security Update for" And _
$key_value <> "Hotfix for" And _
$key_value <> "Update for Office" And _
$key_value <> "Windows 2000 Hotfix" And _
StringInStr(StringLower($Key), StringLower("InstallShield_")) = 0 And _
StringInStr(StringLower($chk_url), StringLower("http://support.microsoft.com/kb/")) = 0 And _
$chk_nr <> 1 And $chk_sc <> 1 Then
$SW_DisplayName = StringStripWS($key_value, 7)
$SW_Publisher = RegRead("HKEY_LOCAL_MACHINE\" & $BaseKey & "\" & $Key, "Publisher")
$SW_InstallDate = RegRead("HKEY_LOCAL_MACHINE\" & $BaseKey & "\" & $Key, "InstallDate")
$SW_DisplayVersion = RegRead("HKEY_LOCAL_MACHINE\" & $BaseKey & "\" & $Key, "DisplayVersion")
$software &= $srv & ";" & $SW_DisplayName & ";" & $SW_DisplayVersion & ";" & $SW_Publisher & ";" & $SW_InstallDate & ";" & @CRLF
EndIf
$i += 1
WEnd
$i = 1
While 1
$Key = RegEnumKey("HKEY_LOCAL_MACHINE64\" & $BaseKey, $i)
If @error <> 0 Then ExitLoop
$key_value = RegRead("HKEY_LOCAL_MACHINE64\" & $BaseKey & "\" & $Key, "DisplayName")
$chk_sc = RegRead("HKEY_LOCAL_MACHINE64\" & $BaseKey & "\" & $Key, "SystemComponent")
$chk_url = RegRead("HKEY_LOCAL_MACHINE64\" & $BaseKey & "\" & $Key, "MoreInfoURL")
$chk_nr = RegRead("HKEY_LOCAL_MACHINE64\" & $BaseKey & "\" & $Key, "NoRemove")
If $key_value <> "" And _
StringIsASCII($key_value) <> 0 And _
$key_value <> "Security Update for" And _
$key_value <> "Hotfix for" And _
$key_value <> "Update for Office" And _
$key_value <> "Windows 2000 Hotfix" And _
StringInStr(StringLower($Key), StringLower("InstallShield_")) = 0 And _
StringInStr(StringLower($chk_url), StringLower("http://support.microsoft.com/kb/")) = 0 And _
$chk_nr <> 1 And $chk_sc <> 1 Then
$SW_DisplayName = StringStripWS($key_value, 7)
$SW_Publisher = RegRead("HKEY_LOCAL_MACHINE64\" & $BaseKey & "\" & $Key, "Publisher")
$SW_InstallDate = RegRead("HKEY_LOCAL_MACHINE64\" & $BaseKey & "\" & $Key, "InstallDate")
$SW_DisplayVersion = RegRead("HKEY_LOCAL_MACHINE64\" & $BaseKey & "\" & $Key, "DisplayVersion")
$software &= $srv & ";" & $SW_DisplayName & ";" & $SW_DisplayVersion & ";" & $SW_Publisher & ";" & $SW_InstallDate & ";" & @CRLF
EndIf
$i += 1
WEnd
Else
If StringLower(@OSVersion) <> StringLower("WIN_2000") Then
$objWMILocator = ObjCreate("WbemScripting.SWbemLocator")
$objRegService = $objWMILocator.ConnectServer($srv, "\root\default", "", "", "", "", 0x80)
$objReg = $objRegService.Get("StdRegProv")
Else
$objReg = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $srv & "\root\default:StdRegProv")
EndIf
If IsObj($objReg) Then
$objReg.EnumKey($HKLM, $BaseKey, $arrSubKeys)
For $SubKey In $arrSubKeys
$SW_DisplayName = ""
$SW_DisplayVersion = ""
$SW_Publisher = ""
$SW_InstallDate = ""
$Key = $objReg.GetStringValue($HKLM, $BaseKey & $SubKey, "DisplayName", $Value)
$objReg.GetDWORDValue($HKLM, $BaseKey & $SubKey, "NoRemove", $chk_nr)
$objReg.GetDWORDValue($HKLM, $BaseKey & $SubKey, "SystemComponent", $chk_sc)
$objReg.GetStringValue($HKLM, $BaseKey & $SubKey, "MoreInfoURL", $chk_url)
If $Key <> 0 Or StringLeft($SubKey, 2) = "KB" Or StringLeft($SubKey, 1) = "Q" Then
$Key = $objReg.GetStringValue($HKLM, $BaseKey & $SubKey, "QuietDisplayName", $Value)
EndIf
If $Value <> "" And StringIsASCII($Value) <> 0 _
And $Key = 0 And StringInStr(StringLower($Value), StringLower("Security Update for")) = 0 _
And StringInStr(StringLower($Value), StringLower("Update for Windows")) = 0 _
And StringInStr(StringLower($Value), StringLower("Hotfix for")) = 0 _
And StringInStr(StringLower($Value), StringLower("Update for Office")) = 0 _
And StringInStr(StringLower($SubKey), StringLower("InstallShield_")) = 0 _
And StringInStr(StringLower($Value), StringLower("Windows 2000 Hotfix")) = 0 _
And StringInStr(StringLower($chk_url), StringLower("http://support.microsoft.com/kb/")) = 0 _
And $chk_nr <> 1 _
And $chk_sc <> 1 Then
$SW_DisplayName = $Value
$Key = $objReg.GetStringValue($HKLM, $BaseKey & $SubKey, "DisplayVersion", $Value)
If $Value <> "" And StringIsASCII($Value) <> 0 Then
$SW_DisplayVersion = StringStripWS($Value, 7)
EndIf
$Key = $objReg.GetStringValue($HKLM, $BaseKey & $SubKey, "Publisher", $Value)
If $Value <> "" And StringIsASCII($Value) <> 0 Then
$SW_Publisher = StringStripWS($Value, 7)
EndIf
$Key = $objReg.GetStringValue($HKLM, $BaseKey & $SubKey, "InstallDate", $Value)
If $Value <> "" And StringIsASCII($Value) <> 0 Then $SW_InstallDate = $Value
$line = $srv & ";" & $SW_DisplayName & ";" & $SW_DisplayVersion & ";" & $SW_Publisher & ";" & $SW_InstallDate & ";" & @CRLF
$software &= $line
EndIf
Next
Dim $arrSubKeys
$objReg.EnumKey($HKLM, $BaseKey64, $arrSubKeys)
If UBound($arrSubKeys) > 0 Then
For $SubKey In $arrSubKeys
$SW_DisplayName = ""
$SW_DisplayVersion = ""
$SW_Publisher = ""
$SW_InstallDate = ""
$Key = $objReg.GetStringValue($HKLM, $BaseKey64 & $SubKey, "DisplayName", $Value)
$objReg.GetDWORDValue($HKLM, $BaseKey64 & $SubKey, "NoRemove", $chk_nr)
$objReg.GetDWORDValue($HKLM, $BaseKey64 & $SubKey, "SystemComponent", $chk_sc)
$objReg.GetStringValue($HKLM, $BaseKey64 & $SubKey, "MoreInfoURL", $chk_url)
If $Key <> 0 Or StringLeft($SubKey, 2) = "KB" Or StringLeft($SubKey, 1) = "Q" Then
$Key = $objReg.GetStringValue($HKLM, $BaseKey64 & $SubKey, "QuietDisplayName", $Value)
EndIf
If $Value <> "" And StringIsASCII($Value) <> 0 _
And $Key = 0 And StringInStr(StringLower($Value), StringLower("Security Update for")) = 0 _
And StringInStr(StringLower($Value), StringLower("Update for Windows")) = 0 _
And StringInStr(StringLower($Value), StringLower("Hotfix for")) = 0 _
And StringInStr(StringLower($Value), StringLower("Update for Office")) = 0 _
And StringInStr(StringLower($SubKey), StringLower("InstallShield_")) = 0 _
And StringInStr(StringLower($Value), StringLower("Windows 2000 Hotfix")) = 0 _
And StringInStr(StringLower($chk_url), StringLower("http://support.microsoft.com/kb/")) = 0 _
And $chk_nr <> 1 _
And $chk_nr <> 1 Then
$SW_DisplayName = $Value
$Key = $objReg.GetStringValue($HKLM, $BaseKey64 & $SubKey, "DisplayVersion", $Value)
If $Value <> "" And StringIsASCII($Value) <> 0 Then
$SW_DisplayVersion = StringStripWS($Value, 7)
EndIf
$Key = $objReg.GetStringValue($HKLM, $BaseKey64 & $SubKey, "Publisher", $Value)
If $Value <> "" And StringIsASCII($Value) <> 0 Then
$SW_Publisher = StringStripWS($Value, 7)
EndIf
$Key = $objReg.GetStringValue($HKLM, $BaseKey64 & $SubKey, "InstallDate", $Value)
If $Value <> "" And StringIsASCII($Value) <> 0 Then $SW_InstallDate = $Value
$line = $srv & ";" & $SW_DisplayName & ";" & $SW_DisplayVersion & ";" & $SW_Publisher & ";" & $SW_InstallDate & ";" & @CRLF
$software &= $line
EndIf
Next
EndIf
EndIf
EndIf
ConsoleWrite($software & @CRLF)
EndFunc ;==>Software
Sollte sowohl als x32 als auch x64 unter einem x64 OS laufen!
Einfach kompilieren und in der CMD starten!
In der Zeile #AutoIt3Wrapper_UseX64=y kann eingestellt werden, ob x32 oder x64 kompiliert werden soll!
Gruß,
UEZ
Sehr interessant, leider hängt das Ganze von den Boxen ab! Meine "Schlepptop" Boxen taugen nichts
und ich kann gerade so bis 16k Hz hören!
Gruß,
UEZ
Sehr schön! ![]()
Leider kann der Sound auf Win7 x64 nicht initialisiert werden ![]()
Gruß,
UEZ
Meinst du so was: GDI+ Farbverlauf erstellen?
Gruß,
UEZ
Damit die CPU Last nicht so hoch ist, einfach ein Sleep(10) in Zeile 109 (Func WM_PAINT()) einfügen ![]()
Gruß,
UEZ
Schaue mal hier -> AVI Writing UDF, ob du damit was anfangen kannst!
Gruß,
UEZ
Ist sehr schön geworden ![]()
Weiter so ![]()
UEZ
Das merkte ich hier schon 2x an und habe es in meinem letzten Post umgesetzt.
Warum denk ich da zu kompliziert?
Das war kein Angriff, sondern nach meiner Meinung nur eine Feststellung und außerdem nicht speziel gegen dich gerichtet, nach dem ich die Skizze von latemail gesehen habe! Ich habe mir auch deinen Code nicht näher angeschaut (nur überflogen). Mag sein, dass es im Prinzip das Gleiche macht!
UEZ ![]()