Achsoo ok ja das ist auch mal ne Idee die Programme aufs Tablet abzustimmen ![]()
Beiträge von Facemix
-
-
@blackho,
du kannst dir das Script natürlich auch selber schreiben, mach dich aber davor noch mit WinHTTP vertraut, denn das wirst du dafür auf jedenfall brauchen!
Allerdings brauchst du dazu auf jedenfall auch die UDF "WinHttp.au3"
-
oh-ha,
danke für deine Hilfe dafür, ich werde dies im laufe des Tages mal noch anpassen und werde natürlich dies in meinem ersten Post aktualisieren
-
Darf man fragen, warum du die Höhe der ComboBox verändern möchtest?
Hier mal eine Möglichkeit, die Höhe der Combo zu vergrößern in diesem Beispiel einfach per Schriftgrößenveränderung gemacht, da sich die Combo dem Inhalt anpasst, allerdings den Weight-Parameter musst du manuell einstellen!
[autoit]#include <ComboConstants.au3>
[/autoit][autoit][/autoit][autoit]
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>; Facemix (http://www.autoit.de)
[/autoit][autoit][/autoit][autoit]$Form1 = GUICreate("Test", 267, 196, 192, 124)
[/autoit][autoit][/autoit][autoit]
$Combo1 = GUICtrlCreateCombo("Test", 16, 24, 233, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetFont(-1, 20, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)While 1
[/autoit][autoit][/autoit][autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitEndSwitch
[/autoit]
WEnd -
Hallo Forum,
ich habe mal einen ganz einfachen kleinen Setup zusammengebastelt, und dazu auch gleich den Uninstaller. Das Setup ist nur ein ganz einfaches Setup, es kopiert die gewünschten Dateien in den gewünschten Ordner und der Uninstaller entfernt es natürlich daraus.
Ich habe das Setup anhand einer GUI dargestellt, mit einer Progressbar, die Ladezeit der Progressbar richtet sich in diesem Fall nicht auf die Dateigröße der zu kopierenden Dateien, sondern einfach eine manuell eingestellte Zeit, damit es nach etwas aussieht sonst wäre das Setup wahrscheinlich viel zu schnell durch.
Hier das Script des Setups:
Spoiler anzeigen
[autoit]#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>#RequireAdmin
[/autoit] [autoit][/autoit] [autoit]; Author: Facemix (http://www.autoit.de)
[/autoit] [autoit][/autoit] [autoit]Global $Progname = "dein_programm"
[/autoit] [autoit][/autoit] [autoit]
Global $Filename = "programm.exe"If FileExists(@ProgramFilesDir & "\" & $Progname & "\") Then
[/autoit] [autoit][/autoit] [autoit]
$frage1 = MsgBox(52, $Progname & " Setup", "Diese Version ist bereits auf Ihrem System installiert, möchten Sie es Deinstallieren?")
If $frage1 = 6 Then
;Hier noch die GUI zum Deinstallieren einfügen----
FileDelete(@ProgramFilesDir & "\" & $Progname & "\)
ElseIf $frage1 = 7 Then
MsgBox(0, $Progname & " Setup", "Das Setup wurde durch den Benutzer abgebrochen!")
Exit
EndIf
Else$frage2 = MsgBox(52, "Setup", $Progname & " wird nun direkt installiert, sind Sie damit einverstanden?")
[/autoit] [autoit][/autoit] [autoit]If $frage = 6 Then
[/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
$Form1_1 = GUICreate("Setup dein_programm", 357, 86, 192, 127)
$Label1 = GUICtrlCreateLabel($Progname & " wird nun direkt installiert!", 8, 8, 343, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Progress1 = GUICtrlCreateProgress(8, 48, 342, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###_filecopy()
[/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
_exit()EndSwitch
[/autoit] [autoit][/autoit] [autoit]
WEndElseIf $frage = 7 Then
[/autoit] [autoit][/autoit] [autoit]
MsgBox(0, $Progname & " Setup", "Das Setup wurde durch den Benutzer abgebrochen!")
_exit()
EndIfFunc _filecopy()
[/autoit] [autoit][/autoit] [autoit]
For $i = 0 to 100 Step 1
GUICtrlSetData($Progress1, $i)
Sleep(50)
Next
FileCopy(@ScriptDir & "\" & $Progname & "\" & $Filename, @ProgramFilesDir & "\" & $Progname & "\")
Sleep(100)
MsgBox(0, "Setup " & $Progname, $Progname & " wurde erfolgreich installiert!")
Exit
EndFuncEndIf
[/autoit] [autoit][/autoit] [autoit]Func _exit()
[/autoit]
Exit
EndFuncUnd der Uninstaller auch gleich, der ist genauso aufgebaut, wie das Setup selber...
Spoiler anzeigen
[autoit]#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>#RequireAdmin
[/autoit] [autoit][/autoit] [autoit]; Author: Facemix (http://www.autoit.de)
[/autoit] [autoit][/autoit] [autoit]$frage = MsgBox(52, "Uninstall dein_programm", "Sind Sie sich sicher, dass Sie dein_programm entfernen möchten?")
[/autoit] [autoit][/autoit] [autoit]If $frage = 6 Then
[/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
$Form1 = GUICreate("Uninstall dein_programm", 354, 85, 192, 124)
$Label1 = GUICtrlCreateLabel("dein_programm wird nun deinstalliert!", 8, 8, 335, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Progress1 = GUICtrlCreateProgress(8, 48, 334, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###_filedelete()
[/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitEndSwitch
[/autoit] [autoit][/autoit] [autoit]
WEndElseIf $frage = 7 Then
[/autoit] [autoit][/autoit] [autoit]
MsgBox(0, "Uninstall dein_programm", "Setup wurde durch den Benutzer abgebrochen!" & @CRLF & "Keine Dateien wurden entfernt!")
EndIfFunc _filedelete()
[/autoit] [autoit][/autoit] [autoit][/autoit]
For $i = 0 To 100 Step 1
GUICtrlSetData($Progress1, $i)
Sleep(100)
Next
FileDelete(@ProgramFilesDir & "\dein_programm\")
EndFuncLeider habe ich noch keine Möglichkeit gefunden, den Uninstaller nach der Installation des Programms hier drin erscheinen zu lassen:
[Blockierte Grafik: http://h10010.www1.hp.com/ewfrf-JAVA/Doc/images/923/c01860850.gif]
Wenn hierzu jemand was weis, würde ich mich freuen wenn das Wissen geteilt wird

Ansonsten könnt ihr gerne bisschen Kritik für den sehr einfachen Setup hinterlassen. (Beachtet bei eurer Kritik bitte, dass es wirklich ein sehr sehr einfacher Setup ist
) -
Ähm kann mir mal einer erklären, warum ICH hier etwas gepostet habe? Ququknife was hast du getan?
-
-
ok Danke, das habe ich jetzt so übernommen aber damit ist mein Problem leider noch immer nicht gelößt
ZitatWas soll übrigens: "_GUICtrlListView_SetItemChecked" darin? (habs noch dringelassen) - Du hast doch gar keine Checkboxen.
Daas habe ichreingeschrieben, um alle Items in der Box zu entmarkieren, da ich es mitbekommen habe, dass jedesmal wenn ich die GUI neu öffne immer Das oberste Item automatisch ausgewählt wird, ist zwar dann nicht blau markiert aber man merkt es dann, wenn man z.B bei hintergrund nichts auswählt nur bei Textfarbe, trotzdem wird dann der Wert des ersten items der Hintergrundfarben übernommen
-
Alles gute nachträglich autoit.de
wow 7 Jahre erfolgreiches Forum 
-
Vielen Dank genau das hatte ich die ganze zeit versucht und nicht geschafft. Danke dir jetzt schau ich mir mal den Code genau an um da des zu verstehen versuchen

-
hättest du mal ein Beispiel für mich? denn egal wie ich das ganze anpacke, dann wird das ganze zwar angezeigt aber nicht in dem dafür vorgesehenen bereich sondern auf der X und Y Achse 0 des Desktops

-
Hallo Forum,
nun habe ich es endlich geschafft das Script auch mit Bildschirmschohnertool zum laufen zu bringen, nun hätte ich noch eine Frage an euch, und zwar:
Im Bildschirmschohnereinstellungsfenster, gibt es noch einen kleinen Bildschirm für die kleine Vorschau des Screensavers, dieser ist bei mir leider noch Schwarz, also es wird nichts angezeigt, könnt ihr mir helfen, dass in diesem die Vorschau dess Screensavers auch angezeigt wird??
Hier das komplette Script:
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
#include <GUIConstants.au3>
#include <Date.au3>
#include <EditConstants.au3>
#include <GDIPlus.au3>
#include <Misc.au3>
#include <SliderConstants.au3>
#include <Timers.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <WinAPI.au3>
#include <GuiImageList.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>; -Authors: name22 (http://www.autoit.de), Andy (http://www.autoit.de), Facemix (http://www.autoit.de)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]#region WINDOWSTOOL
[/autoit] [autoit][/autoit] [autoit]
_Singleton(@AutoItExe)Global $iCount = 10, $iExplosion = 100, $iExplosionGround = 1, $iRadius = 600, $iBack = 0x09000000, $iSleep = 5
[/autoit] [autoit][/autoit] [autoit]Global Const $app_name = "GDI+ Countdown-Screensaver by (C) Clemens 2012"
[/autoit] [autoit][/autoit] [autoit]
Global Const $ver = "v1.0 build 2012-11-24"
Global $hGUI, $iW, $iH, $GUI_H, $GUI_W, $GUI_X, $GUI_Y, $r, $show_FPS = 0
Global $maxStars = 150, $size = 1
Global $parent_pid, $aChildProcess
Global Const $hFullScreen = WinGetHandle("Program Manager")
Global Const $aFullScreen = WinGetPos($hFullScreen)
Global $main_screen_x = Abs($aFullScreen[0])
Global Const $ini_file = @ScriptDir & "\GDI+ Countdown-Screensaver.ini"
Global $hWndGlobal $cmdparam = "/s"
[/autoit] [autoit][/autoit] [autoit]
If $CmdLine[0] Then $cmdparam = StringLeft($CmdLine[1], 2)Switch $cmdparam
[/autoit] [autoit][/autoit] [autoit]
Case "/s"
$iW = @DesktopWidth
$iH = @DesktopHeight
$GUI_X = $aFullScreen[0]
$GUI_Y = $aFullScreen[1]
$GUI_W = $aFullScreen[2]
$GUI_H = $aFullScreen[3]
$r = (($iW + $iH) / 2) / 0x300
$hGUI = GUICreate($app_name, $GUI_W, $GUI_H, $GUI_X, $GUI_Y, $WS_POPUP, $WS_EX_TOPMOST)
Case "/c"
Opt("GUIOnEventMode", 0)
MsgBox(0,"Einstellungen","Die Einstellungen sind derzeit noch nicht vorhanden! - made by (C) Clemens")
ExitCase "/p"
[/autoit] [autoit][/autoit] [autoit]
$iW = 152
$iH = 112
$GUI_X = 0
$GUI_Y = 0
$GUI_W = $iW
$GUI_H = $iH
$main_screen_x = 0
$r = (($iW + $iH) / 2) / 0x30
$show_FPS = False
;$maxStars = 30
$size = 1
;$hWnd = GUICreate("GDI+ Countdown-Screensaver by (C) Clemens", $GUI_W, $GUI_H, $GUI_X, $GUI_Y, $WS_POPUP)
_WinAPI_SetParent($hWnd, $CmdLine[2])
Exit
EndSwitch
#endregion WINDOWSTOOL; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[/autoit] [autoit][/autoit] [autoit]#region BILDSCHIRMSCHOHNER
[/autoit] [autoit][/autoit] [autoit]
Opt("GUIOnEventMode", 1)Global Const $nTau = ACos(-1) * 2
[/autoit] [autoit][/autoit] [autoit]
Global $vNTdll = DllOpen("ntdll.dll")
Global $tPrecSleep = DllStructCreate("int64 time;")
Global $pPrecSleep = DllStructGetPtr($tPrecSleep)#region SETTINGS
[/autoit] [autoit][/autoit] [autoit]Global $iWidth = @DesktopWidth
[/autoit] [autoit][/autoit] [autoit]
Global $iHeight = @DesktopHeight
Global $nFPS = 60Global $nStepSpeed = 1
[/autoit] [autoit][/autoit] [autoit]#region COLORS
[/autoit] [autoit][/autoit] [autoit]
Global $iARGB_BG = 0xFF505050
Global $iARGB_Snow = 0xFFFFFFFF
Global $iARGB_TextFill = 0xFF0000FF
Global $iARGB_TextFill2 = 0xFFFF0000
Global $iARGB_TextFill3 = 0xFF0000FF
Global $iARGB_TextFill4 = 0xFF353535
Global $iARGB_TextBorder = 0xFFA00000
#endregion COLORS#region SNOWFLAKES
[/autoit] [autoit][/autoit] [autoit]
Global $iFlakeCount = 500
Global $iMinFallingSpeed = 20, $iMaxFallingSpeed = 50
Global $iMinOscillations = 2, $iMaxOscillations = 5
Global $iMinOscillationDist = 10, $iMaxOscillationDist = 50
Global $iMinRadius = 1, $iMaxRadius = 3
#endregion SNOWFLAKES#region SNOWBLAST
[/autoit] [autoit][/autoit] [autoit]
Global $iBlastRadius = 200
Global $iBlastAccell = 300
Global $nAirFriction = 0.95
#endregion SNOWBLAST#endregion SETTINGS
[/autoit] [autoit][/autoit] [autoit]#region Global Variables
[/autoit] [autoit][/autoit] [autoit]
Global $aFlakes[$iFlakeCount + 1][8] = [[$iFlakeCount]]
Global $hDC_Window, $hDC_Bitmap, $hBitmap, $hGraphics, $hOldObj, $hBrush_Snow, $hBrush_TextFill, $hPen_Border
Global $hMatrix, $tLayout, $hFormat, $hFamily, $hPath, $nScale, $nStep = 0, $iM, $iS, $iD, $sText, $sTextOld
Global $nSleepTime = 1000 / $nFPS
#endregion Global Variables#region Generate Snow
[/autoit] [autoit][/autoit] [autoit]
For $i = 1 To $aFlakes[0][0]
$aFlakes[$i][0] = Random(10, $iWidth - 10, 1)
$aFlakes[$i][1] = Random(-$iHeight, 0, 1)
$aFlakes[$i][2] = 0
$aFlakes[$i][3] = 0
$aFlakes[$i][4] = Random($iMinRadius, $iMaxRadius, 1)
$aFlakes[$i][5] = Random($iMinFallingSpeed, $iMaxFallingSpeed)
$aFlakes[$i][6] = Random($iMinOscillations, $iMaxOscillations, 1)
$aFlakes[$i][7] = Random($iMinOscillationDist, $iMaxOscillationDist) * (-1) ^ Random(1, 2, 1)
Next
#endregion Generate Snow$hWnd = GUICreate("Screensaver", $iWidth, $iHeight, 0, 0, BitOR($WS_POPUP, $WS_POPUPWINDOW, $WS_EX_TOPMOST))
[/autoit] [autoit][/autoit] [autoit]
GUISetState()#region Initialize GFX Resources
[/autoit] [autoit][/autoit] [autoit]
$hDC_Window = _WinAPI_GetDC($hWnd)
$hDC_Bitmap = _WinAPI_CreateCompatibleDC($hDC_Window)
$hBitmap = _WinAPI_CreateCompatibleBitmap($hDC_Window, $iWidth, $iHeight)
$hOldObj = _WinAPI_SelectObject($hDC_Bitmap, $hBitmap)_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]$hGraphics = _GDIPlus_GraphicsCreateFromHDC($hDC_Bitmap)
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_GraphicsSetClipRect($hGraphics, 0, 0, $iWidth, $iHeight)
_GDIPlus_GraphicsSetSmoothingMode($hGraphics, 2)$hBrush_Snow = _GDIPlus_BrushCreateSolid($iARGB_Snow)
[/autoit] [autoit][/autoit] [autoit]
$hBrush_TextFill = _GDIPlus_BrushCreateSolid($iARGB_TextFill)
$hPen_Border = _GDIPlus_PenCreate($iARGB_TextBorder, 3)
DllCall($ghGDIPDll, "uint", "GdipSetPenLineJoin", "hwnd", $hPen_Border, "int", 2)$hMatrix = _GDIPlus_MatrixCreate()
[/autoit] [autoit][/autoit] [autoit]
$tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0)
$hFormat = _GDIPlus_StringFormatCreate()
$hFamily = _GDIPlus_FontFamilyCreate("Arial")
$hPath = _CreatePath("88 - 88:88:88")_GDIPlus_GraphicsClear($hGraphics, $iARGB_BG)
[/autoit] [autoit][/autoit] [autoit]
_Redraw()
#endregion Initialize GFX Resources#region Register Events
[/autoit] [autoit][/autoit] [autoit]
OnAutoItExitRegister("_Shutdown")
GUIRegisterMsg($WM_PAINT, "_Redraw")
GUISetOnEvent($GUI_EVENT_CLOSE, "_Close")
GUISetOnEvent($GUI_EVENT_PRIMARYDOWN, "_Click")AdlibRegister("_UpdateTime", 100)
[/autoit] [autoit][/autoit] [autoit]
#endregion Register Events$nT_Sleep = TimerInit() + $nSleepTime
[/autoit] [autoit][/autoit] [autoit]While True
[/autoit] [autoit][/autoit] [autoit]
DllStructSetData($tPrecSleep, "time", -10000 * ($nSleepTime - TimerDiff($nT_Sleep)))
DllCall($vNTdll, "dword", "ZwDelayExecution", "int", 0, "ptr", $pPrecSleep)
$nFrameTime = TimerDiff($nT_Sleep)
$nT_Sleep = TimerInit()$nFPS_Cur = 1000 / $nFrameTime
[/autoit] [autoit][/autoit] [autoit]$nStep += $nStepSpeed / $nFPS_Cur
[/autoit] [autoit][/autoit] [autoit]
$nScale = Abs(Sin($nStep))_GDIPlus_GraphicsClear($hGraphics, $iARGB_BG)
[/autoit] [autoit][/autoit] [autoit]DllCall($ghGDIPDll, "uint", "GdipTranslateWorldTransform", "hwnd", $hGraphics, "float", -$iWidth / 2, "float", -$iHeight / 2, "int", False)
[/autoit] [autoit][/autoit] [autoit]
DllCall($ghGDIPDll, "uint", "GdipScaleWorldTransform", "hwnd", $hGraphics, "float", $nScale, "float", $nScale, "int", True)
DllCall($ghGDIPDll, "uint", "GdipTranslateWorldTransform", "hwnd", $hGraphics, "float", $iWidth / 2, "float", $iHeight / 2, "int", True)DllCall($ghGDIPDll, "uint", "GdipDrawPath", "hwnd", $hGraphics, "hwnd", $hPen_Border, "hwnd", $hPath)
[/autoit] [autoit][/autoit] [autoit]
DllCall($ghGDIPDll, "uint", "GdipFillPath", "hwnd", $hGraphics, "hwnd", $hBrush_TextFill, "hwnd", $hPath)DllCall($ghGDIPDll, "uint", "GdipResetWorldTransform", "hwnd", $hGraphics)
[/autoit] [autoit][/autoit] [autoit]For $i = 1 To $aFlakes[0][0]
[/autoit] [autoit][/autoit] [autoit]
$aFlakes[$i][1] += ($aFlakes[$i][5] + $aFlakes[$i][3]) / $nFPS_Cur
$aFlakes[$i][0] += (Sin($aFlakes[$i][1] / $iHeight * $nTau * $aFlakes[$i][6]) * $aFlakes[$i][7] + $aFlakes[$i][2]) / $nFPS_Cur
$aFlakes[$i][2] *= $nAirFriction
$aFlakes[$i][3] *= $nAirFriction
If $aFlakes[$i][1] > $iHeight Or $aFlakes[$i][0] < -20 Or $aFlakes[$i][0] > $iWidth + 20 Then
$aFlakes[$i][0] = Random(10, $iWidth - 10, 1)
$aFlakes[$i][1] = Random(-$iHeight, 0, 1)
$aFlakes[$i][2] = 0
$aFlakes[$i][3] = 0
$aFlakes[$i][4] = Random($iMinRadius, $iMaxRadius, 1)
$aFlakes[$i][5] = Random($iMinFallingSpeed, $iMaxFallingSpeed)
$aFlakes[$i][6] = Random($iMinOscillations, $iMaxOscillations, 1)
$aFlakes[$i][7] = Random($iMinOscillationDist, $iMaxOscillationDist)
EndIf
_GDIPlus_GraphicsFillEllipse($hGraphics, $aFlakes[$i][0] - $aFlakes[$i][4] / 2, $aFlakes[$i][1] - $aFlakes[$i][4] / 2, $aFlakes[$i][4] * 2, $aFlakes[$i][4] * 2, $hBrush_Snow)
Next
_WinAPI_BitBlt($hDC_Window, 0, 0, $iWidth, $iHeight, $hDC_Bitmap, 0, 0, $SRCCOPY)
WEndFunc _UpdateTime()
[/autoit] [autoit][/autoit] [autoit]
_TicksToTime(_DateDiff('s', _NowCalc(), "2013/01/01 00:00:00") * 1000, $iH, $iM, $iS)
If $iH > 23 Then
$iD = StringFormat("%02i", $iH / 24); volle Tage
$iH = $iH - ($iD * 24); volle Tage abziehen
Else
$iD = 0
EndIfIf $sText = "00 - 00:00:00" Then
[/autoit] [autoit][/autoit] [autoit]
AdlibUnRegister("_UpdateTime")
Feuerwerk() ; Funktion Feuerwerk soll dann ausgeführt werden
Else
$sText = StringFormat("%02i - %02i:%02i:%02i", $iD, $iH, $iM, $iS)
EndIfIf $sText <> $sTextOld Then
[/autoit] [autoit][/autoit] [autoit]
$sTextOld = $sText
DllCall($ghGDIPDll, "uint", "GdipResetPath", "hwnd", $hPath)
DllCall($ghGDIPDll, "uint", "GdipAddPathString", "hwnd", $hPath, "wstr", $sText, "int", -1, "hwnd", $hFamily, "int", 1, "float", 100, "ptr", DllStructGetPtr($tLayout), "hwnd", $hFormat)
DllCall($ghGDIPDll, "uint", "GdipTransformPath", "hwnd", $hPath, "hwnd", $hMatrix)
EndIf
EndFuncFunc _Click()
[/autoit] [autoit][/autoit] [autoit]
Local $tMousePos = _WinAPI_GetMousePos(True, $hWnd)
For $i = 1 To $aFlakes[0][0]
$iX_Dist = ($aFlakes[$i][0] - $aFlakes[$i][4]) - DllStructGetData($tMousePos, "X")
$iY_Dist = ($aFlakes[$i][1] - $aFlakes[$i][4]) - DllStructGetData($tMousePos, "Y")
$iDist = Sqrt($iX_Dist ^ 2 + $iY_Dist ^ 2)
If $iDist = 0 Then ContinueLoop
If $iDist < $iBlastRadius Then
$aFlakes[$i][2] = (1 - $iDist / $iBlastRadius) * ($iX_Dist / $iDist) * $iBlastAccell
$aFlakes[$i][3] = (1 - $iDist / $iBlastRadius) * ($iY_Dist / $iDist) * $iBlastAccell
EndIf
Next
EndFunc ;==>_ClickFunc _Redraw()
[/autoit] [autoit][/autoit] [autoit]
_WinAPI_BitBlt($hDC_Window, 0, 0, $iWidth, $iHeight, $hDC_Bitmap, 0, 0, $SRCCOPY)
EndFunc ;==>_RedrawFunc _Close()
[/autoit] [autoit][/autoit] [autoit]
Exit
EndFunc ;==>_CloseFunc _Shutdown()
[/autoit] [autoit][/autoit] [autoit]
_WinAPI_SelectObject($hDC_Bitmap, $hOldObj)
_WinAPI_ReleaseDC($hWnd, $hDC_Window)
_WinAPI_DeleteDC($hDC_Bitmap)
_WinAPI_DeleteObject($hBitmap)_GDIPlus_GraphicsDispose($hGraphics)
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_BrushDispose($hBrush_Snow)
_GDIPlus_PenDispose($hPen_Border)
_GDIPlus_MatrixDispose($hMatrix)
_GDIPlus_StringFormatDispose($hFormat)
_GDIPlus_FontFamilyDispose($hFamily)
DllCall($ghGDIPDll, "uint", "GdipDeletePath", "hwnd", $hPath)
_GDIPlus_Shutdown()DllClose($vNTdll)
[/autoit] [autoit][/autoit] [autoit]
EndFunc ;==>_ShutdownFunc _CreatePath($sText)
[/autoit] [autoit][/autoit] [autoit]Local $tBounds = _GDIPlus_RectFCreate(0, 0, 0, 0)
[/autoit] [autoit][/autoit] [autoit]Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreatePath", "int", 0, "int*", 0)
[/autoit] [autoit][/autoit] [autoit]
If @error Or Not IsArray($aResult) Then Return SetError(1, 1, False)
Local $hPath = $aResult[2]DllCall($ghGDIPDll, "uint", "GdipAddPathString", "hwnd", $hPath, "wstr", $sText, "int", -1, "hwnd", $hFamily, "int", 1, "float", 100, "ptr", DllStructGetPtr($tLayout), "hwnd", $hFormat)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
DllCall($ghGDIPDll, "uint", "GdipGetPathWorldBounds", "hwnd", $hPath, "ptr", DllStructGetPtr($tBounds), "hwnd", 0, "hwnd", 0)_GDIPlus_MatrixTranslate($hMatrix, -DllStructGetData($tBounds, "X"), -DllStructGetData($tBounds, "Y"))
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_MatrixScale($hMatrix, $iWidth / DllStructGetData($tBounds, "Width"), $iHeight / DllStructGetData($tBounds, "Height"), True)
DllCall($ghGDIPDll, "uint", "GdipTransformPath", "hwnd", $hPath, "hwnd", $hMatrix)Return $hPath
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
EndFunc ;==>_CreatePath#region FEUERWERK
[/autoit] [autoit][/autoit] [autoit]Func Feuerwerk()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
Local $aDraw
Local $iCount = 10, $iExplosion = 100, $iExplosionGround = 1, $iRadius = 600, $iBack = 0x09000000, $iSleep = 5
Global $iWidth2 = @DesktopWidth, $iHeight2 = @DesktopHeight, $aStart[$iCount][4] = [[Random(0, $iWidth2, 0), Random(0, $iHeight2, 0), 0, _GDIPlus_PenCreate(Random(0xFF000000, 0xFFFFFFFF, 0))],[Random(0, $iWidth2, 0), Random(0, $iHeight2, 0), 0, _GDIPlus_PenCreate(Random(0xFF000000, 0xFFFFFFFF, 0))]], $iSleeping = 0
For $i = 0 To UBound($aStart) - 1
$aStart[$i][0] = Random(0, $iWidth2, 0)
$aStart[$i][1] = Random(0, $iHeight2, 0)
$aStart[$i][2] = $iExplosion
$aStart[$i][3] = _GDIPlus_PenCreate(Random(0xFF000000, 0xFFFFFFFF, 0))
NextWhile True
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_GraphicsClear($hGraphics, $iBack)
If $iSleeping = 0 Then
For $j = 0 To UBound($aStart) - 1
For $i = 0 To 35
$aDraw = Dreieck($i * 10, $aStart[$j][2] - $iExplosion)
_GDIPlus_GraphicsDrawRect($hGraphics, $aStart[$j][0] + Round($aDraw[0], 0), $aStart[$j][1] + Round($aDraw[1], 0), 2, 2, $aStart[$j][3])
Next
$aStart[$j][2] += $iExplosionGround + Ceiling(10 * $iExplosion / ($aStart[$j][2]))
If $aStart[$j][2] > $iRadius Then
$iSleeping = $iSleep
$aStart[$j][0] = Random(0, $iWidth2, 0)
$aStart[$j][1] = Random(0, $iHeight2, 0)
$aStart[$j][2] = $iExplosion
_GDIPlus_PenDispose($aStart[$j][3])
$aStart[$j][3] = _GDIPlus_PenCreate(Random(0xFF000000, 0xFFFFFFFF, 0))
EndIf
Next
Else
$iSleeping -= 1
EndIf
_WinAPI_RedrawWindow($hWnd, 0, 0, 2)
WEnd
EndFunc ;==>FeuerwerkFunc Dreieck($iWinkel, $iLaenge)
[/autoit] [autoit][/autoit] [autoit]
Local $iDeg = 0.0174532925199433, $aRet[2]
$aRet[0] = Sin($iWinkel * $iDeg) * $iLaenge
$aRet[1] = Cos($iWinkel * $iDeg) * $iLaenge
Return $aRet
EndFunc ;==>Dreieck#endregion FEUERWERK
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]; #FUNCTION# ====================================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; Name...........: _GDIPlus_GraphicsSetClipRect
; Description ...: Updates the clipping region of a Graphics object to a region that is the combination of itself and a rectangle
; Syntax.........: _GDIPlus_GraphicsSetClipRect($hGraphics, $nX, $nY, $nWidth, $nHeight[, $iCombineMode = 0])
; Parameters ....: $hGraphics - Pointer to a Graphics object
; $nX - X coordinate of the upper-left corner of the rectangle
; $nY - Y coordinate of the upper-left corner of the rectangle
; $nWidth - Width of the rectangle
; $nHeight - Height of the rectangle
; $iCombineMode - Regions combination mode:
; |0 - The existing region is replaced by the new region
; |1 - The existing region is replaced by the intersection of itself and the new region
; |2 - The existing region is replaced by the union of itself and the new region
; |3 - The existing region is replaced by the result of performing an XOR on the two regions
; |4 - The existing region is replaced by the portion of itself that is outside of the new region
; |5 - The existing region is replaced by the portion of the new region that is outside of the existing region
; Return values .: Success - True
; Failure - False and either:
; |@error and @extended are set if DllCall failed
; |$GDIP_STATUS contains a non zero value specifying the error code
; Remarks .......: None
; Related .......: None
; Link ..........; @@MsdnLink@@ GdipSetClipRect
; Example .......; No
; ===============================================================================================================================
Func _GDIPlus_GraphicsSetClipRect($hGraphics, $nX, $nY, $nWidth, $nHeight, $iCombineMode = 0)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetClipRect", "hwnd", $hGraphics, "float", $nX, "float", $nY, "float", $nWidth, "float", $nHeight, "int", $iCombineMode)If @error Then Return SetError(@error, @extended, False)
[/autoit]
$GDIP_STATUS = $aResult[0]
Return $aResult[0] = 0
EndFunc ;==>_GDIPlus_GraphicsSetClipRect
#endregion BILDSCHIRMSCHOHNERIch hoffe ihr könnt mir helfen...
-
nein die Dateiendung ist nicht das Problem!! das script sollte sich normalerweise auch ausführen können, wenn es noch eine au3 Datei ist, klar es kann dann natürlich nicht als Bildschirmschohner verwendet werden soviel ist klar dass dafür nur SCR Dateien vorgesehen sind, aber wenn ich das Script ausführe selbst wenn das Bildschirmschonertool drinne ist, sollte normalerweise das Script ausgeführt werden, was aber diesmal nicht der Fall ist, entweder es sagt ständig dass bestimmte Variablen nicht deklariert worden sind obwohl das doch der Fall ist gut dann deklariere ich sie Local dann gibts keinen Fehler dazu mehr aber dann passiert eben gar nichts mehr und das soll so nicht sein, kann mir jemand da BITTE helfen??
-
Zitat
Oh, tut mir leid!
Ich hatte aus dem Titel geschlossen, daß dort der Sourcecode vorhanden wäre. Nun habe ich reingeschaut und festgestellt, es ist nicht so ...Kein Problem...
Hat denn sonst keiner ne Idee? woran das liegen könnte dass das Script mit diesem Bildschirmschohnertool nicht funktioniert??
-
@guw
die Seite die du gepostet hast bringt mich in meinem Problem nicht weiter!!chip
das Problem ist, das Script für den Countdown mit Schnee funktioniert als normales Programm (ohne Bildschirmschohnertools) wunderbar, aber sobald ich dann die Bildschirmschohnertoos dazuschreibe funktioniert es nicht mehr. wo ist da das Problem? -
Hallo Leute, vielleicht könnt ihr mir helfen, ich versuche schon die ganze zeit dieses Script hier, als Bildschirmschohner umzuschreiben, Bildschirmschohner Script also das wo man des mit deen Einstellungen usw machen kann, ist schon vorhanden in dem script aber leider will es nicht so ganz laufen, könnt ihr mir helfen??
wäre super...Spoiler anzeigen
[autoit]; -Authors: name22 (http://www.autoit.de), Andy (http://www.autoit.de), Facemix (http://www.autoit.de)
[/autoit] [autoit][/autoit] [autoit]#AutoIt3Wrapper_OutFile=New-Year-Countdown.scr
[/autoit] [autoit][/autoit] [autoit]
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
#AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_Obfuscated.au3"
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Res_Description=Professional Screensaver made by (C) Clemens 2012
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Res_Language=1033
#AutoIt3Wrapper_Res_Field=Version|1.0.0
#AutoIt3Wrapper_Res_Field=Build|2012-24-12
#AutoIt3Wrapper_Res_Field=Coded by| (C) Clemens
#AutoIt3Wrapper_Res_Field=Compile date|%longdate% %time%
#AutoIt3Wrapper_Run_After=upx.exe --best --lzma "%out%"
;#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6#include <EditConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <Misc.au3>
#include <SliderConstants.au3>
#include <Timers.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#include <GDIPlus.au3>
#include <WinAPI.au3>
#include <Date.au3>Opt('MustDeclareVars', 1)
[/autoit] [autoit][/autoit] [autoit]
Opt('GUIOnEventMode', 1)#region WINDOWSTOOL
[/autoit] [autoit][/autoit] [autoit]
;=================================================================
; Windows-Tools
;=================================================================_Singleton(@AutoItExe)
[/autoit] [autoit][/autoit] [autoit]Dim $iCount = 10, $iExplosion = 100, $iExplosionGround = 1, $iRadius = 600, $iBack = 0x09000000, $iSleep = 5
[/autoit] [autoit][/autoit] [autoit]Global Const $app_name = "GDI+ Countdown-Screensaver by (C) Clemens 2012"
[/autoit] [autoit][/autoit] [autoit]
Global Const $ver = "v1.0 build 2012-11-24"
Global $hWnd, $iW, $iH, $GUI_H, $GUI_W, $GUI_X, $GUI_Y, $r, $show_FPS = 0
Global $maxStars = 150, $size = 1
Global $parent_pid, $aChildProcess
Global Const $hFullScreen = WinGetHandle("Program Manager")
Global Const $aFullScreen = WinGetPos($hFullScreen)
Global $main_screen_x = Abs($aFullScreen[0])
Global Const $ini_file = @ScriptDir & "\GDI+ Countdown-Screensaver.ini"
;If FileExists($ini_file) Then
; $iColor_BG = IniRead($ini_file, "Settings", "bgcolor", 0xFF008000)
; $iColor_TextFill = IniRead($ini_file, "Settings", "txtcolor", 0xFFFFAA00)
;EndIfGlobal $cmdparam = "/s"
[/autoit] [autoit][/autoit] [autoit]
If $CmdLine[0] Then $cmdparam = StringLeft($CmdLine[1], 2)Switch $cmdparam
[/autoit] [autoit][/autoit] [autoit]
Case "/s"
$iW = @DesktopWidth
$iH = @DesktopHeight
$GUI_X = $aFullScreen[0]
$GUI_Y = $aFullScreen[1]
$GUI_W = $aFullScreen[2]
$GUI_H = $aFullScreen[3]
$r = (($iW + $iH) / 2) / 0x300
$hWnd = GUICreate($app_name, $GUI_W, $GUI_H, $GUI_X, $GUI_Y, $WS_POPUP, $WS_EX_TOPMOST)
Case "/c"
Opt("GUIOnEventMode", 0)
ExitCase "/p"
[/autoit] [autoit][/autoit] [autoit]
$iW = 152
$iH = 112
$GUI_X = 0
$GUI_Y = 0
$GUI_W = $iW
$GUI_H = $iH
$main_screen_x = 0
$r = (($iW + $iH) / 2) / 0x30
$show_FPS = False
;$maxStars = 30
$size = 1
$hWnd = GUICreate("GDI+ Countdown-Screensaver by (C) Clemens", $GUI_W, $GUI_H, $GUI_X, $GUI_Y, $WS_POPUP)
_WinAPI_SetParent($hWnd, $CmdLine[2])
;$parent_pid = _WinAPI_GetParentProcess(@AutoItPID)
Exit
EndSwitch;==================================================================
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
#endregion WINDOWSTOOL#region SCHNEESCHIRMSCHOHNER
[/autoit] [autoit][/autoit] [autoit]
Opt("GUIOnEventMode", 1)Global Const $nTau = ACos(-1) * 2
[/autoit] [autoit][/autoit] [autoit]
Global $vNTdll = DllOpen("ntdll.dll")
Global $tPrecSleep = DllStructCreate("int64 time;")
Global $pPrecSleep = DllStructGetPtr($tPrecSleep)#region SETTINGS
[/autoit] [autoit][/autoit] [autoit]Global $iWidth = @DesktopWidth
[/autoit] [autoit][/autoit] [autoit]
Global $iHeight = @DesktopHeight
Global $nFPS = 60Global $nStepSpeed = 1
[/autoit] [autoit][/autoit] [autoit]#region COLORS
[/autoit] [autoit][/autoit] [autoit]
Global $iARGB_BG = 0xFF505050
Global $iARGB_Snow = 0xFFFFFFFF
Global $iARGB_TextFill = 0xFF0000FF
Global $iARGB_TextFill2 = 0xFFFF0000
Global $iARGB_TextFill3 = 0xFF0000FF
Global $iARGB_TextFill4 = 0xFF353535
Global $iARGB_TextBorder = 0xFFA00000
#endregion COLORS#region SNOWFLAKES
[/autoit] [autoit][/autoit] [autoit]
Global $iFlakeCount = 500
Global $iMinFallingSpeed = 20, $iMaxFallingSpeed = 50
Global $iMinOscillations = 2, $iMaxOscillations = 5
Global $iMinOscillationDist = 10, $iMaxOscillationDist = 50
Global $iMinRadius = 1, $iMaxRadius = 3
#endregion SNOWFLAKES#region SNOWBLAST
[/autoit] [autoit][/autoit] [autoit]
Global $iBlastRadius = 200
Global $iBlastAccell = 300
Global $nAirFriction = 0.95
#endregion SNOWBLAST#endregion SETTINGS
[/autoit] [autoit][/autoit] [autoit]#region Global Variables
[/autoit] [autoit][/autoit] [autoit]
Global $aFlakes[$iFlakeCount + 1][8] = [[$iFlakeCount]]
Global $hWnd, $hDC_Window, $hDC_Bitmap, $hBitmap, $hGraphics, $hOldObj, $hBrush_Snow, $hBrush_TextFill, $hPen_Border
Global $hMatrix, $tLayout, $hFormat, $hFamily, $hPath, $nScale, $nStep = 0, $iH, $iM, $iS, $iD, $sText, $sTextOld
Global $nSleepTime = 1000 / $nFPS
#endregion Global Variables#region Generate Snow
[/autoit] [autoit][/autoit] [autoit]
For $i = 1 To $aFlakes[0][0]
$aFlakes[$i][0] = Random(10, $iWidth - 10, 1)
$aFlakes[$i][1] = Random(-$iHeight, 0, 1)
$aFlakes[$i][2] = 0
$aFlakes[$i][3] = 0
$aFlakes[$i][4] = Random($iMinRadius, $iMaxRadius, 1)
$aFlakes[$i][5] = Random($iMinFallingSpeed, $iMaxFallingSpeed)
$aFlakes[$i][6] = Random($iMinOscillations, $iMaxOscillations, 1)
$aFlakes[$i][7] = Random($iMinOscillationDist, $iMaxOscillationDist) * (-1) ^ Random(1, 2, 1)
Next
#endregion Generate Snow;$hWnd = GUICreate("name22 - Snowflakes", $iWidth, $iHeight, 0, 0, BitOR($WS_POPUP, $WS_POPUPWINDOW, $WS_EX_TOPMOST))
[/autoit] [autoit][/autoit] [autoit]
;GUISetState()#region Initialize GFX Resources
[/autoit] [autoit][/autoit] [autoit]
$hDC_Window = _WinAPI_GetDC($hWnd)
$hDC_Bitmap = _WinAPI_CreateCompatibleDC($hDC_Window)
$hBitmap = _WinAPI_CreateCompatibleBitmap($hDC_Window, $iWidth, $iHeight)
$hOldObj = _WinAPI_SelectObject($hDC_Bitmap, $hBitmap)_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]$hGraphics = _GDIPlus_GraphicsCreateFromHDC($hDC_Bitmap)
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_GraphicsSetClipRect($hGraphics, 0, 0, $iWidth, $iHeight)
_GDIPlus_GraphicsSetSmoothingMode($hGraphics, 2)$hBrush_Snow = _GDIPlus_BrushCreateSolid($iARGB_Snow)
[/autoit] [autoit][/autoit] [autoit]
$hBrush_TextFill = _GDIPlus_BrushCreateSolid($iARGB_TextFill)
$hPen_Border = _GDIPlus_PenCreate($iARGB_TextBorder, 3)
DllCall($ghGDIPDll, "uint", "GdipSetPenLineJoin", "hwnd", $hPen_Border, "int", 2)$hMatrix = _GDIPlus_MatrixCreate()
[/autoit] [autoit][/autoit] [autoit]
$tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0)
$hFormat = _GDIPlus_StringFormatCreate()
$hFamily = _GDIPlus_FontFamilyCreate("Arial")
$hPath = _CreatePath("88 - 88:88:88")_GDIPlus_GraphicsClear($hGraphics, $iARGB_BG)
[/autoit] [autoit][/autoit] [autoit]
_Redraw()
#endregion Initialize GFX Resources#region Register Events
[/autoit] [autoit][/autoit] [autoit]
OnAutoItExitRegister("_Shutdown")
GUIRegisterMsg($WM_PAINT, "_Redraw")
GUISetOnEvent($GUI_EVENT_CLOSE, "_Close")
GUISetOnEvent($GUI_EVENT_PRIMARYDOWN, "_Click")AdlibRegister("_UpdateTime", 100)
[/autoit] [autoit][/autoit] [autoit]
#endregion Register EventsLocal $nT_Sleep
[/autoit] [autoit][/autoit] [autoit]
$nT_Sleep = TimerInit() + $nSleepTimeWhile True
[/autoit] [autoit][/autoit] [autoit]
Local $nFrameTime, $nFPS_Cur
DllStructSetData($tPrecSleep, "time", -10000 * ($nSleepTime - TimerDiff($nT_Sleep)))
DllCall($vNTdll, "dword", "ZwDelayExecution", "int", 0, "ptr", $pPrecSleep)
$nFrameTime = TimerDiff($nT_Sleep)
$nT_Sleep = TimerInit()$nFPS_Cur = 1000 / $nFrameTime
[/autoit] [autoit][/autoit] [autoit]$nStep += $nStepSpeed / $nFPS_Cur
[/autoit] [autoit][/autoit] [autoit]
$nScale = Abs(Sin($nStep))_GDIPlus_GraphicsClear($hGraphics, $iARGB_BG)
[/autoit] [autoit][/autoit] [autoit]DllCall($ghGDIPDll, "uint", "GdipTranslateWorldTransform", "hwnd", $hGraphics, "float", -$iWidth / 2, "float", -$iHeight / 2, "int", False)
[/autoit] [autoit][/autoit] [autoit]
DllCall($ghGDIPDll, "uint", "GdipScaleWorldTransform", "hwnd", $hGraphics, "float", $nScale, "float", $nScale, "int", True)
DllCall($ghGDIPDll, "uint", "GdipTranslateWorldTransform", "hwnd", $hGraphics, "float", $iWidth / 2, "float", $iHeight / 2, "int", True)DllCall($ghGDIPDll, "uint", "GdipDrawPath", "hwnd", $hGraphics, "hwnd", $hPen_Border, "hwnd", $hPath)
[/autoit] [autoit][/autoit] [autoit]
DllCall($ghGDIPDll, "uint", "GdipFillPath", "hwnd", $hGraphics, "hwnd", $hBrush_TextFill, "hwnd", $hPath)DllCall($ghGDIPDll, "uint", "GdipResetWorldTransform", "hwnd", $hGraphics)
[/autoit] [autoit][/autoit] [autoit]For $i = 1 To $aFlakes[0][0]
[/autoit] [autoit][/autoit] [autoit]
$aFlakes[$i][1] += ($aFlakes[$i][5] + $aFlakes[$i][3]) / $nFPS_Cur
$aFlakes[$i][0] += (Sin($aFlakes[$i][1] / $iHeight * $nTau * $aFlakes[$i][6]) * $aFlakes[$i][7] + $aFlakes[$i][2]) / $nFPS_Cur
$aFlakes[$i][2] *= $nAirFriction
$aFlakes[$i][3] *= $nAirFriction
If $aFlakes[$i][1] > $iHeight Or $aFlakes[$i][0] < -20 Or $aFlakes[$i][0] > $iWidth + 20 Then
$aFlakes[$i][0] = Random(10, $iWidth - 10, 1)
$aFlakes[$i][1] = Random(-$iHeight, 0, 1)
$aFlakes[$i][2] = 0
$aFlakes[$i][3] = 0
$aFlakes[$i][4] = Random($iMinRadius, $iMaxRadius, 1)
$aFlakes[$i][5] = Random($iMinFallingSpeed, $iMaxFallingSpeed)
$aFlakes[$i][6] = Random($iMinOscillations, $iMaxOscillations, 1)
$aFlakes[$i][7] = Random($iMinOscillationDist, $iMaxOscillationDist)
EndIf
_GDIPlus_GraphicsFillEllipse($hGraphics, $aFlakes[$i][0] - $aFlakes[$i][4] / 2, $aFlakes[$i][1] - $aFlakes[$i][4] / 2, $aFlakes[$i][4] * 2, $aFlakes[$i][4] * 2, $hBrush_Snow)
Next
_WinAPI_BitBlt($hDC_Window, 0, 0, $iWidth, $iHeight, $hDC_Bitmap, 0, 0, $SRCCOPY)
WEndFunc _UpdateTime()
[/autoit] [autoit][/autoit] [autoit]
_TicksToTime(_DateDiff('s', _NowCalc(), "2013/01/01 00:00:00") * 1000, $iH, $iM, $iS)
If $iH > 23 Then
$iD = StringFormat("%02i", $iH / 24); volle Tage
$iH = $iH - ($iD * 24); volle Tage abziehen
Else
$iD = 0
EndIfIf $sText = "00 - 00:00:00" Then
[/autoit] [autoit][/autoit] [autoit]
AdlibUnRegister("_UpdateTime")
Feuerwerk() ; Funktion Feuerwerk soll dann ausgeführt werden
Else
$sText = StringFormat("%02i - %02i:%02i:%02i", $iD, $iH, $iM, $iS)
EndIfIf $sText <> $sTextOld Then
[/autoit] [autoit][/autoit] [autoit]
$sTextOld = $sText
DllCall($ghGDIPDll, "uint", "GdipResetPath", "hwnd", $hPath)
DllCall($ghGDIPDll, "uint", "GdipAddPathString", "hwnd", $hPath, "wstr", $sText, "int", -1, "hwnd", $hFamily, "int", 1, "float", 100, "ptr", DllStructGetPtr($tLayout), "hwnd", $hFormat)
DllCall($ghGDIPDll, "uint", "GdipTransformPath", "hwnd", $hPath, "hwnd", $hMatrix)
EndIf
EndFuncFunc _Click()
[/autoit] [autoit][/autoit] [autoit]
Local $tMousePos = _WinAPI_GetMousePos(True, $hWnd), $iX_Dist, $iY_Dist, $iDist
For $i = 1 To $aFlakes[0][0]
$iX_Dist = ($aFlakes[$i][0] - $aFlakes[$i][4]) - DllStructGetData($tMousePos, "X")
$iY_Dist = ($aFlakes[$i][1] - $aFlakes[$i][4]) - DllStructGetData($tMousePos, "Y")
$iDist = Sqrt($iX_Dist ^ 2 + $iY_Dist ^ 2)
If $iDist = 0 Then ContinueLoop
If $iDist < $iBlastRadius Then
$aFlakes[$i][2] = (1 - $iDist / $iBlastRadius) * ($iX_Dist / $iDist) * $iBlastAccell
$aFlakes[$i][3] = (1 - $iDist / $iBlastRadius) * ($iY_Dist / $iDist) * $iBlastAccell
EndIf
Next
EndFunc ;==>_ClickFunc _Redraw()
[/autoit] [autoit][/autoit] [autoit]
_WinAPI_BitBlt($hDC_Window, 0, 0, $iWidth, $iHeight, $hDC_Bitmap, 0, 0, $SRCCOPY)
EndFunc ;==>_RedrawFunc _Close()
[/autoit] [autoit][/autoit] [autoit]
Exit
EndFunc ;==>_CloseFunc _Shutdown()
[/autoit] [autoit][/autoit] [autoit]
_WinAPI_SelectObject($hDC_Bitmap, $hOldObj)
_WinAPI_ReleaseDC($hWnd, $hDC_Window)
_WinAPI_DeleteDC($hDC_Bitmap)
_WinAPI_DeleteObject($hBitmap)_GDIPlus_GraphicsDispose($hGraphics)
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_BrushDispose($hBrush_Snow)
_GDIPlus_PenDispose($hPen_Border)
_GDIPlus_MatrixDispose($hMatrix)
_GDIPlus_StringFormatDispose($hFormat)
_GDIPlus_FontFamilyDispose($hFamily)
DllCall($ghGDIPDll, "uint", "GdipDeletePath", "hwnd", $hPath)
_GDIPlus_Shutdown()DllClose($vNTdll)
[/autoit] [autoit][/autoit] [autoit]
EndFunc ;==>_ShutdownFunc _CreatePath($sText)
[/autoit] [autoit][/autoit] [autoit]Local $tBounds = _GDIPlus_RectFCreate(0, 0, 0, 0)
[/autoit] [autoit][/autoit] [autoit]Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreatePath", "int", 0, "int*", 0)
[/autoit] [autoit][/autoit] [autoit]
If @error Or Not IsArray($aResult) Then Return SetError(1, 1, False)
Local $hPath = $aResult[2]DllCall($ghGDIPDll, "uint", "GdipAddPathString", "hwnd", $hPath, "wstr", $sText, "int", -1, "hwnd", $hFamily, "int", 1, "float", 100, "ptr", DllStructGetPtr($tLayout), "hwnd", $hFormat)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
DllCall($ghGDIPDll, "uint", "GdipGetPathWorldBounds", "hwnd", $hPath, "ptr", DllStructGetPtr($tBounds), "hwnd", 0, "hwnd", 0)_GDIPlus_MatrixTranslate($hMatrix, -DllStructGetData($tBounds, "X"), -DllStructGetData($tBounds, "Y"))
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_MatrixScale($hMatrix, $iWidth / DllStructGetData($tBounds, "Width"), $iHeight / DllStructGetData($tBounds, "Height"), True)
DllCall($ghGDIPDll, "uint", "GdipTransformPath", "hwnd", $hPath, "hwnd", $hMatrix)Return $hPath
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
EndFunc ;==>_CreatePath#region FEUERWERK
[/autoit] [autoit][/autoit] [autoit]Func Feuerwerk()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
Local $aDraw
Local $iCount = 10, $iExplosion = 100, $iExplosionGround = 1, $iRadius = 600, $iBack = 0x09000000, $iSleep = 5
Global $iWidth2 = @DesktopWidth, $iHeight2 = @DesktopHeight, $aStart[$iCount][4] = [[Random(0, $iWidth2, 0), Random(0, $iHeight2, 0), 0, _GDIPlus_PenCreate(Random(0xFF000000, 0xFFFFFFFF, 0))],[Random(0, $iWidth2, 0), Random(0, $iHeight2, 0), 0, _GDIPlus_PenCreate(Random(0xFF000000, 0xFFFFFFFF, 0))]], $iSleeping = 0
For $i = 0 To UBound($aStart) - 1
$aStart[$i][0] = Random(0, $iWidth2, 0)
$aStart[$i][1] = Random(0, $iHeight2, 0)
$aStart[$i][2] = $iExplosion
$aStart[$i][3] = _GDIPlus_PenCreate(Random(0xFF000000, 0xFFFFFFFF, 0))
NextWhile True
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_GraphicsClear($hGraphics, $iBack)
If $iSleeping = 0 Then
For $j = 0 To UBound($aStart) - 1
For $i = 0 To 35
$aDraw = Dreieck($i * 10, $aStart[$j][2] - $iExplosion)
_GDIPlus_GraphicsDrawRect($hGraphics, $aStart[$j][0] + Round($aDraw[0], 0), $aStart[$j][1] + Round($aDraw[1], 0), 2, 2, $aStart[$j][3])
Next
$aStart[$j][2] += $iExplosionGround + Ceiling(10 * $iExplosion / ($aStart[$j][2]))
If $aStart[$j][2] > $iRadius Then
$iSleeping = $iSleep
$aStart[$j][0] = Random(0, $iWidth2, 0)
$aStart[$j][1] = Random(0, $iHeight2, 0)
$aStart[$j][2] = $iExplosion
_GDIPlus_PenDispose($aStart[$j][3])
$aStart[$j][3] = _GDIPlus_PenCreate(Random(0xFF000000, 0xFFFFFFFF, 0))
EndIf
Next
Else
$iSleeping -= 1
EndIf
_WinAPI_RedrawWindow($hWnd, 0, 0, 2)
WEnd
EndFunc ;==>FeuerwerkFunc Dreieck($iWinkel, $iLaenge)
[/autoit] [autoit][/autoit] [autoit]
Local $iDeg = 0.0174532925199433, $aRet[2]
$aRet[0] = Sin($iWinkel * $iDeg) * $iLaenge
$aRet[1] = Cos($iWinkel * $iDeg) * $iLaenge
Return $aRet
EndFunc ;==>Dreieck#endregion FEUERWERK
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]; #FUNCTION# ====================================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; Name...........: _GDIPlus_GraphicsSetClipRect
; Description ...: Updates the clipping region of a Graphics object to a region that is the combination of itself and a rectangle
; Syntax.........: _GDIPlus_GraphicsSetClipRect($hGraphics, $nX, $nY, $nWidth, $nHeight[, $iCombineMode = 0])
; Parameters ....: $hGraphics - Pointer to a Graphics object
; $nX - X coordinate of the upper-left corner of the rectangle
; $nY - Y coordinate of the upper-left corner of the rectangle
; $nWidth - Width of the rectangle
; $nHeight - Height of the rectangle
; $iCombineMode - Regions combination mode:
; |0 - The existing region is replaced by the new region
; |1 - The existing region is replaced by the intersection of itself and the new region
; |2 - The existing region is replaced by the union of itself and the new region
; |3 - The existing region is replaced by the result of performing an XOR on the two regions
; |4 - The existing region is replaced by the portion of itself that is outside of the new region
; |5 - The existing region is replaced by the portion of the new region that is outside of the existing region
; Return values .: Success - True
; Failure - False and either:
; |@error and @extended are set if DllCall failed
; |$GDIP_STATUS contains a non zero value specifying the error code
; Remarks .......: None
; Related .......: None
; Link ..........; @@MsdnLink@@ GdipSetClipRect
; Example .......; No
; ===============================================================================================================================
Func _GDIPlus_GraphicsSetClipRect($hGraphics, $nX, $nY, $nWidth, $nHeight, $iCombineMode = 0)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetClipRect", "hwnd", $hGraphics, "float", $nX, "float", $nY, "float", $nWidth, "float", $nHeight, "int", $iCombineMode)
Local $GDIP_STATUSIf @error Then Return SetError(@error, @extended, False)
[/autoit] [autoit][/autoit] [autoit]
$GDIP_STATUS = $aResult[0]
Return $aResult[0] = 0
EndFunc ;==>_GDIPlus_GraphicsSetClipRect#endregion SCHNEESCHIRMSCHOHNER
[/autoit]Danke schonmal für eure Hilfe
-
Bei mir funktioniert es einwandfrei!!
ich habe es mit diesen 3 Bilddateien getestet:.bmp
.png
.jpgfunktionieren alle 3!! Ich nutze auch Win7x64
vielleicht probierst du mal .jpg aus des sollte immer funktionieren
Edit: hatte das mit der transparenz nicht gelesen tut mir leid, ja da ist PNG das ideale dafür
-
Herzlich willkommen auch von mir

-
schönes schneien auf dem Desktop, ist nur ein bisschen unpassend dass die Fenster durchlöchert werden
aber sieht cool aus -
name22
danke, denn ich hatte es tatsächlich nicht auf den Wettbewerb abgesehen, ich möchte einfach ein kleines Weihnachtsscript für mich schreiben
Dein Script schaut super aus, auch die kleine extra spielerei finde ich ganz lustig dass beim Click in die GUI die Schneeflocken vom Curser wegfliegen, und sonst ist es ganz genau das was ich gesucht habe ich danke dir

minx, BinDannMalWeg
klar ihr habt recht icht hätte es auf den Wettbewerb abziehlen können, doch das ist jedoch nicht der Fall, seid euch versichert, ich hätte genau diese Frage auch gebracht wenn hier nicht gerade ein Wettbewerb laufen würde