Also ich hoffe ja auf eine (mal wieder) sehr starke Auswärtsleistung der Spreewälder Buben. Somit kommt Stuttgart natürlich total unter die Räder und Schalke hat die Minimalchance zur Salatschüssel. ![]()
Nehmt das Thema bloß nicht so ernst, es gibt doch auch Wichtiges im Leben. ![]()
Beiträge von BugFix
-
-
Wenn du uns nen Link hinstellst, der nicht verwertbar ist, wie sollen wir da helfen?
Ich habe keine Kristallkugel, die mir sagt, welcher Quelltext auf deiner gewünschten Seite steht.
Wonach soll ich also suchen? Woher soll ich wissen auf welches Objekt du zugreifen möchtest?Fragen über Fragen.....
P.S.: Es gibt eine Anleitung "Wie erstelle ich einen Thread" (Vielleicht mal lesen ?)
Edit peethebee: zum Beispiel hier http://www.lugbz.org/documents/smart-questions_de.html -
-
No Way, Bernd auch mit deinem Scite läuft es nicht

-
So, hab nochmals getestet
- alles deinstalliert
- Version 3.2.0.1 installiert ==> läuft
- Version 3.2.2.0 überschreibend installiert ==> läuft
- Version 3.2.4.x (mit allen probiert) überschreibend installiert ==> läuft nicht -
Bernd: Ich habs auch getestet. Mit 3.2.0.1 läuft es. Aktualisierung auf 3.2.2.4 (oder andere 3.2.2) mit überschreiben funktioniert ebenfalls nicht.
-
Nur Sekunden runterzählen kannst du so machen:
[autoit]#include <Date.au3>
[/autoit][autoit][/autoit][autoit]
_countDown(156)Func _countDown($Countdown)
[/autoit]
$end = _DateAdd('s', $Countdown, _NowCalc())
Do
Sleep(100)
$sec = _DateDiff('s', _NowCalc(), $end)
ToolTip($sec & ' sec')
Until $sec = 0
EndFuncEdit: Oder hier eine Version, in der du das Include sparst:
[autoit]_CountDown(156)
[/autoit][autoit][/autoit][autoit]Func _CountDown($SEC)
[/autoit]
Local $begin = TimerInit(), $diff
Do
$diff = TimerDiff($begin)
ToolTip("Noch " & Round(($SEC*1000 -$diff)/1000) & " Sekunden",Default,Default,"Countdown")
Sleep(100)
Until $diff >= $SEC*1000
EndFunc -
Bitte, bitte

-
Zitat
och mööönsch, wo soll ich denn nachgucken?
Wie wärs denn mit der Hilfe oder mit [Blockierte Grafik: http://home.arcor.de/bugfix/google.gif] ? -
If PixelGetColor(479,526) = $0xF2CE0A
Das ist falsch. Der Farbwert ist ein Hex-wert, du hast daraus eine Variable gemacht
Immer bei Scite in die Fehlermeldung in der Console schauen, da wird der Fehler genau dort wo er auftritt markiert. -
Zitat
MSDN
Win32_GroupUser-Abfragen werden von WMI verarbeitet, indem einer vollständigen Aufzählung von Win32_GroupUser wie auch einer vollständigen Aufzählung der zu verknüpften die Klassen sein Klassen zuerst durchführt. Obwohl die vorhergehende Abfrage Daten "BUILTIN" auf (lokalen) Gruppenmitgliedschaften nur anfordert, wird eine vollständige Aufzählung, alle Domänen und vertrauenswürdiger Domänen aufgerufen. Diese vollständige Enumeration kann innerhalb weniger Sekunden in einer kleinen Domäne abgeschlossen werden. Diese Enumeration kann jedoch für Abschluss dieser Enumeration in einer großen Domäne, die über mehrere Domänen vertraut, mehrere Stunden in Anspruch nehmen.Nun weißt du zumindest warum "localhost" hier nichts begrenzt. Ich schau mal ob man das eingrenzen kann.
-
Naja, ich hab das Script ja soweit geändert, dass nur "Administratoren" und "User" geprüft werden.
Ne Domain hab ich leider nicht zur Verfügung.
-
So OK ?
ZitatKann ich die Abfrage auf den lokalen PC, bzw. vielleicht sogar auf die beiden lokalen Gruppen "Benutzer" und "Administratoren" beschränken?
Ist schon auf lokalen PC beschränkt: $strComputer = "localhost"Spoiler anzeigen
[autoit]$wbemFlagReturnImmediately = 0x10
[/autoit]
$wbemFlagForwardOnly = 0x20
$colItems = ""
$strComputer = "localhost"
$check_local_admin = 0
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_GroupUser", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
If IsObj($colItems) then
For $objItem In $colItems
If ( StringInStr($objItem.GroupComponent,"Administratoren") ) Or _
( StringInStr($objItem.GroupComponent,"User") ) Then
If StringInStr($objItem.PartComponent,"admin_ntt") Then
$check_local_admin = 1
ExitLoop
EndIf
EndIf
Next
If $check_local_admin = 1 Then
MsgBox(0,"","User admin_nt existiert bereits!")
Else
MsgBox(0,"","User admin_nt existiert noch nicht!")
EndIf
Else
Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_GroupUser" & @CRLF & "It is not possible to check if the local admin user 'admin_nt exists" )
Endif -
Auch diesem Wunsch werden wir gerecht. Doppel löschen ohne Sortierung.
- Array 1D/2D wird automatisch erkannt
- Doppel werden gelöscht
Edit:
- Beschränkung für Größe 2.te Dimension aufgehoben
- Funktion gibt bei Erfolg die Anzahl der Löschungen zurück
- Funktionsname angepaßt in: _Array2DDblDel( )Spoiler anzeigen
[autoit]#include <array.au3>
[/autoit] [autoit][/autoit] [autoit]
Dim $ar[5], $ar2[5][2]
$ar[0] = "otto"
$ar[1] = "aha"
$ar[2] = "otto"
$ar[3] = "b"
$ar[4] = "aha"$ar2[0][0] = "otto"
[/autoit] [autoit][/autoit] [autoit]
$ar2[1][0] = "aha"
$ar2[2][0] = "otto"
$ar2[3][0] = "b"
$ar2[4][0] = "ah"
$ar2[0][1] = "c"
$ar2[1][1] = "ha"
$ar2[2][1] = "c"
$ar2[3][1] = "bor"
$ar2[4][1] = "aha"_ArrayDisplay($ar, "1D mit Doppel")
[/autoit] [autoit][/autoit] [autoit]
_Array2DDblDel($ar)
_ArrayDisplay($ar, "1D Doppel gelöscht")_ArrayDisplay($ar2, "2D mit Doppel")
[/autoit] [autoit][/autoit] [autoit]
_Array2DDblDel($ar2)
_ArrayDisplay($ar2, "2D Doppel gelöscht");----------------------------------------------------------------------------------------------------------------------
[/autoit]
; Function _Array2DDblDel(ByRef $ARRAY [, $CASESENS=0])
;
; Description - From an 1D/2D Array will delete double entries (2D -> combination by '[n][0]' to '[n][x]').
; - Autodetection 1D/2D Array
; - By using string, you can choose case sensitivity.
;
; Parameter $ARRAY: Array to sort
; optional $CASESENS: Case sensitivity off[0] or on[1] (default 0)
;
; Return Succes ByRef Array without doubles
; Count of doubles
; Failure 0 and set @error = 1; no array
;
; Author BugFix ([email='bugfix@autoit.de'][/email])
;----------------------------------------------------------------------------------------------------------------------
Func _Array2DDblDel(ByRef $ARRAY, $CASESENS=0)
Local $iDIM, $arTmp[1] = [''], $dbl = 0, $count = 0
If ( Not IsArray($ARRAY) ) Then
SetError(1)
Return 0
EndIf
$Ubound2nd = UBound($ARRAY,2)
If @error = 2 Then
For $i = 0 To UBound($ARRAY)-1
$dbl = 0
For $k = 0 To UBound($arTmp)-1
Switch $CASESENS
Case 0
If $arTmp[$k] = $ARRAY[$i] Then
$dbl = 1
$count += 1
EndIf
Case 1
If $arTmp[$k] == $ARRAY[$i] Then
$dbl = 1
$count += 1
EndIf
EndSwitch
Next
If $dbl = 0 Then
If $arTmp[0] = "" Then
$arTmp[0] = $ARRAY[$i]
Else
ReDim $arTmp[UBound($arTmp)+1]
$arTmp[UBound($arTmp)-1] = $ARRAY[$i]
EndIf
Else
$dbl = 0
EndIf
Next
Else
ReDim $arTmp[1][$Ubound2nd]
$arTmp[0][0] = ''
$x = 0
For $i = 0 To UBound($ARRAY)-1
$dbl = 0
$val = ''
$valTmp = ''
For $l = 0 To $Ubound2nd-1
$val &= $ARRAY[$i][$l]
Next
For $k = 0 To UBound($arTmp)-1
For $l = 0 To $Ubound2nd-1
$valTmp &= $arTmp[$k][$l]
Next
Switch $CASESENS
Case 0
If $valTmp = $val Then
$dbl = 1
$count += 1
EndIf
Case 1
If $valTmp == $val Then
$dbl = 1
$count += 1
EndIf
EndSwitch
Next
If $dbl = 0 Then
If $x = 1 Then ReDim $arTmp[UBound($arTmp)+1][$Ubound2nd]
For $l = 0 To $Ubound2nd-1
If $arTmp[0][0] = '' Or $x = 0 Then
$arTmp[0][$l] = $ARRAY[0][$l]
If $l = $Ubound2nd-1 Then $x = 1
Else
$arTmp[UBound($arTmp)-1][$l] = $ARRAY[$i][$l]
$x = 2
If $l = $Ubound2nd-1 Then $x = 1
EndIf
Next
Else
$dbl = 0
EndIf
Next
EndIf
$ARRAY = $arTmp
Return $count
EndFunc ; ==>_ArrayDblDel -
[autoit]
While 1
[/autoit]
If PixelGetColor( ) = $farbeGeladen Then ExitLoop
Sleep(100)
WEnd -
Du mußt die Variable mit den anderen Angaben verketten:
run($fest & ":\Programme\Internet Explorer\iexplore.exe")
-
@DesktopHeight und @DesktopWidth
[autoit]If ( @DesktopWidth < 1280 ) Or ( @DesktopHeight < 1024 ) Then MsgBox('', "Auflösung zu klein")
[/autoit] -
Wir werden allen Wünschen gerecht.

Hier also die UDF um Arrays nach Länge der Einträge zu sortieren.
- Sortierung wahlweise auf/absteigend
- bei 2D Sortierung nach 1. oder 2. SpalteSpoiler anzeigen
[autoit]#include <array.au3>
[/autoit] [autoit][/autoit] [autoit]
Dim $ar[5], $ar2[5][2]
$ar[0] = "otto"
$ar[1] = "aha"
$ar[2] = "Adebar"
$ar[3] = "b"
$ar[4] = "ah"$ar2[0][0] = "otto"
[/autoit] [autoit][/autoit] [autoit]
$ar2[1][0] = "aha"
$ar2[2][0] = "Adebar"
$ar2[3][0] = "b"
$ar2[4][0] = "ah"
$ar2[0][1] = "c"
$ar2[1][1] = "ha"
$ar2[2][1] = "barracuda"
$ar2[3][1] = "bor"
$ar2[4][1] = "aha"_ArrayDisplay($ar, "Array 1D, unsortiert")
[/autoit] [autoit][/autoit] [autoit]
_ArraySortByLen($ar)
_ArrayDisplay($ar, "Array 1D, sortiert nach Länge Eintrag")_ArrayDisplay($ar2, "Array 2D, unsortiert")
[/autoit] [autoit][/autoit] [autoit]
_ArraySortByLen($ar2,0,2,0)
_ArrayDisplay($ar2, "Array 2D, sortiert 1. Spalte nach Länge Eintrag")
_ArraySortByLen($ar2,0,2,1)
_ArrayDisplay($ar2, "Array 2D, sortiert 2. Spalte nach Länge Eintrag");----------------------------------------------------------------------------------------------------------------------
[/autoit]
; Function _ArraySortByLen(ByRef $ARRAY [, $iDESCENDING=0 [, $iDIM=0[ , $iSORT=0]]])
;
; Description - Sorts an 1D/2D Array by Length.
; - BaseIndex is 0; sorts the whole array.
;
; Parameter $ARRAY: Array to sort
; optional $iDESCENDING: Sort ascending[0]/descending[1] (default 0)
; optional $iDIM: Occurences in the second dimension, eg $A[100]=0 or $A[100][2]=2 (default 0)
; optional $iSORT: SortIndex by using 2 dimensions (default 0)
;
; Return ByRef sorted Array by Length
;
; Requirements Only 2 occurences in the second dimension
; #include <array.au3>
;
; Author BugFix ([email='bugfix@autoit.de'][/email])
;----------------------------------------------------------------------------------------------------------------------
Func _ArraySortByLen(ByRef $ARRAY, $iDESCENDING=0, $iDIM=0, $iSORT=0)
Local $arTmp1D[1][1], $arTmp2D[1][1]
If $iDIM = 0 Then $iDIM = 1
Switch $iDIM
Case 1 ; 1D
ReDim $arTmp1D[UBound($ARRAY)][2]
For $i = 0 To UBound($ARRAY)-1
$arTmp1D[$i][0] = StringLen($ARRAY[$i])
$arTmp1D[$i][1] = $ARRAY[$i]
$ARRAY[$i] = ''
Next
_ArraySort($arTmp1D,$iDESCENDING,0,0,2,0)
For $i = 0 To UBound($arTmp1D)-1
$ARRAY[$i] = $arTmp1D[$i][1]
Next
Case 2 ; 2D
ReDim $arTmp2D[UBound($ARRAY)][3]
For $i = 0 To UBound($ARRAY)-1
$arTmp2D[$i][2] = StringLen($ARRAY[$i][$iSORT])
$arTmp2D[$i][0] = $ARRAY[$i][0]
$arTmp2D[$i][1] = $ARRAY[$i][1]
$ARRAY[$i][0] = ''
$ARRAY[$i][1] = ''
Next
_ArraySort($arTmp2D,$iDESCENDING,0,0,3,2)
For $i = 0 To UBound($arTmp2D)-1
$ARRAY[$i][0] = $arTmp2D[$i][0]
$ARRAY[$i][1] = $arTmp2D[$i][1]
Next
EndSwitch
EndFunc ; ==>_ArraySortByLenEdit:
Habe auch diese Funktion auf beliebige Größe der 2.ten Dimension erweitert, d.h. es wird bei gleicher Länge von Elementen in Spalte 1, innerhalb dieser Elemente nach Spalte 2 usw. sortiert.Füge sie einfach als neue Funktion _Array2DSortByLen mit an:
Spoiler anzeigen
[autoit];----------------------------------------------------------------------------------------------------------------------
[/autoit]
; Function _Array2DSortByLen(ByRef $ARRAY [, $iDESCENDING=0])
;
; Description - Sorts an 1D/2D Array by Length.
; - BaseIndex is 0; sorts the whole array.
;
; Parameter $ARRAY: Array to sort
; optional $iDESCENDING: Sort ascending[0]/descending[1] (default 0)
;
; Return Succes -1 ByRef sorted Array by Length
; Failure 0 set @error = 1; no array
;
; Requirements Func _ArraySort_2ary()
; #include <array.au3>
;
; Author BugFix ([email='bugfix@autoit.de'][/email])
;----------------------------------------------------------------------------------------------------------------------
Func _Array2DSortByLen(ByRef $ARRAY, $iDESCENDING=0)
If ( Not IsArray($ARRAY) ) Then
SetError(1)
Return 0
EndIf
If $iDESCENDING <> 0 Then $iDESCENDING = 1
Local $UBound2nd = UBound($ARRAY,2)
Local $arTmp[1] = ['']
If @error = 2 Then
ReDim $arTmp[UBound($ARRAY)][2]
For $i = 0 To UBound($ARRAY)-1
$arTmp[$i][0] = StringLen($ARRAY[$i])
$arTmp[$i][1] = $ARRAY[$i]
$ARRAY[$i] = ''
Next
_ArraySort($arTmp,$iDESCENDING,0,0,2,0)
For $i = 0 To UBound($arTmp)-1
$ARRAY[$i] = $arTmp[$i][1]
Next
Else
ReDim $arTmp[UBound($ARRAY)][$UBound2nd+1]
For $i = 0 To UBound($ARRAY)-1
For $k = 0 To $UBound2nd-1
$arTmp[$i][$k] = StringLen($ARRAY[$i][$k])
Next
$arTmp[$i][$UBound2nd] = $i
Next
_ArraySort_2ary($arTmp, 0, $iDESCENDING)
For $i = 0 To UBound($arTmp)-1
For $k = 0 To $UBound2nd-1
$arTmp[$i][$k] = $ARRAY[$arTmp[$i][$UBound2nd]][$k]
Next
Next
ReDim $arTmp[UBound($ARRAY)][$UBound2nd]
$ARRAY = $arTmp
EndIf
Return -1
EndFunc ;==>_ArraySortByLen -
Hier mal ein Bsp.:
Spoiler anzeigen
[autoit]#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
Opt("GUIOnEventMode", 1)
AutoitSetOption("GUIResizeMode",802)
Dim $minWidth = 464, $Width = 635, $minHeight = 232, $Height = 456
Dim $x, $y, $PosX = 192, $PosY = 113, $change = 0
#Region ### START Koda GUI section ### Form=d:\koda\winmove.kxf
$Form1 = GUICreate("Form1", $Width, $Height, $PosX, $PosY)
GUISetOnEvent($GUI_EVENT_CLOSE, "AForm1Close")
$Group1 = GUICtrlCreateGroup("Position", 16, 16, 200, 117)
$bLiOb = GUICtrlCreateButton("Links Oben", 28, 40, 75, 20, 0)
GUICtrlSetOnEvent(-1, "bLiObClick")
$bReOb = GUICtrlCreateButton("Rechts Oben", 131, 40, 75, 20, 0)
GUICtrlSetOnEvent(-1, "bReObClick")
$bLiUn = GUICtrlCreateButton("Links Unten", 28, 97, 75, 19, 0)
GUICtrlSetOnEvent(-1, "bLiUnClick")
$bMitte = GUICtrlCreateButton("Mitte", 79, 70, 75, 20, 0)
GUICtrlSetOnEvent(-1, "bMitteClick")
$bReUn = GUICtrlCreateButton("Rechts Unten", 131, 97, 75, 20, 0)
GUICtrlSetOnEvent(-1, "bReUnClick")
$clGr1 = GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Größe ändern (+/- Pixel)", 232, 16, 200, 117)
$Label1 = GUICtrlCreateLabel("Breite:", 249, 42, 34, 17)
$Label2 = GUICtrlCreateLabel("Höhe:", 249, 75, 33, 17)
$iWidth = GUICtrlCreateInput("", 332, 39, 65, 21)
$iHeight = GUICtrlCreateInput("", 332, 72, 65, 21)
$bChange = GUICtrlCreateButton("Ändern", 267, 103, 130, 20, 0)
GUICtrlSetOnEvent(-1, "bChangeClick")
$clGr2 = GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###While 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(100)
WEnd
Func AForm1Close()
Exit
EndFunc
Func bChangeClick()
$x = GUICtrlRead($iWidth)
$y = GUICtrlRead($iHeight)
If ($Width + $x) < $minWidth Then
MsgBox(16, '',"Breitenänderung nicht möglich!"& @LF &"Mindestbreite wird unterschritten.")
Return
EndIf
If ($Height + $y) < $minHeight Then
MsgBox(16, '',"Höhenänderung nicht möglich!"& @LF &"Mindesthöhe wird unterschritten.")
Return
EndIf
WinMove($Form1, "", $PosX, $PosY, $Width+$x, $Height+$y)
_size()
EndFuncFunc _size()
[/autoit] [autoit][/autoit] [autoit]
Local $size
$size = WinGetPos("Form1")
$PosX = $size[0]
$PosY = $size[1]
$Width = $size[2]
$Height = $size[3]
EndFunc
Func bLiObClick()
WinMove($Form1, "", -1, -1)
_size()
EndFunc
[/autoit] [autoit][/autoit] [autoit]
Func bLiUnClick()
WinMove($Form1, "", -1, @DesktopHeight-$Height)
_size()
EndFunc
[/autoit] [autoit][/autoit] [autoit]
Func bMitteClick()
WinMove($Form1, "", (@DesktopWidth-$Width)/2, (@DesktopHeight-$Height)/2)
_size()
EndFunc
[/autoit] [autoit][/autoit] [autoit]
Func bReObClick()
WinMove($Form1, "", @DesktopWidth-$Width, -1)
_size()
EndFunc
[/autoit]
Func bReUnClick()
WinMove($Form1, "", @DesktopWidth-$Width, @DesktopHeight-$Height)
_size()
EndFunc -
Probier dies mal. Kann es selber nicht testen, keine Domain hier.
[autoit]Const $ADS_PROPERTY_APPEND = 3
[/autoit]
Dim $strComputer = "Carolina_xp"
Dim $objGroup, $objUser
; Username = Carolina , Domain = cat
$objGroup = ObjGet("WinNT://" & $strComputer & "/Administrator,group")
$objUser = ObjGet("WinNT://cat/Carolina,user")
$objGroup.Add($objUser.ADsPath)Ich hab hier mal noch ein Bsp. aus dem Scriptcenter adaptiert. Ebenfalls, mangels Domain, ungetestet.
[autoit]; 1) creates a new Active Directory organizational unit
[/autoit][autoit][/autoit][autoit]
$objDomain = ObjGet("LDAP://dc=fabrikam,dc=com")
$objOU = $objDomain.Create("organizationalUnit", "ou=Management")
$objOU.SetInfo
; 2) creates a new user account and new security group
$objOU = ObjGet("LDAP://OU=Management,dc=fabrikam,dc=com")
$objUser = $objOU.Create("User", "cn= AckermanPilar")
$objUser.Put( "sAMAccountName", "AckermanPila")
$objUser.SetInfo
; 3) adds the new user as a member of that security group
$objOU = ObjGet("LDAP://OU=Management,dc=fabrikam,dc=com")
$objGroup = $objOU.Create("Group", "cn=atl-users")
$objGroup.Put( "sAMAccountName", "atl-users")
$objGroup.SetInfo$objGroup.Add($objUser.ADSPath)
[/autoit]