Ich bekomme 2 Errors, also ist dein Script nicht lauffähig. Und was zum Teufel willst du "rausräumen"? ![]()
Beiträge von name22
-
-
Wie wäre es mit einem lauffähigen Script? Abgesehen davon weiß ich nicht was du mit "Seite" meinst. Eine Internetseite? Die rechte Seite? Die Schreibtischunterseite?
Dein Code ist absolut unübersichtlich und unlogisch. Du erstellst Brushes laufend in einer Endlosschleife neu, du räumst keine deiner Daten wieder aus dem Arbeitsspeicher auf etc. -
Probier doch mal direkt die exes anzusteuern. Mit einem Bild oder so.
-
Also bei mir funktioniert es problemlos. Nur Umlaute erkennt er nicht, ist ja auch ein englisches Programm wenn ich mich nicht irre.

-
Zitat
Ich weiss, das ist ne blöde frage: Wie macht man das "ÄT" Zeichen unter Linux?
Das hat absolut nichts mit dem Thema des Threads zu tun. Bitte unterlasse in Zukunft solche Posts. -
Das ist schon eigenartig... Es könnte Betriebsystemabhängig sein, aber auch mit dem Codec des Videos zusammenhängen. Bei mir enthalten die IDs 277 und 275 die Breite und Höhe des Videos. Versuch es halt mal mit einer der Möglichkeiten aus den anderen Beiträgen ;).
-
Mit der ExtProp.au3 geht das auch ;).
Spoiler anzeigen
[autoit]$iWidth = _GetExtProperty(@ScriptDir & "\Test.avi", 277)
[/autoit] [autoit][/autoit] [autoit]
$iHeight = _GetExtProperty(@ScriptDir & "\Test.avi", 275)ConsoleWrite($iWidth & " : " & $iHeight & @CRLF)
[/autoit] [autoit][/autoit] [autoit];===============================================================================
[/autoit]
; Function Name: GetExtProperty($sPath,$iProp)
; Description: Returns an extended property of a given file.
; Parameter(s): $sPath - The path to the file you are attempting to retrieve an extended property from.
; $iProp - The numerical value for the property you want returned. If $iProp is is set
; to -1 then all properties will be returned in a 1 dimensional array in their corresponding order.
; The properties are as follows:
; Name = 0
; Size = 1
; Type = 2
; DateModified = 3
; DateCreated = 4
; DateAccessed = 5
; Attributes = 6
; Status = 7
; Owner = 8
; Author = 9
; Title = 10
; Subject = 11
; Category = 12
; Pages = 13
; Comments = 14
; Copyright = 15
; Artist = 16
; AlbumTitle = 17
; Year = 18
; TrackNumber = 19
; Genre = 20
; Duration = 21
; BitRate = 22
; Protected = 23
; CameraModel = 24
; DatePictureTaken = 25
; Dimensions = 26
; Width = 27
; Height = 28
; Company = 30
; Description = 31
; FileVersion = 32
; ProductName = 33
; ProductVersion = 34
; Requirement(s): File specified in $spath must exist.
; Return Value(s): On Success - The extended file property, or if $iProp = -1 then an array with all properties
; On Failure - 0, @Error - 1 (If file does not exist)
; Author(s): Simucal ([email='Simucal@gmail.com'][/email])
; Note(s):
;
;===============================================================================
Func _GetExtProperty($sPath, $iProp)
Local $iExist, $sFile, $sDir, $oShellApp, $oDir, $oFile, $aProperty, $sProperty
$iExist = FileExists($sPath)
If $iExist = 0 Then
SetError(1)
Return 0
Else
$sFile = StringTrimLeft($sPath, StringInStr($sPath, "\", 0, -1))
$sDir = StringTrimRight($sPath, (StringLen($sPath) - StringInStr($sPath, "\", 0, -1)))
$oShellApp = ObjCreate ("shell.application")
$oDir = $oShellApp.NameSpace ($sDir)
$oFile = $oDir.Parsename ($sFile)
If $iProp = -1 Then
Local $aProperty[35]
For $i = 0 To 34
$aProperty[$i] = $oDir.GetDetailsOf ($oFile, $i)
Next
Return $aProperty
Else
$sProperty = $oDir.GetDetailsOf ($oFile, $iProp)
If $sProperty = "" Then
Return 0
Else
Return $sProperty
EndIf
EndIf
EndIf
EndFunc ;==>_GetExtProperty -
Dietmar So wie ich das sehe, ist das kein Bot sondern eher ein Spiel.

-
Ich glaube diese Frage wurde im Forum schon in der einen oder anderen Form oft genug gestellt. Probier mal die Forensuche ;).
-
Sehr beeindruckend
! Macht weiter so. 
-
Wie stark, verlustfrei komprimiert werden kann hängt nicht nur vom Dateiformat sondern auch von der Datei selbst ab... Das meinte ich damit.
-
Zitat
Man kann z.B. Jpg verlustfrei um ein Drittel verkleinern. (also nach dem Entpacken hat man keine Qualitätseinbußen)
Das sagt wenig aus...
-
Weil sich nicht jeder da anmelden darf?
-
Gute Idee. Ist mir gar nicht aufgefallen ^^. Ich werds gleich mal einbauen.
-
Weil GUICtrlDelete für GUI Controls gedacht ist und nicht für GUIs so wie GUIDelete...

-
Zitat
Alle paar Wochen verschwindet dann alles in einem Ordner Namens "Desktop_xyz" und wird zu den Akten gelegt.
So mache ich das nur bei meinen Scripten... Und die scheinen sich extrem schnell zu vermehren, weil ich die alten Beispiele zwischen den ca. 2000 anderen nicht mehr wiederfinde und dann neu schreibe, nur um sie später wieder im Scripte-Ordner zu verstauen. :pinch: -
Schau dir mal GUISwitch an. Ich würde dir aber empfehlen, alle GUIs am Anfang des Scripts zu erstellen und im Verlauf des Programmes einfach zu verstecken/sichtbar zu machen. Das ist ein übersichtlicher Programmierstil was GUIs betrifft.
-
Hier noch eine optisch ansprechendere, jedoch auch schwierigere Version ;).
Beispiel
[autoit]#include <WindowsConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstants.au3>
#include <GDIPlus.au3>
#include <WinAPI.au3>
#include <INet.au3>; - Author: name22 (http://www.autoit.de)
[/autoit] [autoit][/autoit] [autoit]Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]$sIP = _GetIP()
[/autoit] [autoit][/autoit] [autoit]$sFont = "Segoe UI"
[/autoit] [autoit][/autoit] [autoit]
$iFontSize = 30$tSize = DllStructCreate($tagSIZE)
[/autoit] [autoit][/autoit] [autoit]
$pSize = DllStructGetPtr($tSize)
DllStructSetData($tSize, "X", 400)
DllStructSetData($tSize, "Y", 200)
$tSource = DllStructCreate($tagPOINT)
$pSource = DllStructGetPtr($tSource)
$tBlend = DllStructCreate($tagBLENDFUNCTION)
$pBlend = DllStructGetPtr($tBlend)
DllStructSetData($tBlend, "Alpha", 255)
DllStructSetData($tBlend, "Format", 1)
$tPoint = DllStructCreate($tagPOINT)
$pPoint = DllStructGetPtr($tPoint)
DllStructSetData($tPoint, "X", 0)
DllStructSetData($tPoint, "Y", 0)$hWnd = GUICreate("", 400, 200, Default, Default, $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW + $WS_EX_LAYERED + $WS_EX_TRANSPARENT)
[/autoit] [autoit][/autoit] [autoit]
GUISetState()$hDC_Window = _WinAPI_GetDC($hWnd)
[/autoit] [autoit][/autoit] [autoit]
$hDC_Buffer = _WinAPI_CreateCompatibleDC($hDC_Window)
$hGDI_Bitmap = _WinAPI_CreateCompatibleBitmap($hDC_Window, 400, 200)
_WinAPI_SelectObject($hDC_Buffer, $hGDI_Bitmap)_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]$hGraphic = _GDIPlus_GraphicsCreateFromHDC($hDC_Buffer)
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_GraphicsSetSmoothingMode($hGraphic, 2)
_GDIPlus_GraphicsSetTextRenderingHint($hGraphic, 3)$hStringFormat = _GDIPlus_StringFormatCreate()
[/autoit] [autoit][/autoit] [autoit]
$hFamily = _GDIPlus_FontFamilyCreate($sFont)
$hFont = _GDIPlus_FontCreate($hFamily, $iFontSize, 1)$aMeasure = _GDIPlus_GraphicsMeasureString($hGraphic, $sIP, $hFont, _GDIPlus_RectFCreate(), $hStringFormat)
[/autoit] [autoit][/autoit] [autoit]
$tLayout = _GDIPlus_RectFCreate(400 / 2 - DllStructGetData($aMeasure[0], "Width") / 2, 200 / 2 - DllStructGetData($aMeasure[0], "Height") / 2)$hBrush = _GDIPlus_BrushCreateSolid(0xA0000000)
[/autoit] [autoit][/autoit] [autoit]GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
[/autoit] [autoit][/autoit] [autoit]
HotKeySet("{ESC}", "_Exit")_GDIPlus_GraphicsDrawStringEx($hGraphic, $sIP, $hFont, $tLayout, $hStringFormat, $hBrush)
[/autoit] [autoit][/autoit] [autoit]
_WinAPI_UpdateLayeredWindow($hWnd, $hDC_Window, 0, $pSize, $hDC_Buffer, $pSource, 0, $pBlend, 2)While Sleep(1000)
[/autoit] [autoit][/autoit] [autoit]
WEndFunc _Exit()
[/autoit] [autoit][/autoit] [autoit]
_WinAPI_ReleaseDC($hWnd, $hDC_Window)
_WinAPI_DeleteDC($hDC_Buffer)
_WinAPI_DeleteObject($hGDI_Bitmap)_GDIPlus_GraphicsDispose($hGraphic)
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_StringFormatDispose($hStringFormat)
_GDIPlus_FontFamilyDispose($hFamily)
_GDIPlus_FontDispose($hFont)
_GDIPlus_Shutdown()Exit
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
EndFunc; #FUNCTION# ====================================================================================================================
[/autoit] [autoit][/autoit] [autoit]
; Name...........: _GDIPlus_GraphicsSetTextRenderingHint
; Description ...: Seets the contrast value of a Graphics object
; Syntax.........: _GDIPlus_GraphicsSetTextRenderingHint($hGraphics, $iTextRenderingHint)
; Parameters ....: $hGraphics - Pointer to a Graphics object
; $iTextRenderingHint - Text rendering mode:
; |0 - Character is drawn using the currently selected system font smoothing mode (also called a rendering hint)
; |1 - Character is drawn using its glyph bitmap and hinting to improve character appearance on stems and
; +curvature
; |2 - Character is drawn using its glyph bitmap and no hinting. This results in better performance at the
; +expense of quality
; |3 - Character is drawn using its antialiased glyph bitmap and hinting. This results in much better quality
; +due to antialiasing at a higher performance cost
; |4 - Character is drawn using its antialiased glyph bitmap and no hinting. Stem width differences may be
; +noticeable because hinting is turned off
; |5 - Character is drawn using its glyph Microsoft ClearType bitmap and hinting. This type of text rendering
; +cannot be used along with $CompositingModeSourceCopy
; 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 .......: _GDIPlus_GraphicsGetTextRenderingHint
; Link ..........; @@MsdnLink@@ GdipSetTextRenderingHint
; Example .......; No
; ===============================================================================================================================
Func _GDIPlus_GraphicsSetTextRenderingHint($hGraphics, $iTextRenderingHint)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "hwnd", $hGraphics, "int", $iTextRenderingHint)If @error Then Return SetError(@error, @extended, False)
[/autoit]
$GDIP_STATUS = $aResult[0]
Return $aResult[0] = 0
EndFunc ;==>_GDIPlus_GraphicsSetTextRenderingHint -
Wenn du #RequireAdmin am Anfang des Skriptes einfügst und die Abfrage beim Start bestätigst, dann haben alle Programme die danach mit Run, RunWait etc. gestartet werden auch Adminrechte. Oder geht es dir speziell darum das bei der Verknüpfung einzustellen?
-
Zitat
Ich mag es eher simpel. =)
Untertreibung des Jahres
. Ich mag meinen Desktop auch eher... leer. Aber einen halbwegs ansprechenden Desktophintergrund brauch ich schon noch. 