Na dann viel Spaß damit!
Gruß,
UEZ
Na dann viel Spaß damit!
Gruß,
UEZ
Vielleicht hilft dir dies weiter:
;http://www.autoitscript.com/forum/index.php?showtopic=89034
#include <GuiConstantsEx.au3>
#include <GDIPlus.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)
Opt("MouseCoordMode", 2);1=absolute, 0=relative, 2=client
Global $hGUI, $hBMPBuff, $hGraphicGUI, $hGraphic
[/autoit] [autoit][/autoit] [autoit]_Main()
[/autoit] [autoit][/autoit] [autoit]Func _Main()
Local $msg, $aPos, $GuiSizeX = 400, $GuiSizeY = 300
Local $aPoints[7][2], $aTriangle[5][2]
Local $hButton
; Create GUI
$hGUI = GUICreate("GDI+", $GuiSizeX, $GuiSizeY)
GUISetState()
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_Startup()
;Double Buffer
$hGraphicGUI = _GDIPlus_GraphicsCreateFromHWND($hGUI)
$hBMPBuff = _GDIPlus_BitmapCreateFromGraphics($GuiSizeX, $GuiSizeY - 65, $hGraphicGUI)
$hGraphic = _GDIPlus_ImageGetGraphicsContext($hBMPBuff)
;End Double Buffer add-on 1 of 3
_GDIPlus_GraphicsClear($hGraphic, 0xFFE8FFEF)
[/autoit] [autoit][/autoit] [autoit]$aPoints[0][0] = 5; Number of sides of Polygon
$aPoints[1][0] = 100
$aPoints[1][1] = 100
$aPoints[2][0] = 200
$aPoints[2][1] = 150
$aPoints[3][0] = 200
$aPoints[3][1] = 200
$aPoints[4][0] = 150
$aPoints[4][1] = 100
$aPoints[5][0] = 70
$aPoints[5][1] = 200
$aPoints[6][0] = 100;Last point same as 1st point. Polygon is closed
$aPoints[6][1] = 100
_GDIPlus_GraphicsFillPolygon($hGraphic, $aPoints)
Local $iRectX = 220, $iRectY = 25, $iRectWidth = 100, $iRectHth = 50
_GDIPlus_GraphicsDrawRect($hGraphic, $iRectX, $iRectY, $iRectWidth, $iRectHth)
Local $iElpsX = 220, $iElpsY = 180, $iElpsWidth = 130, $iElpsHth = 70
_GDIPlus_GraphicsDrawEllipse($hGraphic, $iElpsX, $iElpsY, $iElpsWidth, $iElpsHth)
$aTriangle[0][0] = 3; Number of sides of Polygon
$aTriangle[1][0] = 30
$aTriangle[1][1] = 30
$aTriangle[2][0] = 150
$aTriangle[2][1] = 40
$aTriangle[3][0] = 50
$aTriangle[3][1] = 100
$aTriangle[4][0] = 30;Last point same as 1st point. Polygon is closed
$aTriangle[4][1] = 30
_GDIPlus_GraphicsFillPolygon($hGraphic, $aTriangle)
$hButton = GUICtrlCreateButton("In Circle", 22, 240, 75, 20)
[/autoit] [autoit][/autoit] [autoit]Local $iCircleX = 20, $iCircleY = 210, $iCircleWidth = 80, $iCircleHth = 80
_GDIPlus_GraphicsFillEllipse($hGraphic, $iCircleX, $iCircleY, $iCircleWidth, $iCircleHth)
ConsoleWrite("Area of Polygon = " & _AreaPoly($aPoints) & @CRLF)
Local $aCent = _CentroidPoly($aPoints)
ConsoleWrite("Centroid of Polygon: cX = " & $aCent[0] & " cY = " & $aCent[1] & @CRLF)
; Create Double Buffer, doesn't need to be repainted on PAINT-Event
GUIRegisterMsg(0xF, "MY_PAINT"); Register PAINT-Event 0x000F = $WM_PAINT (WindowsConstants.au3)
GUIRegisterMsg(0x85, "MY_PAINT"); $WM_NCPAINT = 0x0085 (WindowsConstants.au3)Restore after Minimize.
_GDIPlus_GraphicsDrawImage($hGraphicGUI, $hBMPBuff, 0, 0)
;End Double Buffer add-on 2 of 3
While 1
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_GraphicsDispose($hGraphicGUI)
_WinAPI_DeleteObject($hBMPBuff)
_GDIPlus_Shutdown()
Exit
Case $hButton
MsgBox(0, "", "Button Pressed. ")
Case $GUI_EVENT_MOUSEMOVE
$aPos = MouseGetPos()
ToolTip("Mouse Position X: " & $aPos[0] & " Y: " & $aPos[1] & @CRLF & @CRLF & _
"Cursor in Polygon: " & _PointInPoly($aPos[0], $aPos[1], $aPoints) & @CRLF & _
"Cursor in Triangle: " & _PointInPoly($aPos[0], $aPos[1], $aTriangle) & @CRLF & _
"Cursor in Ellipse: " & _PointInEllipse($aPos[0], $aPos[1], $iElpsX, $iElpsY, _
$iElpsWidth, $iElpsHth) & @CRLF & _
"Cursor in Circle: " & _PointInEllipse($aPos[0], $aPos[1], $iCircleX, $iCircleY, _
$iCircleWidth, $iCircleHth) & @CRLF & _
"Cursor in Rectangle: " & _WinAPI_PtInRectEx($aPos[0], $aPos[1], $iRectX, $iRectY, _
$iRectX + $iRectWidth, $iRectY + $iRectHth) & @CRLF)
Case $GUI_EVENT_PRIMARYUP
$aPos = MouseGetPos()
Select
Case _PointInPoly($aPos[0], $aPos[1], $aPoints)
ToolTip("")
MsgBox(0, "", "Clicked in PolyGon")
Case _WinAPI_PtInRectEx($aPos[0], $aPos[1], $iRectX, $iRectY, $iRectX + $iRectWidth, _
$iRectY + $iRectHth)
ToolTip("")
MsgBox(0, "", "Clicked in Rectangle")
Case _PointInEllipse($aPos[0], $aPos[1], $iElpsX, $iElpsY, $iElpsWidth, $iElpsHth)
ToolTip("")
MsgBox(0, "", "Clicked in Ellipse")
Case _PointInPoly($aPos[0], $aPos[1], $aTriangle)
ToolTip("")
MsgBox(0, "", "Clicked in Triangle")
Case _PointInEllipse($aPos[0], $aPos[1], $iCircleX, $iCircleY, $iCircleWidth, $iCircleHth)
ToolTip("")
MsgBox(0, "", "Clicked in Invisible Circle")
EndSelect
EndSwitch
WEnd
EndFunc ;==>_Main
; Returns the area of a polygon
Func _AreaPoly($aPoints)
Local $Med
For $n = 1 To UBound($aPoints) - 2
$Med += $aPoints[$n][0] * $aPoints[$n + 1][1] - $aPoints[$n + 1][0] * $aPoints[$n][1]
Next
Return $Med / 2
EndFunc ;==>_AreaPoly
; Returns an array containing the x, y position of the centroid of a polygon.
Func _CentroidPoly($aPoints)
Local $Med, $aRet[2], $MedX, $MedY, $Area
For $n = 1 To UBound($aPoints) - 2
$MedX += ($aPoints[$n][0] + $aPoints[$n + 1][0]) * ($aPoints[$n][0] * $aPoints[$n + 1][1] - _
$aPoints[$n + 1][0] * $aPoints[$n][1])
$MedY += ($aPoints[$n][1] + $aPoints[$n + 1][1]) * ($aPoints[$n][0] * $aPoints[$n + 1][1] - _
$aPoints[$n + 1][0] * $aPoints[$n][1])
Next
$Area = _AreaPoly($aPoints)
$aRet[0] = $MedX / ($Area * 6)
$aRet[1] = $MedY / ($Area * 6)
Return $aRet
EndFunc ;==>_CentroidPoly
; ($xPt, $yPt) - x, y position of the point to check
; $xTL, $yTL, Top left x Pos, top left Y position of the rectangle encompassing the ellipse.
; $w, $h - The width an height of ellipse
; Method: The distance from the 1st focal point to a point on the perimeter plus the distance from
; the second focal point to the same point on the perimeter is a constant and equals the width of
; the ellipse, the major axis. So, if the sum of the two distances form the point to check to the
; two foci is greater than the major axis, then the point is outside the ellipse.
Func _PointInEllipse($xPt, $yPt, $xTL, $yTL, $w, $h)
Local $bInside = False, $a = $w / 2, $b = $h / 2
Local $c1X, $c2X, $dist, $xc = $xTL + $a, $yc = $yTL + $b
$c1X = $xc - ($a ^ 2 - $b ^ 2) ^ 0.5; 1st focal point x position
$c2X = $xc + ($a ^ 2 - $b ^ 2) ^ 0.5; 2nd focal point x position
$dist = (($xPt - $c1X) ^ 2 + ($yPt - $yc) ^ 2) ^ 0.5 + (($xPt - $c2X) ^ 2 + ($yPt - $yc) ^ 2) ^ 0.5
If $dist <= $w Then $bInside = Not $bInside
Return $bInside
EndFunc ;==>_PointInEllipse
; ($iX, $iY) - x, y position of the point to check
; ($iLeft, $iTop) - x, y position of the top left corner of rectangle
; ($iRight, $iBottom) - x, y position of the bottom right corner of rectangle
;
Func _WinAPI_PtInRectEx($iX, $iY, $iLeft, $iTop, $iRight, $iBottom)
Local $aResult
Local $tRect = DllStructCreate($tagRECT)
DllStructSetData($tRect, "Left", $iLeft)
DllStructSetData($tRect, "Top", $iTop)
DllStructSetData($tRect, "Right", $iRight)
DllStructSetData($tRect, "Bottom", $iBottom)
$aResult = DllCall("User32.dll", "int", "PtInRect", "ptr", DllStructGetPtr($tRect), "int", $iX, "int", $iY)
If @error Then Return SetError(@error, 0, False)
Return $aResult[0] <> 0
EndFunc ;==>_WinAPI_PtInRectEx
; ($x, $y) - x, y position of the point to check
; $aPoints - An array of x,y values representing the nodes of a polygon.
; Finds the individual x values of the interestion of the individual sides of the polygon with the
; line y = $y (parallel with x-axis). If the number of x values found greater than $x is even, then
; the ($x, $y) point is outside the closed polygon. Plus, if $y is beyond the y values of the end
; points of individual sides of the polygon, the y = $y line will not interest with that side and will
; not be counted. Returns equivalent of, even number of intersections false, and, odd true(inside polygon).
; Requires Iif()function
Func _PointInPoly($x, $y, $aPoints)
Local $bEvenNum = False, $xOnLine, $yMin, $yMax
For $i = 1 To $aPoints[0][0]
$yMin = Iif($aPoints[$i + 1][1] < $aPoints[$i][1], $aPoints[$i + 1][1], $aPoints[$i][1])
$yMax = Iif($aPoints[$i + 1][1] > $aPoints[$i][1], $aPoints[$i + 1][1], $aPoints[$i][1])
$xOnLine = -($y * $aPoints[$i + 1][0] - $y * $aPoints[$i][0] - $aPoints[$i][1] * $aPoints[$i + 1][0] + _
$aPoints[$i][0] * $aPoints[$i + 1][1]) / (-$aPoints[$i + 1][1] + $aPoints[$i][1])
If ($x < $xOnLine) And ($y > $yMin) And ($y <= $yMax) Then $bEvenNum = Not $bEvenNum
Next
Return $bEvenNum
EndFunc ;==>_PointInPoly
; Same as _Iif() function from Misc.au3 include file
Func Iif($fTest, $vTrueVal, $vFalseVal)
If $fTest Then
Return $vTrueVal
Else
Return $vFalseVal
EndIf
EndFunc ;==>Iif
;Func to redraw on PAINT MSG
Func MY_PAINT($hWnd, $msg, $wParam, $lParam)
; Check, if the GUI with the Graphic should be repainted
_GDIPlus_GraphicsDrawImage($hGraphicGUI, $hBMPBuff, 0, 0)
_WinAPI_RedrawWindow($hGUI, "", "", BitOR($RDW_INVALIDATE, $RDW_UPDATENOW, $RDW_FRAME));,$RDW_ALLCHILDREN
Return $GUI_RUNDEFMSG
EndFunc ;==>MY_PAINT
Gruß,
UEZ
Ich habe mal den Code aus meinem ersten Post angepasst.
So ähnlich soll es sein, aber vielleicht etwas eleganter.
Gruß,
UEZ
Die Schrift soll immer im Verhältnis zum Group Control stehen, so dass die Größe der Schrift sich mit dem Group Control beim Vergrößern / Verkleinern anpasst.
Beispiel: wenn ich das Fenster maximiere, so vergrößert sich das Group Control, aber die Schrift bleibt gleich (kleiner)!
Ich hoffe, dass es jetzt ein wenig klarer ist.
Andy: das mit den GUICtrlSetResizing() Einstellungen funzt nicht, da nur das Label verschoben, aber nicht entsprechend skaliert wird.
autoBert: danach habe ich auch gesucht. Danke!
Gruß,
UEZ
Gibt es eine Möglichkeit das Label dynamisch an die GUI bzw. ans Group Control anzupassen, so dass beim Vergrößern bzw. Verkleinern (inkl. maximieren/minimieren des Fensters) das Label enstprechend vergrößert / verkleinert wird?
#include <GUIConstantsEx.au3>
#include <StructureConstants.au3>
#include <WindowsConstants.au3>
Global $hGUI = GUICreate("Test", 800, 200, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_SIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_MAXIMIZEBOX, $WS_TABSTOP))
Global $group = GUICtrlCreateGroup("", 224, 0, 569, 92)
Global $title = GUICtrlCreateLabel("Label soll sich dyn. anpassen", 228, 14, 559, 75)
GUICtrlSetColor(-1, 0x000080)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
Resize_Font()
[/autoit] [autoit][/autoit] [autoit]Global $aWDim = WinGetPos($hGUI)
Global $w = $aWDim[2], $h = $aWDim[3]
GUIRegisterMsg($WM_GETMINMAXINFO, "WM_GETMINMAXINFO")
GUIRegisterMsg($WM_SIZE, "WM_SIZE")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUIDelete($hGUI)
Exit
Case $GUI_EVENT_RESIZED, $GUI_EVENT_MAXIMIZE, $GUI_EVENT_RESTORE
Resize_Font()
EndSwitch
WEnd
Func Resize_Font()
$aPOS = ControlGetPos("", "", $group)
GUICtrlSetFont($title, $aPOS[2] / 17, 400, 0, "Impact")
EndFunc
Func WM_SIZE($hWnd, $Msg, $wParam, $lParam)
Resize_Font()
Return "GUI_RUNDEFMSG"
EndFunc
Func WM_GETMINMAXINFO($hWnd, $Msg, $wParam, $lParam)
Local $minmaxinfo = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam)
DllStructSetData($minmaxinfo, 7, $w) ; min X
DllStructSetData($minmaxinfo, 8, $h) ; min Y
Return "GUI_RUNDEFMSG"
EndFunc ;==>WM_GETMINMAXINFO
Gruß,
UEZ
Auch von mir ein Happy Birthday und alles Gute zum Geburtstag!
Gruß,
UEZ
PC Welt hat in der Ausgabe 2/2011 SSD 2.5" im Test:
1. OCZ Vertex 2 (60GB)
2. G. Skill Phoenix (60GB)
3. Super Talent Teradrive CT (60GB)
4. Patriot Inferno (60GB)
5. A-Data S599 (64GB)
Alle mit dem SandForce Chipsatz.
Ferner ist ein guter Bericht in der letzten Ausgabe von PC Magazin (2/2011, S. 56ff) veröffentlicht, wie man am besten SSD implementiert.
SSD ist am besten für Win7 geeignet, da es von Haus aus die TRIM Befehle mitbringt.
Gruß,
UEZ
Ich habe auch so was ähnliches in GDI+ Pixel Text Effect Beta Build 2010-10-21 benötigt, wo ich ein Wort aus Pixel in ein anderes Wort aus Pixel "morphe".
Anfangs- und Endkoodinaten waren bekannt, nur müssen die Pixel sich zur Endkoordinate mit einer Geschwindigkeit x bewegen.
Gruß,
UEZ
Nach der GUI und GDI+ Initialisierung:
...
Global Const $GW_CHILD = 5
Global Const $GW_HWNDNEXT = 2
Global $hRegion = _GDIPlus_RegionCreateFromRect(_GDIPlus_RectFCreate(0, 0, $width, $height))
Global $hChild = _WinAPI_GetWindow($hGUI, $GW_CHILD)
Global $aRect
Do
$aRect = ControlGetPos($hChild, "", 0)
_GDIPlus_RegionCombineRect($hRegion, _GDIPlus_RectFCreate($aRect[0], $aRect[1], $aRect[2], $aRect[3]), 3)
$hChild = _WinAPI_GetWindow($hChild, $GW_HWNDNEXT)
Until Not $hChild
_GDIPlus_GraphicsSetClipRegion($hGraphics, $hRegion)
_GDIPlus_RegionDispose($hRegion)
...
Func _GDIPlus_GraphicsSetClipRegion($hGraphics, $hRegion, $iCombineMode = 0)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetClipRegion", "hwnd", $hGraphics, "hwnd", $hRegion, "int", $iCombineMode)
If @error Then Return SetError(@error, @extended, False)
Return $aResult[0] = 0
EndFunc
Func _GDIPlus_RegionCreateFromRect($tRectF)
Local $pRectF, $aResult
$pRectF = DllStructGetPtr($tRectF)
$aResult = DllCall($ghGDIPDll, "uint", "GdipCreateRegionRect", "ptr", $pRectF, "int*", 0)
If @error Then Return SetError(@error, @extended, 0)
Return $aResult[2]
EndFunc
Func _GDIPlus_RegionCombineRect($hRegion, $tRectF, $iCombineMode = 2)
Local $pRectF, $aResult
$pRectF = DllStructGetPtr($tRectF)
$aResult = DllCall($ghGDIPDll, "uint", "GdipCombineRegionRect", "hwnd", $hRegion, "ptr", $pRectF, "int", $iCombineMode)
If @error Then Return SetError(@error, @extended, False)
Return $aResult[0] = 0
EndFunc
Func _GDIPlus_RegionDispose($hRegion)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipDeleteRegion", "hwnd", $hRegion)
If @error Then Return SetError(@error, @extended, False)
Return $aResult[0] = 0
EndFunc
Funktioniert mit Group Controls leider nicht!
Gruß,
UEZ
Ok, dann meinst du sowas: Tiny URL Downloader v0.96 Build 2011-01-24
Da sind auch die Control Elemente vorhanden und im Hintergrund läuft eine GDI+ Animation.
Gruß,
UEZ
Warum hast du Controls, worauf du eine Bitmap legen willst? Ich verstehe nicht ganz, was du erreichen willst. Eigentlicht ist das umgekehrt oder?
Kann aber auch an meinem Alter liegen...
Gruß,
UEZ
Wenn ich dich richtig verstanden habe, willst du ein Rechteck auf ein Bild zeichnen, welches transparent ist:
#include <GDIPlus.au3>
$iX_Clip = 50
$iY_Clip = 50
$iWidth_Clip = 200
$iHeight_Clip = 200
$sPathImage = FileOpenDialog("Bild öffnen", @ScriptDir, "Bilder (*.jpg;*.bmp;*.png)")
If @error Then Exit
_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]$hImage = _GDIPlus_ImageLoadFromFile($sPathImage)
$iWidth = _GDIPlus_ImageGetWidth($hImage)
$iHeight = _GDIPlus_ImageGetHeight($hImage)
$hBitmap = _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight) ;Erzeugt eine neue leere Bitmap
$hGraphic = _GDIPlus_ImageGetGraphicsContext($hBitmap)
_GDIPlus_GraphicsSetSmoothingMode($hGraphic, 2)
$hBrush = _GDIPlus_BrushCreateSolid(0x60FFFFFF)
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hImage, 0, 0, $iWidth, $iHeight)
_GDIPlus_GraphicsFillRect($hGraphic, 0, 0, $iWidth / 2 ,$iHeight / 2, $hBrush)
_GDIPlus_ImageSaveToFile($hBitmap, @ScriptDir & "\Test.jpg")
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_BrushDispose($hBrush)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_Shutdown()
Func _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight, $iStride = 0, $iPixelFormat = 0x0026200A, $pScan0 = 0)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", $iStride, "int", $iPixelFormat, "ptr", $pScan0, "int*", 0)
If @error Then Return SetError(@error, @extended, 0)
$GDIP_STATUS = $aResult[0]
Return $aResult[6]
EndFunc ;==>_GDIPlus_BitmapCreateFromScan0
Wenn nicht, dann habe ich dich nicht richtig verstanden.
Gruß,
UEZ
Alle möglichen Dateien lassen sich einfach in .exe umwandeln, das ist keine leistung!
![]()
Gruß,
UEZ
Ich bin immer noch verblüfft, was in 4kb geht > 4kb Code ![]()
Gruß,
UEZ
.----------------. .----------------. .----------------. .----------------. .----------------.
| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. |
| | ____ ____ | || | __ | || | ______ | || | ______ | || | ____ ____ | |
| | |_ || _| | || | / \ | || | |_ __ \ | || | |_ __ \ | || | |_ _||_ _| | |
| | | |__| | | || | / /\ \ | || | | |__) | | || | | |__) | | || | \ \ / / | |
| | | __ | | || | / ____ \ | || | | ___/ | || | | ___/ | || | \ \/ / | |
| | _| | | |_ | || | _/ / \ \_ | || | _| |_ | || | _| |_ | || | _| |_ | |
| | |____||____| | || ||____| |____|| || | |_____| | || | |_____| | || | |______| | |
| | | || | | || | | || | | || | | |
| '--------------' || '--------------' || '--------------' || '--------------' || '--------------' |
'----------------' '----------------' '----------------' '----------------' '----------------'
.-. .
(_) )-. .-. / / /
/ __) `-' ).--. ---/--- /-. .-../ .-. . .-.
/ `. / / / / | ( / ( | ) /
/' ) _.(__. / / _.' | `-'-.. `-'-' (_.'
(_/ `----' ..-._)
Alles anzeigen
Alles Gute und viiieell Gesundheit!
Gruß,
UEZ
Mich würde mal die Laufzeit der Skripte interessieren. Kannst du mal einen Benchmark laufen lassen?
Gruß,
UEZ
Ich habe meinen Code aktualisiert, so dass auch leere Felder dargestellt werden.
Wie viele Einträge werden denn bearbeitet?
Gruß,
UEZ
#include <Array.au3>
#region Test Array
Dim $aObjects[99][3] = [ _
["$ftina","ftireditors2@test.com","Accounting Service"], _
["$mlaaa","big2.creditors@test.com","Accounting Service"], _
["$mlaaag","anlla.agius@test.com","Accounting Service"], _
["$mlaaat","ane.attard@test.com","Accounting Service"], _
["$mlaab","mlat.FTi.Com","Accounting Service"], _
["$mlaaba","alder.barbara@test.com","Accounting Service"], _
["$mlaabo","ane.borg@test.com","Accounting Service"], _
["$mlaacl","ansia.calleja@test.com","Accounting Service"], _
["$mlaacu","Au.Curmi@test.com","Accounting Service"], _
["$mlaade","anette.demanuele@test.com","Accounting Service"], _
["$mlaadu","aair.duncan@test.com","Accounting Service"], _
["$mlaage","aw.gerardi@test.com","Accounting Service"], _
["$mlaagl","an.galea@test.com","Accounting Service"], _
["$mlaamg","Ail.Magro@test.com","Accounting Services"], _
["$mlaamr","ail.mercieca@test.com","Accounting Service"], _
["$mlaan","al.scicluna@test.com","Accounting Service"], _
["$mlaas","al.savona@test.com","Accounting Service"], _
["$mlaasc","aise.scicluna@test.com","Accounting Service"], _
["$mlaasp","Ael.Spiteri@test.com","Accounting Service"], _
["$mlaat","keatkins@test.com","Accounting Service"], _
["$mlaawa","a.watanabe@test.com","Accounting Service"], _
["$mlabc","crors19@test.com","Accounting Service"], _
["$mlabgr","bce.grima@test.com","Accounting Service"], _
["$mlabmi","brdette.micallef@test.com","Accounting Service"], _
["$mlaca","che.psaila@test.com","Accounting Service"], _
["$mlacao","ctina.azzopardi@test.com","Accounting Service"], _
["$mlacat","ctian.attard@test.com","Accounting Service"], _
["$mlacaz","clina.azzopardi@test.com","Accounting Service"], _
["$mlacbe","Ctian.Bezzina@test.com","Accounting Servicece"], _
["$mlacbr","celle.borg@test.com","Accounting Service"], _
["$mlacbu","cc.buhagiar@test.com","Accounting Service"], _
["$mlacc","caciscaldi@test.com","Accounting Service"], _
["$mlaccl","C.Carabott@test.com","Accounting Service"], _
["$mlaccm","ctianne.camilleri@test.com","Accounting Service"], _
["$mlaccs","C.Cassar@test.com","Accounting Service"], _
["$mlacdi","con.dingli-bennetti@meetingpointint.com","GD Life Limited"], _
["$mlacfe","ctine.fenech@meetingpointmalta.com","Services Malta Ltd."], _
["$mlacga","lhools1.accounts@test.com","Accounting Service"], _
["$mlachi","ctian.hili@test.com","Accounting Service"], _
["$mlacma","c.micallef@test.com","Accounting Service"], _
["$mlacmz","ctianne.mizzi@test.com","Accounting Service"], _
["$mlacpo","crine.portelli@test.com","Accounting Service"], _
["$mlacq","crors24@test.com","Accounting Service"], _
["$mlacsa","crine.saliba@test.com","Accounting Service"], _
["$mlacsl","csaliba@test.com","Accounting Service"], _
["$mlacvl","Cene.Vella@test.com","Accounting Service"], _
["$mlacxe","cene.xuereb@test.com","Accounting Service"], _
["$mlacxu","ctian.xuereb@test.com","Accounting Service"], _
["$mlada","icest.com","Accounting Service"], _
["$mladb","da.bugeja@test.com","Accounting Service"], _
["$mladba","dn.barbara@test.com","Accounting Service"], _
["$mladc","doy.camilleri@test.com","Accounting Service"], _
["$mladca","dra.catania@test.com","Accounting Service"], _
["$mladd","da.delia@test.com","Accounting Service"], _
["$mlade","bia3.creditors@test.com","Accounting Service"], _
["$mladga","de.galea@test.com","Accounting Service"], _
["$mladgi","dnne.grima@test.com","Accounting Service"], _
["$mladmi","de.mifsud@test.com","Accounting Service"], _
["$mladmu","D.Muscat@test.com","Accounting Service"], _
["$mladp","done.spiteri@test.com","Accounting Service"], _
["$mlaea","crors18@test.com","Accounting Service"], _
["$mlaeca","e.carabott@test.com","Accounting Service"], _
["$mlaemi","eora.micallef@test.com","Accounting Service"], _
["$mlaena","e.nappa@test.com","Accounting Service"], _
["$mlaesp","eel.spiteri@test.com","Accounting Service"], _
["$mlaet","trort@meetingpointmalta.com","Services Malta Ltd."], _
["$mlaev","el.vella@test.com","Accounting Service"], _
["$mlafbu","Fzia.Buhagiar@test.com","Accounting Service"], _
["$mlafm","maka.frantz@test.com","Accounting Service"], _
["$mlagcr","Gelle.Curmi@test.com","Accounting Service"], _
["$mlagg","gleorge.grima@test.com","Accounting Service"], _
["$mlaggo","ga.gouder@test.com","Accounting Service"], _
["$mlagm","ftcreditors@test.com","Accounting Service"], _
["$mlagve","getta.vella@test.com","Accounting Service"], _
["$mlagvl","Gella.Vella@test.com","Accounting Service"], _
["$mlagza","gio.zammit@test.com","Accounting Service"], _
["$mlahfa","hh.farrugia@test.com","Accounting Service"], _
["$mlaig","mlMt.FTi.Com","Accounting Service"], _
["$mlaim","chr4.creditors@test.com","Accounting Service"], _
["$mlajaq","jtte.aquilina@test.com","Accounting Service"], _
["$mlajaz","ctors22@test.com","Accounting Service"], _
["$mlajba","jca.bajada@test.com","Accounting Service"], _
["$mlajbo","j.bonnici@test.com","Accounting Service"], _
["$mlajca","jh.carabott@test.com","Services Malta Ltd."], _
["$mlajcc","j.cauchi@test.com","Accounting Service"], _
["$mlajco","Jne.Cortis@test.com","Accounting Service"], _
["$mlajcr","jfer.caruana@test.com","Accounting Service"], _
["$mlajd","bia5.creditors@test.com","Accounting Service"], _
["$mlajga","j.gatt@test.com","Accounting Service"], _
["$mlajl","jete.galea@test.com","Accounting Service"], _
["$mlajm","jaline.thorpe@test.com","Accounting Service"], _
["$mlajme","jeline.mercieca@test.com","Accounting Service"], _
["$mlajq","jabriffa@test.com","Accounting Service"], _
["$mlajs","mlMt.FTi.Com","Accounting Service"], _
["$mlajto","j.torpiano@test.com","Accounting Service"], _
["$mlajve","jca.vella@test.com","Accounting Services"], _
["$mlajza","ctors14@test.com","Accounting Service"], _
["$mlaka","yimeetingpointmalta.com","Meeting Point Malta Ltd."], _
["$mlakaz","kazzopardi@test.com","Accounting Service"]]
#endregion
$bench = TimerInit()
$aR = CountItems($aObjects)
ConsoleWrite(Round(TimerDiff($bench) / 1000, 4) & " s" & @CRLF)
_ArrayDisplay($aR)
Func CountItems($Array, $item = 2, $ignoreblank = False)
If Not IsArray($Array) Then Return SetError(1, 0, 0)
If $item > UBound($Array, 2) - 1 Then Return SetError(2, 0, 0)
Local $aSource = $Array
_ArraySort($aSource, 0, 0, 0, $item)
Local $aResult[UBound($aSource)][2]
Local $x = 1
Local $i = 0
Local $j = 1
Local $z = 1
While $j < UBound($aSource)
If $aSource[$i][$item] <> $aSource[$j][$item] Then
If $ignoreblank Then
If $aSource[$i][$item] <> "" Then
$aResult[$x][0] = $aSource[$i][$item]
$aResult[$x][1] = $z
$x += 1
EndIf
Else
$aResult[$x][0] = $aSource[$i][$item]
$aResult[$x][1] = $z
$x += 1
EndIf
$i = $j
$z = 0
EndIf
$z += 1
$j += 1
WEnd
If $i = UBound($aSource) -1 Then
$aResult[$x][0] = $aSource[UBound($aSource) - 1][$item]
$aResult[$x][1] = 1
EndIf
If $i < UBound($aSource) -1 And $i > 1 Then
$aResult[$x][0] = $aSource[$i][$item]
$aResult[$x][1] = $z
EndIf
ReDim $aResult[$x + 1][2]
$aResult[0][0] = $x
_ArraySort($aResult, 0, 1, 0, 0)
$aSource = ""
Return SetError(0, 0, $aResult)
EndFunc
Gruß,
UEZ
Wann ist ein Beitrag alt, so dass nicht mehr Kommentare abgegeben werden dürfen/sollten?
Ich finde jeder sollte die Freiheit haben auch "alte" Beiträge zu kommentieren! Genau so gut kann jeder den Beitrag ignorieren!
Ferner finde ich auch den Hinweis unnütz, dass der Thread "alt" ist, schließlich kann man das Einstelldatum selbst sehen!
Gruß,
UEZ
genau so wollte ich es haben! ![]()
Ich will ein Tool basteln, womit man Shares von einem Server zu einem anderen Server umziehen kann (Migration)!
Vielen, vielen DANK Oscar!
Ich komme der Sache jetzt wesentlich näher! ![]()
Ich werde diesen Beitrag zunächst offen lassen, falls ich noch Fragen habe!
Gruß,
UEZ