Moin,
selbstverständlich darfst Du das !!!
Soweit ist das Skript vollendet, jetzt kommen eigentlich nur noch Optimierungen und evtl. JPEG/PNG-Unterstützung und/oder Transparenz.
Mal sehen wie ich Zeit finde und Lust habe ...
Gruß
Greenhorn
Moin,
selbstverständlich darfst Du das !!!
Soweit ist das Skript vollendet, jetzt kommen eigentlich nur noch Optimierungen und evtl. JPEG/PNG-Unterstützung und/oder Transparenz.
Mal sehen wie ich Zeit finde und Lust habe ...
Gruß
Greenhorn
Vielen Dank, bernd. ![]()
Kann ich gut gebrauchen.
Die von BugFix per Objekt ist auch sehr gut.
EDIT:
Deine Funktion listet aber nur auf und gibt nicht die gesuchte Datei zurück !?!
Habe sie etwas umgeschieben, funktioniert mit Verzeichnissen und Dateien.
;
$sDir = "C:\"
$sFile = FileFindRecursive ($sDir, "autoit3.exe")
ConsoleWrite ("----------------------------------------------" & @crlf)
[/autoit] [autoit][/autoit] [autoit]If $sFile Then
ConsoleWrite (StringFormat ("+> Datei gefunden in %s\n", $sFile))
Else
ConsoleWrite (StringFormat ("!> Datei wurde nicht gefunden in %s\n", $sFile))
EndIf
ConsoleWrite ("----------------------------------------------" & @crlf)
[/autoit] [autoit][/autoit] [autoit];===============================================================================
; Name: FileFindRecursive
; Description: Sucht rekursiv nach Dateien und Ordnern
; Parameter(s): $szStartPath = Pfad ab dem gesucht werden soll
; $szFileName = Datei nach der gesucht werden soll
; Requirement(s): keine
; Return Value(s): bei Erfolg: Ergebnis als String
; bei Fehler: Null
; Author(s):
;
;===============================================================================
Func FileFindRecursive ($szStartPath, $szFileName)
Local $hFF, $szFindName, $szRetValue = ""
If StringRight ($szStartPath,1) <> "\" Then $szStartPath &= "\"
$hFF = FileFindFirstFile ($szStartPath & $szFileName)
If $hFF <> -1 Then
While True
$szFindName = FileFindNextFile ($hFF)
If @error Then
FileClose ($hFF)
ExitLoop
EndIf
$szRetValue &= $szStartPath & $szFindName
If $szFindName == $szFileName Then _
Return $szRetValue ; Datei gefunden !
WEnd
EndIf
$hFF = FileFindFirstFile ($szStartPath & "*.*")
If $hFF = -1 Then Return 0 ; Datei NICHT gefunden !
[/autoit] [autoit][/autoit] [autoit]While True
$szFindName = FileFindNextFile ($hFF)
If @error Then
FileClose ($hFF)
ExitLoop
EndIf
If $szFindName == $szFileName Then _
Return $szRetValue ; Datei gefunden !
If StringInStr (FileGetAttrib ($szStartPath & $szFindName), "d") Then
$szRetValue = FileFindRecursive ($szStartPath & $szFindName & "\", $szFileName)
If $szRetValue Then _
Return $szRetValue ; Datei gefunden !
EndIf
WEnd
Return 0 ; Datei NICHT gefunden !
EndFunc ;==>FileFindRecursive
;
edit bernd670: Author entfernt - die Funktion ist so nicht von mir
Gruß
Greenhorn
Moin,
[autoit]#include <File.au3>
$array = _FileListToArray (@WindowsDir & "\cursors", "*.cur", 1)
If Not IsArray($array) Then _
Exit MsgBox(0,"Fehler","Array wurde nicht geladen")
$file = Random (1, $array[0], 1) ;=)
[/autoit]
Gruß
Greenhorn
Moin,
musst Du mal testen, welches passt.
[autoit]
BitOR ($WS_VISIBLE, $DS_SETFONT, $DS_MODALFRAME, $WS_CAPTION, $WS_SYSMENU)
; oder
$WS_EX_TOOLWINDOW
Gruß
Greenhorn
Moin,
so, nun geht alles, denke ich ... ![]()
Gruß
Greenhorn
Moin,
sieh dir mal das an:
http://www.autoitscript.com/forum/index.php?showtopic=38921&hl=diskpart
Gruß
Greenhorn
Moin,
selbstverständlich geht es auch anders.
Du nimmst einfach das "+" von der GDI+ und schon geht's. ![]()
GDI Beispiel:
;
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global $tagRECT = _
'long left;' & _
'long top;' & _
'long right;' & _
'long bottom;'
;
; Unser Rechteck.
$rcFrame = DllStructCreate ($tagRECT)
DllStructSetData ($rcFrame, "left", 150)
DllStructSetData ($rcFrame, "top", 150)
DllStructSetData ($rcFrame, "right", @DesktopWidth - 150)
DllStructSetData ($rcFrame, "bottom", @DesktopHeight - 150)
; Rahmen zeichnen.
DrawXorFrame (DllStructGetPtr ($rcFrame))
Sleep (3000)
[/autoit] [autoit][/autoit] [autoit]; Rahmen wieder löschen.
InvalidateRect (0, 0, TRUE)
; Aufräumen.
$rcFrame = 0
Exit (0)
[/autoit] [autoit][/autoit] [autoit]Func DrawXorFrame ($lpRect)
[/autoit] [autoit][/autoit] [autoit]Local $dotPatternBmp = DllStructCreate ("ushort [8]")
Local $rect = DllStructCreate ($tagRECT, $lpRect)
Local $hbm
Local $hbr
Local $hbrushOld
Local $width, $height, $x, $y
Local $border = 3
For $i = 1 To 7 Step 2
DllStructSetData ($dotPatternBmp, 1, 0x00aa, $i)
DllStructSetData ($dotPatternBmp, 1, 0x0055, $i + 1)
Next
$x = DllStructGetData ($rect, "left")
$y = DllStructGetData ($rect, "top" )
$width = DllStructGetData ($rect, "right" ) - $x
$height = DllStructGetData ($rect, "bottom") - $y
$hdc = GetDC (0)
$hbm = CreateBitmap (8, 8, 1, 1, DllStructGetPtr ($dotPatternBmp))
$hbr = CreatePatternBrush ($hbm)
SetBrushOrgEx ($hdc, $x, $y, 0)
$hbrushOld = SelectObject ($hdc, $hbr)
PatBlt ($hdc, $x+$border, $y, $width-$border, $border, $PATINVERT)
PatBlt ($hdc, $x+$width-$border, $y+$border, $border, $height-$border, $PATINVERT)
PatBlt ($hdc, $x, $y+$height-$border, $width-$border, $border, $PATINVERT)
PatBlt ($hdc, $x, $y, $border, $height-$border, $PATINVERT)
SelectObject ($hdc, $hbrushOld)
DeleteObject ($hbr)
DeleteObject ($hbm)
ReleaseDC (0, $hdc)
EndFunc
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Func GetDC ($hWnd)
[/autoit] [autoit][/autoit] [autoit]Local $aRes = DllCall ('user32.dll', 'ptr', 'GetDC', _
'hwnd', $hWnd) ; handle to window
Return $aRes[0]
EndFunc
[/autoit] [autoit][/autoit] [autoit]Func ReleaseDC ($hWnd, $hDC)
[/autoit] [autoit][/autoit] [autoit]Local $aRes = DllCall ("user32.dll", 'int', 'ReleaseDC', _
'hwnd', $hWnd, _ ; handle to window
'ptr', $hDC) ; handle to DC
Return $aRes[0]
EndFunc
[/autoit] [autoit][/autoit] [autoit]Func CreateBitmap ($nWidth, $nHeight, $cPlanes, $cBitsPerPel, $lpvBits)
[/autoit] [autoit][/autoit] [autoit]Local $aRes = DllCall ('gdi32.dll', 'ptr', 'CreateBitmap', _
'int', $nWidth, _ ; bitmap width, in pixels
'int', $nHeight, _ ; bitmap height, in pixels
'uint', $cPlanes, _ ; number of color planes
'uint', $cBitsPerPel, _ ; number of bits to identify color
'ptr', $lpvBits) ; color data array
Return $aRes[0]
EndFunc
[/autoit] [autoit][/autoit] [autoit]Func CreatePatternBrush ($hbmp)
[/autoit] [autoit][/autoit] [autoit]Local $aRes = DllCall ("gdi32.dll", 'ptr', 'CreatePatternBrush', _
'ptr', $hbmp) ; handle to bitmap
Return $aRes[0]
EndFunc
[/autoit] [autoit][/autoit] [autoit]Func DeleteObject ($hObject)
[/autoit] [autoit][/autoit] [autoit]Local $aRes = DllCall ('gdi32.dll', 'int', 'DeleteObject', _
'ptr', $hObject) ; handle to graphic object
Return $aRes[0]
EndFunc
[/autoit] [autoit][/autoit] [autoit]Func SelectObject ($hdc, $hgdiobj)
[/autoit] [autoit][/autoit] [autoit]Local $aRes = DllCall ('gdi32.dll', 'ptr', 'SelectObject', _
'ptr', $hdc, _ ; handle to DC
'ptr', $hgdiobj) ; handle to object
Return $aRes[0]
EndFunc
[/autoit] [autoit][/autoit] [autoit]Func PatBlt ($hdc, $nXLeft, $nYLeft, $nWidth, $nHeight, $dwRop)
[/autoit] [autoit][/autoit] [autoit]Local $aRes = DllCall ("gdi32.dll", 'int', 'PatBlt', _
'ptr', $hdc, _ ; handle to DC
'int', $nXLeft, _ ; x-coord of upper-left rectangle corner
'int', $nYLeft, _ ; y-coord of upper-left rectangle corner
'int', $nWidth, _ ; width of rectangle
'int', $nHeight, _ ; height of rectangle
'dword', $dwRop) ; raster operation code
Return $aRes[0]
EndFunc
[/autoit] [autoit][/autoit] [autoit]Func SetBrushOrgEx ($hdc, $nXOrg, $nYOrg, $lppt)
[/autoit] [autoit][/autoit] [autoit]Local $aRes = DllCall ("gdi32.dll", 'int', 'SetBrushOrgEx', _
'ptr', $hdc, _ ; handle to device context
'int', $nXOrg, _ ; x-coord of new origin
'int', $nYOrg, _ ; y-coord of new origin
'ptr', $lppt) ; points to previous brush origin
Return $aRes[0]
EndFunc
[/autoit] [autoit][/autoit] [autoit]Func InvalidateRect ($hWnd, $lpRect, $bErase)
Local $aResult = DllCall("user32.dll", 'int', 'InvalidateRect', _
'hwnd', $hWnd, _
'ptr', $lpRect, _
'int', $bErase)
Return $aResult[0]
EndFunc
;
[/autoit]Gruß
Greenhorn
Hi,
die von Lichtenberg ist doch noch besser, oder nicht?
Mega
Hi Mega,
habe ich mir angesehen, aber kriege ich nicht zum Laufen ...
Meine letzte Mathestunde ist auch schon 2o Jahre her und befand sich auch keineswegs auf dem Gauss'schen Level. ![]()
Was ist an der Übersetzung falsch ???
;
;~ 1. die Säkularzahl: K(X) = X div 100
;~ 2. die säkulare Mondschaltung: M(K) = 15 + (3K + 3) div 4 - (8K + 13) div 25
;~ 3. die säkulare Sonnenschaltung: S(K) = 2 - (3K + 3) div 4
;~ 4. den Mondparameter: A(X) = X mod 19
;~ 5. den Keim für den ersten Vollmond im Frühling: D(A,M) = (19A + M) mod 30
;~ 6. die kalendarische Korrekturgröße: R(D,A) = D div 29 + (D div 28 - D div 29) (A div 11)
;~ 7. die Ostergrenze: OG(D,R) = 21 + D - R
;~ 8. den ersten Sonntag im März: SZ(X,S) = 7 - (X + X div 4 + S) mod 7
;~ 9. die Entfernung des Ostersonntags von der
;~ Ostergrenze (Osterentfernung in Tagen): OE(OG,SZ) = 7 - (OG - SZ) mod 7
;~ 10. das Datum des Ostersonntags als Märzdatum
;~ (32. März = 1. April usw.): OS = OG + OE
ConsoleWrite ("----------------------------------" & @crlf)
ConsoleWrite ("> OsternLichtenberg : " & _
Ostern_LichtenbergJulsch (2009) & @crlf)
ConsoleWrite ("> OSTERN_GAUSS : "& _
OSTERN_GAUSS (2009) & @crlf)
ConsoleWrite ("----------------------------------" & @crlf)
Func Ostern_LichtenbergGregsch ($iJahr)
[/autoit] [autoit][/autoit] [autoit]Local $A,$K,$M,$S,$D,$R, $OG,$SZ,$OE,$OS
[/autoit] [autoit][/autoit] [autoit]$K = int ( $iJahr / 100 )
$M = int ( 15 + (3 * $K + 3) / 4 - (8 * $K + 13) / 25 )
$S = int ( 2 - (3 * $K + 3) / 4 )
$A = int (mod ($iJahr, 19))
$D = int (mod ( (19 * $A + $M), 30 ))
$R = int ( $D / 29 + ($D / 28 - $D / 29) * ($A / 11) )
$OG = int ( 21 + $D - $R )
$SZ = int (mod ( 7 - ($iJahr + $iJahr / 4 + $S), 7 ))
$OE = int (mod ( 7 - ($OG - $SZ), 7 ))
$OS = $OG + $OE
if ($OS <= 31) then
return StringFormat ("%02d.%02d.%s", $OS, 3, $iJahr)
else
return StringFormat ("%02d.%02d.%s", ($OS - 31), 4, $iJahr)
endif
EndFunc
; Der vorstehende Algorithmus gilt für den Gregorianischen Kalender.
; Für den Julianischen Kalender setzt man M = 15 und S = 0.
Func Ostern_LichtenbergJulsch ($iJahr)
Local $A,$K,$M,$S,$D,$R, $OG,$SZ,$OE,$OS
[/autoit] [autoit][/autoit] [autoit]$K = int ( $iJahr / 100 )
$M = 15
$S = 0
$A = int (mod ($iJahr, 19))
$D = int (mod ( (19 * $A + $M), 30 ))
$R = int ( $D / 29 + ($D / 28 - $D / 29) * ($A / 11) )
$OG = int ( 21 + $D - $R )
$SZ = int (mod ( 7 - ($iJahr + $iJahr / 4 + $S), 7 ))
$OE = int (mod ( 7 - ($OG - $SZ), 7 ))
$OS = $OG + $OE
if ($OS <= 31) then
return StringFormat ("%02d.%02d.%s", $OS, 3, $iJahr)
else
return StringFormat ("%02d.%02d.%s", ($OS - 31), 4, $iJahr)
endif
EndFunc
[/autoit] [autoit][/autoit] [autoit]func OSTERN_GAUSS ($iJahr)
;~ { Ostern faellt auf den n. Maerz. Beisp.: OSTERN=33 bedeutet 2.April }
;~ { Quelle: MONOID Mathematik-Blatt Karolinen-Gymn. Frankenthal Maerz 1992 }
;~ { Nach der Gauss-Formel aus dem Jahre 1800. Gueltig fuer 1583 bis 8702 }
Local $a,$b,$c,$d,$e,$f,$g,$h,$i,$j
$a = mod ($iJahr, 19);
$b = mod ($iJahr, 4);
$c = mod ($iJahr, 7);
$d = int (( ( ($iJahr / 100) * 8 ) + 13 ) / 25 - 2);
$e = int (($iJahr / 100) - ($iJahr / 400) - 2);
$f = mod ((15 + $e - $d), 30);
$g = mod ((6 + $e), 7);
$h = mod ((19 * $a + $f), 30);
$i = $h;
if ($h == 29) then $i = 28;
if ( ($h == 28) and ($a > 10) ) then $i = 27;
$j = mod (( (2 * $b) + (4 * $c) + (6 * $i) + $g ), 7);
$OSTERN_GAUSS = $i + $j + 22;
if ($OSTERN_GAUSS <= 31) then
return StringFormat ("%02d.%02d.%s", $OSTERN_GAUSS, 3, $iJahr)
else
return StringFormat ("%02d.%02d.%s", ($OSTERN_GAUSS - 31), 4, $iJahr)
endif
endfunc
Exit (0)
;
Gruß
Greenhorn
Moin,
bei mir geht's so:
;
ConsoleWrite ("> "& OSTERN_GAUSS (2009) & @crlf)
func OSTERN_GAUSS ($iJahr)
;~ { Ostern faellt auf den n. Maerz. Beisp.: OSTERN=33 bedeutet 2.April }
;~ { Quelle: MONOID Mathematik-Blatt Karolinen-Gymn. Frankenthal Maerz 1992 }
;~ { Nach der Gauss-Formel aus dem Jahre 1800. Gueltig fuer 1583 bis 8702 }
Local $a,$b,$c,$d,$e,$f,$g,$h,$i,$j
$a = mod ($iJahr, 19);
$b = mod ($iJahr, 4);
$c = mod ($iJahr, 7);
$d = int (( ( ($iJahr / 100) * 8 ) + 13 ) / 25 - 2);
$e = int (($iJahr / 100) - ($iJahr / 400) - 2);
$f = mod ((15 + $e - $d), 30);
$g = mod ((6 + $e), 7);
$h = mod ((19 * $a + $f), 30);
$i = $h;
if ($h == 29) then $i = 28;
if ( ($h == 28) and ($a > 10) ) then $i = 27;
$j = mod (( (2 * $b) + (4 * $c) + (6 * $i) + $g ), 7);
$OSTERN_GAUSS = $i + $j + 22;
if ($OSTERN_GAUSS <= 31) then
return StringFormat ("%02d.%02d.%d", $OSTERN_GAUSS, 3, $iJahr)
else
return StringFormat ("%02d.%02d.%d", ($OSTERN_GAUSS - 31), 4, $iJahr)
endif
endfunc
Exit (0)
;
Gruß
Greenhorn
Also bei mir funktioniert alles perfekt, soweit ... ![]()
;
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
#include <ListViewConstants.au3>
$sMsgWarning_ProcessClose = "WARNUNG: Das Abbrechen eines Prozesses kann zu \n" & _
"unerwünschten Ergebnissen, einschließlich Datenverlust und \t\n" & _
"Systeminstabilität, führen. Zustand und Daten des Prozesses \n" & _
"werden nicht mehr gespeichert. Sind Sie sicher, dass Sie \n" & _
"den Prozess abbrechen möchten?"
Global $user32dll = DllOpen ("user32.dll")
[/autoit] [autoit][/autoit] [autoit]Global $ID_TIMER
[/autoit] [autoit][/autoit] [autoit]Global $aProcessList
; $aidLVItems enthält die IDs der Elemente des Listenansicht-Steuerelements.
Global $aidLVItems [1] = [0] ; erstem Element Null zuweisen
$hWnd = GUICreate ("RogProgs TaskManager", _
350, 460, -1, -1, _
$WS_OVERLAPPEDWINDOW, _
$WS_EX_CLIENTEDGE)
$idButton1 = GUICtrlCreateButton ("Prozess &Starten", 168, 0, 121, 25, 0)
$idButton2 = GUICtrlCreateButton ("Prozess Be&enden", 16, 416, 113, 25, 0)
$idInput1 = GUICtrlCreateInput ("Dateiname", 24, 8, 121, 21)
$idLabel1 = GUICtrlCreateLabel ("Offene Prozesse:", 32, 32, 85, 17)
$idUhrzeit = GUICtrlCreateLabel ("Uhrzeit", 240, 424, 80, 17)
$ID_LISTVIEW = GUICtrlCreateListView ("Prozessname|PID", 0, 50, 350, 350)
[/autoit] [autoit][/autoit] [autoit]; Alle 500 ms WM_TIMER aufrufen lassen.
SetTimer ($hWnd, $ID_TIMER, 500, 0)
GUIRegisterMsg ($WM_TIMER, "WM_TIMER")
GUIRegisterMsg ($WM_DESTROY, "WM_DESTROY")
GUISetState (@SW_SHOW, $hWnd)
[/autoit] [autoit][/autoit] [autoit]While True
Switch GUIGetMsg ( )
Case $GUI_EVENT_CLOSE
ExitLoop
Case $idButton1
ShellExecute (GUICtrlRead ($idInput1))
Case $idButton2
$iReaction = MsgBox (266292, "Warnung von RogProgs TaskManager", _
StringFormat ($sMsgWarning_ProcessClose, ""))
; Ja/Nein-Rückgabe behandeln ...
If ($iReaction == 6) Then
EndIf
EndSwitch
WEnd
; UpdateProcessList (ByRef $aProcesses, $idListView, ByRef $aidLVItems)
; Diese Funktion aktualisiert die Listenansicht.
; Rückgabe: Anzahl der Prozesse bei Erfolg, sonst Null.
; [in/out]$aProcesses - Arrayvariable in der die Prozessliste gespeichert werden soll
; [in] $idListView - Identifizierer des Listenansicht-Steuerelements
; [in/out] $aidLVItems - Arrayvariable, welche die Elemente der Listenansicht enthält
Func UpdateProcessList (ByRef $aProcesses, $idListView, ByRef $aidLVItems)
$aProcesses = ProcessList ( )
If (Not IsArray ($aProcesses)) Then _
Return 0 ; Fehler
;-- Wenn weniger Elemente in der Listenansicht, als Prozesse ...
If ($aidLVItems[0] < $aProcesses[0][0]) Then
; Array vergrößern.
ReDim $aidLVItems [$aProcesses[0][0] + 1]
;- Wenn aidLVItems[0] ungleich Null ...
If ($aidLVItems[0]) Then
; Existierende Elemente in der Listenansicht aktualisieren
For $i = 1 To $aidLVItems[0]
GUICtrlSetData ($aidLVItems[$i], $aProcesses[$i][0] & "|" & $aProcesses[$i][1])
Next
; Neue Elemente in der Listenansicht erzeugen
For $i = $aidLVItems[0] + 1 To $aProcesses[0][0]
$aidLVItems[$i] = GUICtrlCreateListViewItem ($aProcesses[$i][0] & _ ; Prozessname
"|" & _
$aProcesses[$i][1], _ ; PID
$idListView)
Next
;- aidLVItems[0] gleich Null ...
Else
; Ein Element/Prozess in der Listenansicht erzeugen.
For $i = 1 To $aProcesses[0][0]
$aidLVItems[$i] = GUICtrlCreateListViewItem ($aProcesses[$i][0] & _ ; Prozessname
"|" & _
$aProcesses[$i][1], _ ; PID
$idListView)
Next
EndIf
$aidLVItems[0] = $aProcesses[0][0]
;-- Wenn mehr Elemente in der Listenansicht, als Prozesse ...
ElseIf ($aidLVItems[0] > $aProcesses[0][0]) Then
; Existierende Elemente in der Listenansicht aktualisieren
For $i = 1 To $aidLVItems[0]
If ($i <= $aProcesses[0][0]) Then
GUICtrlSetData ($aidLVItems[$i], $aProcesses[$i][0] & "|" & $aProcesses[$i][1])
Else
GUICtrlDelete ($aidLVItems[$i])
EndIf
Next
; Array verkleinern.
ReDim $aidLVItems [$aProcesses[0][0] + 1]
$aidLVItems [0] = $aProcesses[0][0]
EndIf
Return $aProcesses[0][0] ; Erfolg
EndFunc
;
Func WM_TIMER ($hWnd, $uMsg, $wParam, $lParam)
[/autoit] [autoit][/autoit] [autoit]$res = UpdateProcessList ($aProcessList, $ID_LISTVIEW, $aidLVItems)
If (Not $res) Then
ConsoleWrite ("!> UpdateProcessList: "&$res & @crlf)
Else
ConsoleWrite ("> UpdateProcessList: "&$res & @crlf)
EndIf
Return 0
EndFunc
[/autoit] [autoit][/autoit] [autoit]Func WM_DESTROY ($hWnd, $uMsg, $wParam, $lParam)
[/autoit] [autoit][/autoit] [autoit]KillTimer ($hWnd, $ID_TIMER)
DllClose ($user32dll)
Return $GUI_RUNDEFMSG
EndFunc
[/autoit] [autoit][/autoit] [autoit]Func KillTimer ($hwnd, $uIDEvent)
[/autoit] [autoit][/autoit] [autoit]Local $aRes = DllCall ($user32dll, 'int', 'KillTimer', _
'hwnd', $hwnd, _
'uint', $uIDEvent)
Return $aRes [0]
[/autoit] [autoit][/autoit] [autoit]EndFunc
[/autoit] [autoit][/autoit] [autoit]Func SetTimer ($hwnd, $uIDEvent, $uElapse, $lpTimerFunc)
[/autoit] [autoit][/autoit] [autoit]Local $aRes = DllCall ($user32dll, 'int', 'SetTimer', _
'hwnd', $hwnd, _
'uint', $uIDEvent, _
'uint', $uElapse, _
'ptr', $lpTimerFunc)
Return $aRes [0]
EndFunc
;
Gruß
Greenhorn
Hallo,
Du kannst anstelle des Fenstertitels das Fensterhandle benutzen, damit erwischt Du das Fenster immer, egal welchen Titel es hat. ![]()
Das ist nützlich, z.B. für Browserfenster oder Texteditoren, bei denen der Fenstertitel ständig wechselt.
Gruß
Greenhorn
Moin,
wenn es immer nur zwei Registryeinträge sind, kannst Du es so machen:
[autoit]
#include <Array.au3>
$ptn = "(HKEY_LOCAL_MACHINE.*)(HKEY_LOCAL_MACHINE.*)"
$asResult = StringRegExp ($string, $ptn, 3)
If (IsArray ($asResult)) Then
_ArrayDisplay ($asResult)
EndIf
Gruß
Greenhorn
Wo ist das Problem ???
GUICtrlRead, MsgBox, ProcessClose ...
Außerdem ist noch ein grober Patzer in der UpdateProcessList.
Ganz unten, bei "Array verkleinern" fehlt natürlich noch etwas ...
; Array verkleinern.
ReDim $aidLVItems [$aProcesses[0][0] + 1]
$aidLVItems [0] = $aProcesses[0][0] ; fehlte noch ...
;
Wie gesagt, habe das aktualisieren der Listenansicht nicht getestet ...
Gruß
Greenhorn
Hmm, Du könntest erst einmal das hier nehmen ...
http://mysite.verizon.net/kaakoon/hotswap/index_enu.htm
oder
RemoveDrive
Oder Du aktivierst in den Hardwareeigenschaften "Für schnelles Entfernen optimieren"
Gruß
Greenhorn
Moin,
ich kann dir leider nur ein Beispiel in Assembler anbieten, aber die Vorgehensweise wird dort recht ausführlich erklärt.
RichEdit Syntax Highlighting - Teil 1
RichEdit Syntax Highlighting - Teil 2
Gruß
Greenhorn
Moin,
für die Floppy ist Laufwerk A: reserviert.
Andere Möglichkeit wüsste ich auf die Schnelle jetzt nicht ...
EDIT:
ConsoleWrite (DriveSpaceTotal ("A:\") & @crlf)
gibt bei der Floppy Null zurück, was bei einem Stick wohl eher unwahrscheinlich ist.
Ist aber auch nur ein Indiz und kein Beweis.
Gruß
Greenhorn
Moin,
was möchtest Du denn wie beeinflussen ?
Gruß
Greenhorn
Moin,
GUICtrlRead funktioniert nur mit GUICreate erstellten Benutzeroberflächen.
Für dein Vorhaben brauchst Du ControlCommand ($hWnd, "", 1180, "IsChecked", "") ...
ControlCommand
Gruß
Greenhorn
Moin,
probiere mal das hier ...
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Change2CUI=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
; Beispiel 1:
; Dieses Beispiel liest jedes Zeichen einzeln ein.
$input = ""
ConsoleWrite (@CRLF & "Geben Sie einen Text ein und beenden Sie die Eingabe mit ENTER: ")
$file = FileOpen ("con", 4)
[/autoit] [autoit][/autoit] [autoit]While True
$chr = FileRead ($file, 1)
If $chr = @LF Then _
ExitLoop
$input &= BinaryToString ($chr)
WEnd
FileClose ($file)
[/autoit] [autoit][/autoit] [autoit]ConsoleWrite (@CRLF & "Ihre Eingabe war: " & $input & @CRLF)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]; To read lines instead of single characters use this code:
[/autoit] [autoit][/autoit] [autoit]; Beispiel 2:
; Dieses Beispiel liest Zeichen einer bestimmten Länge ein.
$maxchr = 123
$input = ""
ConsoleWrite (@CRLF & "Geben Sie einen Text ein und beenden Sie die Eingabe mit ENTER: ")
$file = FileOpen ("con", 4)
$line = BinaryToString (FileRead ($file, $maxchr))
FileClose ($file)
ConsoleWrite (@CRLF & "Ihre Eingabe war: " & $line & @CRLF)
;
Quelle: Console Input
Gruß
Greenhorn