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
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 ![]()
Ich glaube ihr denkt zu kompliziert! Ein Dreieck hat 3 Ecken und auf einen Kreis transferiert bedeutet dies, dass alle 120° eine Ecke vom Dreick ist!
Die x Koordinate kann man über Cos(Grad * Pi /180) * Radius bzw. y Koordinate Sin(Grad * Pi /180) * Radius berechnen.
Für das Dreickeck bedeutet dies 3 Punkte jeweils mit 120° Differenz!
Beispiel:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#include <GDIPlus.au3>
Local Const $width = 800
Local Const $height = 800
Local $hGraphics, $hBackbuffer, $hBitmap, $hPen, $i, $pi_div_180 = 4 * ATan(1) / 180
Local $w_h = $width * 0.5, $h_h = $height * 0.5
Local $radius_x = $w_h, $radius_y = $h_h
Local $p1_x, $p1_y, $p2_x, $p2_y, $p3_x, $p3_y
Local $title = "GDI+ Beispiel von UEZ"
Opt("GUIOnEventMode", 1)
$hwnd = GUICreate($title, $width, $height, -1, -1, BitOR($WS_SYSMENU,$WS_DLGFRAME,$WS_POPUP))
GUISetOnEvent($GUI_EVENT_CLOSE, "close")
GUISetState()
If @OSBuild < 7600 Then WinSetTrans($hwnd,"", 0xFF)
_GDIPlus_Startup()
$hGraphics = _GDIPlus_GraphicsCreateFromHWND($hwnd)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $hGraphics)
$hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
_GDIPlus_GraphicsSetSmoothingMode($hBackbuffer, 2)
$hPen = _GDIPlus_PenCreate(0xFFFFFFFF, 2)
Do
_GDIPlus_GraphicsClear($hBackbuffer)
$p1_x = $w_h + Cos($i * $pi_div_180) * $radius_x ;x Koordinate vom 1. Punkt
$p1_y = $h_h + Sin($i * $pi_div_180) * $radius_y ;y Koordinate vom 1. Punkt
$p2_x = $w_h + Cos(($i + 120) * $pi_div_180) * $radius_x ;x Koordinate vom 2. Punkt
$p2_y = $h_h + Sin(($i + 120) * $pi_div_180) * $radius_y ;y Koordinate vom 2. Punkt
$p3_x = $w_h + Cos(($i + 240) * $pi_div_180) * $radius_x ;x Koordinate vom 3. Punkt
$p3_y = $h_h + Sin(($i + 240)* $pi_div_180) * $radius_y ;y Koordinate vom 3. Punkt
_GDIPlus_GraphicsDrawLine($hBackbuffer, $p1_x, $p1_y, $p2_x, $p2_y, $hPen) ;verbinde p1-p2
_GDIPlus_GraphicsDrawLine($hBackbuffer, $p2_x, $p2_y, $p3_x, $p3_y, $hPen) ;verbinde p2-p3
_GDIPlus_GraphicsDrawLine($hBackbuffer, $p3_x, $p3_y, $p1_x, $p1_y, $hPen) ;verbinde p3-p1
_GDIPlus_GraphicsDrawEllipse($hBackbuffer, $w_h - $radius_x / 2, $h_h - $radius_y / 2, $radius_x, $radius_y, $hPen) ;innerer Kreis
_GDIPlus_GraphicsDrawEllipse($hBackbuffer, 0, 0, 2 * $radius_x, 2 * $radius_y, $hPen) ;äußerer Kreis
_GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap, 0, 0, $width, $height)
$i += 2
If $i = 360 Then $i = 0
Sleep(30)
Until False
Func close()
_GDIPlus_PenDispose($hPen)
_GDIPlus_GraphicsDispose($hBackbuffer)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_Shutdown()
Exit
EndFunc
Ich hofffe, dass ich es erklären konnte!
Gruß,
UEZ
Würfel + Texturen ist jetzt fehlerfrei! Siehe Post#1
Gruß,
UEZ
@alle: danke für das Feedback ![]()
Sehr nice^^, jetzt fehlen nur noch die Jungs und Mädels um die Würfelseiten mit Texturen zu bestücken.....
Voilà, hier mit Texturen, aber ich stehe gerade auf dem Schlauch mit der Sortierung der Punkte auf der Z-Achse und was man anschließend tun muss, um das Ganze mit der richtigen Perspektive dargestellt zu bekommen! ![]()
siehe Post#1
eukalyptus: das mit WinSetTrans($hwnd,"", 0xFF) hatte ich vergessen zu implementieren. Ist in der nächsten Version dabei! Danke! ![]()
Gruß,
UEZ
Herzlichen Glückwunsch zum Geburtstag und alles Gute ![]()
Gruß,
UEZ
PS: auch den Anderen, die heute auch Geburtstag haben ![]()
Tolles Skript.
Ist das die maximale Rotationsgeschwindigkeit aufgrund der Autoit-Berechnung?
Mit $mouse_sense = 150 wird die Rotationsgeschwindigkeit festgelegt! je kleiner desto schneller.
Gruß,
UEZ
Oder so:
#include <Misc.au3>
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
$GUI_Back_Color = 0xF0F0F0
[/autoit] [autoit][/autoit] [autoit]Global $x = 300, $y = 300
Global $iSize = 15, $iPen = 2
Global $iColor = 0xFFAA3366
Opt("GUIOnEventMode", 1)
$Width = 600
$Height = 600
$hDLL = DllOpen("user32.dll")
$hGUI = GUICreate("", $Width, $Height)
GUISetOnEvent(-3, "_Eventhandler")
GUIRegisterMsg($WM_PAINT, "WM_PAINT")
_GDIPlus_Startup()
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) ; Graphic obj erstellen
$hPen = _GDIPlus_PenCreate($iColor, $iPen) ; Pinsel erstellen
$hBrush = _GDIPlus_BrushCreateSolid(0xFF000000 + $GUI_Back_Color)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics($Width, $Height, $hGraphic)
$hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
;~ _WinAPI_RedrawWindow($hGUI, 0, 0, $RDW_INTERNALPAINT) ; Fenster intern schonmal zeichnen
GUISetState()
[/autoit] [autoit][/autoit] [autoit]WM_PAINT()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]$t = TimerInit()
While 1
If TimerDiff($t) > 10 Then
Sleep(10)
$t = TimerInit()
EndIf
_KeyHandler()
WEnd
Func WM_PAINT()
;~ _WinAPI_RedrawWindow($hGUI)
_GDIPlus_GraphicsClear($hBackbuffer, 0xFF000000 + $GUI_Back_Color)
_GDIPlus_GraphicsDrawLine($hBackbuffer, $x - $iSize, $y, $x + $iSize, $y, $hPen) ; Fadenkreuz malen
_GDIPlus_GraphicsDrawLine($hBackbuffer, $x, $y - $iSize, $x, $y + $iSize, $hPen)
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $width, $height)
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_PAINT
Func _Eventhandler()
Switch @GUI_CtrlId
Case -3
_GDIPlus_PenDispose($hPen)
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_GraphicsDispose($hBackbuffer)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_GraphicsDispose($hGraphic)
;~ _WinAPI_ReleaseDC($hGUI,$hBackbuffer)
_GDIPlus_Shutdown()
Exit
EndSwitch
EndFunc ;==>_Eventhandler
Func _KeyHandler()
[/autoit] [autoit][/autoit] [autoit]If _IsPressed(25, $hDLL) Then ; links
$x -= 2
If $x < 0 Then $x = 0
WM_PAINT()
EndIf
If _IsPressed(27, $hDLL) Then ; rechts
$x += 2
If $x > 599 Then $x = 599
WM_PAINT()
EndIf
If _IsPressed(26, $hDLL) Then ; oben
$y -= 2
If $y < 0 Then $y = 0
WM_PAINT()
EndIf
If _IsPressed(28, $hDLL) Then; unten
$y += 2
If $y > 599 Then $y = 599
WM_PAINT()
EndIf
If _IsPressed("6B", $hDLL) Then ; Plus ( NumPad )
$iSize += 1
WM_PAINT()
EndIf
If _IsPressed("6D", $hDLL) Then ; Minus ( NumPad )
$iSize -= 1
If $iSize < 1 Then $iSize = 1
WM_PAINT()
EndIf
If _IsPressed("6A", $hDLL) Then ;*
$iPen += 10
ConsoleWrite(Hex($iPen,
& @CRLF)
_GDIPlus_PenSetWidth($hPen, $iPen)
WM_PAINT()
EndIf
If _IsPressed("6F", $hDLL) Then ;/
$iPen -= 10
If $iPen < 1 Then $iPen = 1
ConsoleWrite(Hex($iPen,
& @CRLF)
_GDIPlus_PenSetWidth($hPen, $iPen)
WM_PAINT()
EndIf
If _IsPressed("20", $hDLL) Then
Local $iChosen = _ChooseColor(2)
If @error Then Return
$iColor = 0xFF000000 + $iChosen
_GDIPlus_PenSetColor($hPen, $iColor)
WM_PAINT()
EndIf
EndFunc ;==>_KeyHandler
Gruß,
UEZ
Hier 4 weitere Beispiele für einen rotierenden Würfel ![]()
Danke an Malkey für den Hinweis mit den Mittelpunkten der Flächen, um nur die sichtbaren Flächen angezeigt zu bekommen!
Der Fluchtpunkt stimmt bei dem Würfel2 und Würfel3 nicht! Ich arbeite daran!
Würfel1 / Würfel2 mit Texturen / Würfel3 mit animierten Seiten / Würfel4 Simple:
Für Rotating Cube 2 und Rotating Cube 2 - Simple.au3 sollte die Perspektive jetzt stimmen. Für die anderen Würfel suche ich nach einer Lösung, wobei ich nicht weiß, ob überhaupt mit _GDIPlus_DrawImagePoints() eine korrekte Perspektive möglich ist, da _GDIPlus_DrawImagePoints() nur ein Parallelogramm anhand von 3 Koodinaten erstellen kann. ![]()
Danke an Authenticity für die GDIp.au3, woraus die nicht Standard GDI+ Funktionen sind! ![]()
Gruß,
UEZ
HAt wer auch ein Beispiel zu Kugeln?^^
Das könnte nämlich kompliziert werden zu berechnen^^
Was ist Kugeln? Das hier: Simple_Ball_Collision_Simulation.au3?
UEZ
Hier noch'n Würfel Beispiel in GDI+: Rotating Qube ![]()
Gruß,
UEZ
So, hier der 2. Anlauf:
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.0.0
Author: Kev
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.0.0
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]; Script Start - Add your code below here
[/autoit] [autoit][/autoit] [autoit]#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <IE.au3>
#include <Inet.au3>
#include <String.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Include <GuiComboBox.au3>
#include <array.au3>
#include <file.au3>
#Include <GDIPlus.au3>
#include <Color.au3>
#include <WinAPI.au3>
#include <ScreenCapture.au3>
global $pic1, $draw = 0
Global $hGraphic, $hBrush, $hFormat, $hFamily, $hFont, $tLayout
global $klasse[1], $name2[1]
global $comboname
$arfile = _FileListToArray (@scriptdir &"\rg_bg\", "*.gif", 1)
$Form1 = Guicreate("Rising Gods Signaturius",820,400)
$shape = GUICtrlCreateInput(' ', 480, 0, 5, 400)
GUICtrlSetBkColor(-1,"0x000000")
Guictrlsetstate(-1,$GUI_DISABLE)
GuictrlcreateLabel("Character Name:",30,30,120,25)
$Name = GUICtrlCreateInput("Dein Charactername",130,25,120,25)
$arfile = _FileListToArray (@scriptdir &"\rg_bg\", "*.gif", 1)
GuictrlcreateLabel("Wähle deine Signatur:",265,30,120,25)
GuictrlcreateLabel("Rising Gods Realm:",30,60,120,25)
$Realm = GUICtrlCreateCombo("PvP",130,55,120,25,$CBS_DROPDOWNLIST)
Guictrlsetdata(-1,"PvE")
$Button = GUICtrlCreateButton("Fertig",130,85,120,25)
$ButtonExit = GUICtrlCreateButton("Beenden",550,370,120,25)
$Button1 = GUICtrlCreateButton("Überprüfung",130,112,120,25)
$UpdateButton = GuictrlcreateButton("Update",550,345,120,25)
$SigOK = GuictrlcreateButton("Erstellen",260,85,120,25)
$SigEN = GuictrlcreateButton("Ändern",260,112,120,25)
$Save = GuictrlcreateButton("Signatur speichern",180,165,140,70)
GuiCtrlSetState($SigEN,$GUI_DISABLE)
GuictrlcreateLabel("Character:",500,25,120,25)
GuictrlcreateLabel("Fraktion:",500,55,120,25)
GuictrlcreateLabel("Klasse:",500,85,120,25)
GuictrlcreateLabel("Level:",500,115,120,25)
GuictrlcreateLabel("Rasse:",500,145,120,25)
GuictrlcreateLabel("Skillung:",500,175,120,25)
GuictrlcreateLabel("Gesundheit:",500,205,120,25)
GuictrlcreateLabel("Mana/Wut/Energie:",500,235,120,25)
GuictrlcreateLabel("Gilde:",500,265,120,25)
GuictrlcreateLabel("Erfolgspunkte:",500,295,120,25)
GUICtrlCreateLabel("Programm by Anubiz - GFX by Feyth",150,379,180,90)
Guictrlsetstate(-1,$GUI_DISABLE)
$charklasse = GuictrlcreateLabel("",600,85,120,25)
$charfraktion = GuictrlcreateLabel("",600,55,120,25)
$charname = GuictrlcreateLabel("",600,25,120,25)
$lvl = GuictrlcreateLabel("",600,115,120,25)
$Rasse = GuictrlcreateLabel("",600,145,120,25)
$Skill = GuictrlcreateLabel("",600,175,120,25)
$Gesund = GuictrlcreateLabel("",600,205,120,25)
$Mana = GuictrlcreateLabel("",600,235,120,25)
$guild = GuictrlcreateLabel("",600,265,120,25)
$erfolge = GuictrlcreateLabel("",600,295,120,25)
$Pic1 = GuiCtrlCreatePic("",15,265,450,100,BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Combo1 = Guictrlcreatecombo("",260,55,120,35,$CBS_DROPDOWNLIST)
$Comboname = Guictrlcreatecombo("Schwarz",725,25,80,25,$CBS_DROPDOWNLIST)
GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
$Combofraktion = Guictrlcreatecombo("Schwarz",725,55,80,25,$CBS_DROPDOWNLIST)
GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
$Comboklasse = Guictrlcreatecombo("Schwarz",725,85,80,25,$CBS_DROPDOWNLIST)
GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
$Combolvl = Guictrlcreatecombo("Schwarz",725,115,80,25,$CBS_DROPDOWNLIST)
GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
$ComboRasse = Guictrlcreatecombo("Schwarz",725,145,80,25,$CBS_DROPDOWNLIST)
GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
$ComboSkill = Guictrlcreatecombo("Schwarz",725,175,80,25,$CBS_DROPDOWNLIST)
GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
$Combogesund = Guictrlcreatecombo("Schwarz",725,205,80,25,$CBS_DROPDOWNLIST)
GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
$Combomana= Guictrlcreatecombo("Schwarz",725,235,80,25,$CBS_DROPDOWNLIST)
GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
$Combogilde= Guictrlcreatecombo("Schwarz",725,265,80,25,$CBS_DROPDOWNLIST)
GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
$Comboerfolge= Guictrlcreatecombo("Schwarz",725,295,80,25,$CBS_DROPDOWNLIST)
GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
GuiCtrlSetState($Button1, $GUI_DISABLE)
GUISetState(@SW_SHOW)
For $i = 1 To UBound ($arfile) - 1
_GUICtrlComboBox_AddString ($Combo1, $arfile [$i])
Next
_GUICtrlComboBox_SetCurSel ($Combo1, 0)
GUICtrlSetImage ($Pic1, @scriptdir &"\rg_bg\" & $arfile [1])
$value = GUICtrlRead ($Combo1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
_gdiEnd()
Exit
case $button
GuiCtrlSetState($Name, $GUI_DISABLE)
GuiCtrlSetState($Realm, $GUI_DISABLE)
msgbox(0,"Status", "Character wird abgerufen...")
GuiCtrlSetState($Button1, $GUI_ENABLE)
$source = _INetGetSource("http://www.arsenal.rising-gods.de/character-sheet.xml?r=" & GUICtrlRead($Realm) & "-Realm&n=" & GUICtrlRead($Name))
$file = FileOpen(@ScriptDir & "\Char.txt", 0)
$klasse = _StringBetween($source, '" class="', '" classId')
If IsArray($klasse) Then GUICtrlSetData($charklasse, $klasse[0])
$faction = _StringBetween($source , '" faction="', '" factionId')
If IsArray($faction) Then GUICtrlSetData($charfraktion, $faction[0])
$name2 = _StringBetween($source , '" name="', '" points')
If IsArray($name2) Then GUICtrlSetData($charname, $name2[0])
$name3 = _StringBetween($source , '" level="', '" name')
If IsArray($name3) Then GUICtrlSetData($lvl, $name3[0])
$name4 = _StringBetween($source , '" race="', '" raceId')
If IsArray($name4) Then GUICtrlSetData($Rasse, $name4[0])
$name5 = _StringBetween($source , '" prim="', '" treeOne')
If IsArray($name5) Then GUICtrlSetData($Skill, $name5[0])
$name6 = _StringBetween($source , '<health effective="', '"/>')
If IsArray($name6) Then GUICtrlSetData($Gesund, $name6[0])
$name7 = _StringBetween($source , '" effective="', '" notCasting')
If IsArray($name7) Then GUICtrlSetData($Mana, $name7[0])
$name8 = _StringBetween($source , '" guildName="', '" guildUrl')
If IsArray($name8) Then GUICtrlSetData($guild, $name8[0])
$name9 = _StringBetween($source , '" points="', '" prefix')
If IsArray($name9) Then GUICtrlSetData($erfolge, $name9[0])
case $ButtonExit
_gdiEnd()
exit
case $UpdateButton
msgbox(1,"Updater","Nach neuen Updates suchen?")
sleep(1000)
if FileExists (@ScriptDir & "\rg_bg\RG_SigU_01.gif") Then
Msgbox(1,"Updater","Keine neuen Updates vorhanden")
else
InetGet("ftp://username:pass@anubiz.pytalhost.com/RG_SigU_01.gif",@scriptdir & "\rg_bg\RG_SigU_01.gif",1)
InetGet("ftp://username:pass@anubiz.pytalhost.com/RG_SigU_02.gif",@scriptdir & "\rg_bg\RG_SigU_02.gif",1)
sleep(1000)
msgbox(0,"Updater","Update erfolgreich")
Endif
case $SigOK
GuiCtrlSetState($Combo1,$GUI_DISABLE)
GuiCtrlSetState($SigEN,$GUI_ENABLE)
msgbox(0,"Signatur","Signatur erfolgreich ausgewählt")
$draw = 1
_gdiStart(GUICtrlGetHandle($Pic1))
case $SigEN
GuiCtrlSetState($Combo1,$GUI_ENABLE)
case $save
$pic1 = FileSaveDialog("Speichern",@ScriptDir, "JPEG(*.jpg;*.jpeg)|24-Bit-Bitmap(*.bmp)|GIF(*.gif)", 2)
case $Button1
ShellExecute("http://www.arsenal.rising-gods.de/character-sheet.xml?r=" & GUICtrlRead($Realm) & "-Realm&n=" & GUICtrlRead($Name))
Case $Comboname
_GDIPlus_BrushSetSolidColor($hBrush, 0xFF000000 + Combo_Get_Color($Comboname))
_gdiText($name2[0])
EndSwitch
If $value <> GUICtrlRead ($Combo1) Then
GUICtrlSetImage ($Pic1, @scriptdir &"\rg_bg\" & $arfile [_ArraySearch ($arfile, GUICtrlRead ($Combo1))])
$value = GUICtrlRead ($Combo1)
EndIf
If $draw Then _gdiText($name2[0])
WEnd
Func _gdiStart($hGui)
_GDIPlus_Startup()
$hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hGUI)
$hBrush = _GDIPlus_BrushCreateSolid(0x7F000000)
$hFormat = _GDIPlus_StringFormatCreate()
$hFamily = _GDIPlus_FontFamilyCreate("Arial")
$hFont = _GDIPlus_FontCreate($hFamily, 12, 2)
$tLayout = _GDIPlus_RectFCreate(80, 40, 100, 20)
EndFunc
func _gdiText($sText)
_GDIPlus_GraphicsDrawStringEx($hGraphic, $sText, $hFont, $tLayout, $hFormat, $hBrush)
EndFunc
Func _gdiEnd()
_GDIPlus_FontDispose($hFont)
_GDIPlus_FontFamilyDispose($hFamily)
_GDIPlus_StringFormatDispose($hFormat)
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_Shutdown()
EndFunc
Func Combo_Get_Color($combo)
Local $content
Local $red = 0xF00000, $green = 0x00F000, $blue = 0x0000F0, $yellow = 0xD0D000, $black = 0x000000
$content = GUICtrlRead($combo)
Switch $content
Case "Rot"
Return $red
Case "Grün"
Return $green
Case "Blau"
Return $blue
Case "Gelb"
Return $yellow
Case "Schwarz"
Return $black
EndSwitch
EndFunc
Gruß,
UEZ
Oh man, jetzt fällt der Groschen (aufgehängt an einem Fallschirm) ![]()
Gruß,
UEZ