Bei AutoIt werden die Dezimalstellen einer Zahl nicht mit Kommata sondern mit Punkten gekennzeichnet. Also so:
[autoit]3.141592 ;etc....
[/autoit]Bei AutoIt werden die Dezimalstellen einer Zahl nicht mit Kommata sondern mit Punkten gekennzeichnet. Also so:
[autoit]3.141592 ;etc....
[/autoit]Und um Classname und Instance der Controls für ControlSend etc. herauszubekommen verwendest du am besten das AutoIt WindowInfoTool im AutoIt Installationsordner ;).
ZitatOder er erfindet einen fetten kompressionsalgorytmus^^
Das muss aber ein verdammt guter Kompressionsalgorythmus sein
... Spiele und Filme werden dann in Zukunft nicht mehr auf DVD's verkauft sondern auf Disketten. ![]()
Dann ist das Script aus meinem ersten Beitrag das was du brauchst? Oder funktioniert es nicht wie du es dir vorstellst?
UEZ Vielleich will er das als eine Art Hintegrundbild in einer GUI.
Sozusagen die GDI+ Variante von GUICtrlCreatePic... ![]()
Das hier sollte ohne großen Geschwindigkeitsverlust funktionieren.
#include "FileListRekursiv.au3>
[/autoit] [autoit][/autoit] [autoit]$von1="v:\pcssw\interface\ish\datain\"
$von2="w:\pcssw\interface\ish\datain\"
$in="h:\datain\"
$file="*.dat"
$aFiles1 = _FileListToRekursiv($von1, $file)
$aFiles2 = _FileListToRekursiv($von2, $file)
For $i = 1 To $aFiles1[0]
ConsoleWrite($i & ". - " & $aFiles1[$i] & " : " & FileMove($von1 & $aFiles1[$i], $in & $aFiles1[$i], 1) & @CRLF)
Next
For $i = 1 To $aFiles2[0]
ConsoleWrite($i & ". - " & $aFiles2[$i] & " : " & FileMove($von1 & $aFiles2[$i], $in & $aFiles2[$i], 1) & @CRLF)
Next
Die Datei im Anhang muss noch ins selbe Verzeichnis wie das Script.
Kannst du vielleicht den Teil des Scriptes zeigen, der für das verschieben verantwortlich ist? Sonst können wir nur raten woran es liegt...
Update: Habe hellboy3's GUIGetCursorInfo Problem beseitigt (siehe 1. Beitrag) ;).
Du kannst das mit ein paar Funktionen aus der GDIP.au3 erreichen. Das dürfte um einiges schneller sein, als die Pixel einzeln transparent zu setzen.
#include <GDIPlus.au3>
[/autoit] [autoit][/autoit] [autoit]$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)
_GDIPlus_GraphicsSetClipRect($hGraphic, $iX_Clip, $iY_Clip, $iWidth_Clip, $iHeight_Clip, 3) ;Setzt eine Begrenzung für Zeichenfläche.
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_GraphicsDrawImageRect($hGraphic, $hImage, 0, 0, $iWidth, $iHeight)
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_ImageSaveToFile($hBitmap, @ScriptDir & "\Test.png")
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_Shutdown()
; #FUNCTION# ====================================================================================================================
; Name...........: _GDIPlus_BitmapCreateFromScan0
; Description ...: Creates a Bitmap object based on an array of bytes along with size and format information
; Syntax.........: _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight[, $iStride = 0[, $iPixelFormat = 0x0026200A[, $pScan0 = 0]]])
; Parameters ....: $iWidth - The bitmap width, in pixels
; $iHeight - The bitmap height, in pixels
; $iStride - Integer that specifies the byte offset between the beginning of one scan line and the next. This
; +is usually (but not necessarily) the number of bytes in the pixel format (for example, 2 for 16 bits per pixel)
; +multiplied by the width of the bitmap. The value passed to this parameter must be a multiple of four
; $iPixelFormat - Specifies the format of the pixel data. Can be one of the following:
; |$GDIP_PXF01INDEXED - 1 bpp, indexed
; |$GDIP_PXF04INDEXED - 4 bpp, indexed
; |$GDIP_PXF08INDEXED - 8 bpp, indexed
; |$GDIP_PXF16GRAYSCALE - 16 bpp, grayscale
; |$GDIP_PXF16RGB555 - 16 bpp; 5 bits for each RGB
; |$GDIP_PXF16RGB565 - 16 bpp; 5 bits red, 6 bits green, and 5 bits blue
; |$GDIP_PXF16ARGB1555 - 16 bpp; 1 bit for alpha and 5 bits for each RGB component
; |$GDIP_PXF24RGB - 24 bpp; 8 bits for each RGB
; |$GDIP_PXF32RGB - 32 bpp; 8 bits for each RGB. No alpha.
; |$GDIP_PXF32ARGB - 32 bpp; 8 bits for each RGB and alpha
; |$GDIP_PXF32PARGB - 32 bpp; 8 bits for each RGB and alpha, pre-mulitiplied
; $pScan0 - Pointer to an array of bytes that contains the pixel data. The caller is responsible for
; +allocating and freeing the block of memory pointed to by this parameter.
; Return values .: Success - Returns a handle to a new Bitmap object
; Failure - 0 and either:
; |@error and @extended are set if DllCall failed
; |$GDIP_STATUS contains a non zero value specifying the error code
; Remarks .......: After you are done with the object, call _GDIPlus_ImageDispose to release the object resources
; Related .......: _GDIPlus_ImageDispose
; Link ..........; @@MsdnLink@@ GdipCreateBitmapFromScan0
; Example .......; Yes
; ===============================================================================================================================
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
; #FUNCTION# ====================================================================================================================
; 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)
$GDIP_STATUS = $aResult[0]
Return $aResult[0] = 0
EndFunc ;==>_GDIPlus_GraphicsSetClipRect
Zitathab eine Lösung für mein Problem gefunden...
Poste es doch ;). Vielleicht hat irgendwann jemand hier im Forum das selbe Problem...
Mit Vektoren geht das z.B. so.
#include <Array.au3>
[/autoit] [autoit][/autoit] [autoit]Global Const $Pi_Div_180 = ACos(-1) / 180
[/autoit] [autoit][/autoit] [autoit]$iLength = 10
$iStartAngle = 0
$iStepAngle = 45
$iSteps = 8
Global $aVector_Test[2] = [0, $iLength * -1], $aResults[$iSteps + 1][2] = [[$iSteps]]
[/autoit] [autoit][/autoit] [autoit]For $i = 1 To $aResults[0][0]
$aVector_Result = _Vector_RotateOnZAxis($aVector_Test, $iStartAngle + ($i - 1) * $iStepAngle)
$aResults[$i][0] = $aVector_Result[0]
$aResults[$i][1] = $aVector_Result[1]
Next
_ArrayDisplay($aResults)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Func _Vector_RotateOnZAxis($aVector_Rotate, $iDegree)
Local $aVector_Return[2]
$aVector_Return[0] = $aVector_Rotate[0] * _Cos($iDegree) - $aVector_Rotate[1] * _Sin($iDegree)
$aVector_Return[1] = $aVector_Rotate[1] * _Cos($iDegree) + $aVector_Rotate[0] * _Sin($iDegree)
Return $aVector_Return
EndFunc ;==>_Vector_RotateOnZAxis
Func _Cos($nValue)
Return Cos($nValue * $Pi_Div_180)
EndFunc ;==>_Cos
Func _Sin($nValue)
Return Sin($nValue * $Pi_Div_180)
EndFunc ;==>_Sin
Du kannst auch einfach eine Bitmap aus dem "HICON" erstellen.
#include <WinAPI.au3>
#include <Constants.au3>
#include <GDIPlus.au3>
$sIconPath = FileOpenDialog("Icon öffnen", @ScriptDir, "Icon Files (*.ico)")
If @error Then Exit
$hWnd = GUICreate("Icon Test", 200, 200)
GUISetState()
_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
_GDIPlus_GraphicsSetSmoothingMode($hGraphic, 2)
_GDIPlus_GraphicsClear($hGraphic, 0xFFFFFFFF)
$hIcon = _WinAPI_LoadImage(0, $sIconPath, $IMAGE_ICON, 0, 0, $LR_LOADFROMFILE)
$hBitmap_Icon = _GDIPlus_BitmapCreateFromHICON($hIcon)
_WinAPI_DestroyIcon($hIcon)
$iWidth = _GDIPlus_ImageGetWidth($hBitmap_Icon)
$iHeight = _GDIPlus_ImageGetHeight($hBitmap_Icon)
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap_Icon, 100 - $iWidth / 2, 100 - $iHeight / 2, $iWidth, $iHeight)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_BitmapDispose($hBitmap_Icon)
_GDIPlus_Shutdown()
While GUIGetMsg() <> -3
WEnd
; #FUNCTION# ====================================================================================================================
; Name...........: _GDIPlus_BitmapCreateFromHICON
; Description ...: Creates a Bitmap object based on an icon
; Syntax.........: _GDIPlus_BitmapCreateFromHICON($hIcon)
; Parameters ....: $hIcon - Handle to an icon
; Return values .: Success - Returns a handle to a new Bitmap object
; Failure - 0 and either:
; |@error and @extended are set if DllCall failed
; |$GDIP_STATUS contains a non zero value specifying the error code
; Remarks .......: After you are done with the object, call _GDIPlus_ImageDispose to release the object resources
; Related .......: _GDIPlus_ImageDispose, _WinAPI_LoadImage, _WinAPI_LoadIcon
; Link ..........; @@MsdnLink@@ GdipCreateBitmapFromHICON
; Example .......; Yes
; ===============================================================================================================================
Func _GDIPlus_BitmapCreateFromHICON($hIcon)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromHICON", "hwnd", $hIcon, "int*", 0)
If @error Then Return SetError(@error, @extended, 0)
$GDIP_STATUS = $aResult[0]
Return $aResult[2]
EndFunc ;==>_GDIPlus_BitmapCreateFromHICON
Hmm Modulo vielleicht noch. Ansonsten wären das die wichtigsten Funktionen. Alles andere mache ich entweder auf dem Papier oder mit einem Script. ![]()
(Arcus)Sinus, (Arcus)Kosinus, (Arcus)Tangens, Quadratwurzel, Konstanten wie Pi oder eulersche Zahl.
So würde es gehen...
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#include <GUIEdit.au3>
$hWnd = GUICreate("Test", 200, 60)
$cInput = GUICtrlCreateInput("AutoIt", 5, 5, 190, 20)
$cButton = GUICtrlCreateButton("Test", 5, 30, 190, 25)
GUISetState()
GUIRegisterMsg($WM_COMMAND, "_WM_COMMAND")
$bFocus = False
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
If $bFocus Then
ControlFocus($hWnd, "", $cInput)
_GUICtrlEdit_SetSel($cInput, 0, -1)
$bFocus = False
EndIf
WEnd
Func _WM_COMMAND($hWndGUI, $MsgID, $WParam, $LParam)
If $WParam = 0x01000003 And $LParam = ControlGetHandle($hWnd, "", $cInput) Then $bFocus = True
EndFunc
Wobei ich nicht weiß, warum ein direktes aufrufen von SetSel innerhalb von _WM_COMMAND nicht funktioniert. ![]()
Allerdings solltest du dann den String überprüfen z.B. mit StringRegExp.
Ansonsten könnte man auch MsgBox o.Ä. eingeben und es würde ausgeführt werden ;).
$sTerm = InputBox("Calculate", "Term:")
$sTerm = StringRegExpReplace($sTerm, '[^\d\+\-/\*\(\)\^]', "")
MsgBox(64, "Result", Execute($sTerm))
So würde es gehen...
[autoit]$sTest = '<span style="text-align: left;" class="z" id="ticker1"> test34:25</span>'
$sPattern = '<span style="text-align: left;" class="z" id="ticker1"> ((?:\d|:)+?)</span>'
$aResult = StringRegExp($sTest, $sPattern, 3)
MsgBox(64, "Result", $aResult[0])
Das ist natürlich eine von unzähligen Lösungen. Vielleicht kennt ja jemand auch eine bessere/schnellere...
Alles gute zum Geburtstag Andy! ![]()
Ich habe mal ein Beispiel gemacht....
#include <GDIPlus.au3>
#include <GUIConstants.au3>
#include <Misc.au3>
Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]Global Const $Pi_Div_180 = ACos(-1) / 180
$vU32Dll = DllOpen("User32.dll")
$iGUIColorBG = 0xFFFFFFFF
$iGUIWidth = 400
$iGUIHeight = 400
$FPS = 40
$iRadiusButton = 60
$iRadiusPoint = 40
$vButton_Middle = _Vector_Create(200, 200)
$vButton_Point = _Vector_Create(200, 160)
$vNegativeYAxis = _Vector_Create(0, -1)
$iAngle = 0
$hWnd = GUICreate("Test", $iGUIWidth, $iGUIHeight)
GUISetState()
_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics($iGUIWidth, $iGUIHeight, $hGraphic)
$hBuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
_GDIPlus_GraphicsSetSmoothingMode($hBuffer, 2)
$hFormat_Text = _GDIPlus_StringFormatCreate()
$hFamily_Text = _GDIPlus_FontFamilyCreate("Arial")
$hFont_Text = _GDIPlus_FontCreate($hFamily_Text, 15)
$hPen_Button = _GDIPlus_PenCreate(0xFF000000, 2)
$hBrush_Point = _GDIPlus_BrushCreateSolid(0xFF000000)
$hBrush_Text = _GDIPlus_BrushCreateSolid(0xFF0000FF)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
AdlibRegister("_DrawFrame", Round(1000 / $FPS))
$bMouseClick = False
[/autoit] [autoit][/autoit] [autoit]While Sleep(1000)
WEnd
Func _DrawFrame()
If _IsPressed("01", $vU32Dll) Then
$aCursorInfo = GUIGetCursorInfo($hWnd)
If $bMouseClick Or _PointIsInCircle($aCursorInfo[0], $aCursorInfo[1], DllStructGetData($vButton_Middle, "X"), DllStructGetData($vButton_Middle, "Y"), $iRadiusButton) Then
$vDirection = _Vector_Normalize(_Vector_Create($aCursorInfo[0] - DllStructGetData($vButton_Middle, "X"), $aCursorInfo[1] - DllStructGetData($vButton_Middle, "Y")))
DllStructSetData($vButton_Point, "X", DllStructGetData($vButton_Middle, "X") + DllStructGetData($vDirection, "X") * $iRadiusPoint)
DllStructSetData($vButton_Point, "Y", DllStructGetData($vButton_Middle, "Y") + DllStructGetData($vDirection, "Y") * $iRadiusPoint)
$iAngle = _Vector_GetAngle($vDirection, $vNegativeYAxis)
If DllStructGetData($vDirection, "X") < 0 Then $iAngle = 360 - $iAngle
$bMouseClick = True
EndIf
Else
If $bMouseClick Then $bMouseClick = False
EndIf
$aLayout_Text = _GDIPlus_GraphicsMeasureString($hBuffer, Round($iAngle, 2), $hFont_Text, _GDIPlus_RectFCreate(0, 270), $hFormat_Text)
DllStructSetData($aLayout_Text[0], "X", 200 - DllStructGetData($aLayout_Text[0], "Width") / 2)
_GDIPlus_GraphicsClear($hBuffer, $iGUIColorBG)
_GDIPlus_GraphicsDrawStringEx($hBuffer, Round($iAngle, 2), $hFont_Text, $aLayout_Text[0], $hFormat_Text, $hBrush_Text)
_GDIPlus_GraphicsDrawEllipse($hBuffer, DllStructGetData($vButton_Middle, "X") - $iRadiusButton, DllStructGetData($vButton_Middle, "Y") - $iRadiusButton, $iRadiusButton * 2, $iRadiusButton * 2, $hPen_Button)
_GDIPlus_GraphicsFillEllipse($hBuffer, DllStructGetData($vButton_Point, "X") - 3, DllStructGetData($vButton_Point, "Y") - 3, 6, 6, $hBrush_Point)
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $iGUIWidth, $iGUIHeight)
EndFunc ;==>_DrawFrame
Func _Exit()
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_GraphicsDispose($hBuffer)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_PenDispose($hPen_Button)
_GDIPlus_BrushDispose($hBrush_Point)
_GDIPlus_BrushDispose($hBrush_Text)
_GDIPlus_StringFormatDispose($hFormat_Text)
_GDIPlus_FontFamilyDispose($hFamily_Text)
_GDIPlus_FontDispose($hFont_Text)
_GDIPlus_Shutdown()
DllClose($vU32Dll)
Exit
EndFunc ;==>_Exit
Func _Vector_GetAngle($vVector1, $vVector2)
$nScalarProduct = DllStructGetData($vVector1, "X") * DllStructGetData($vVector2, "X") + DllStructGetData($vVector1, "Y") * DllStructGetData($vVector2, "Y")
$nVector1_Length = Sqrt(DllStructGetData($vVector1, "X") ^ 2 + DllStructGetData($vVector1, "Y") ^ 2)
$nVector2_Length = Sqrt(DllStructGetData($vVector2, "X") ^ 2 + DllStructGetData($vVector2, "Y") ^ 2)
Return ACos($nScalarProduct / ($nVector1_Length * $nVector2_Length)) / $Pi_Div_180
EndFunc ;==>_Vector_GetAngle
Func _Vector_Normalize($vNorm)
Local $vReturn = DllStructCreate("float X;float Y")
$nVectorLength = Sqrt(DllStructGetData($vNorm, "X") ^ 2 + DllStructGetData($vNorm, "Y") ^ 2)
If $nVectorLength Then
DllStructSetData($vReturn, "X", DllStructGetData($vNorm, "X") / $nVectorLength)
DllStructSetData($vReturn, "Y", DllStructGetData($vNorm, "Y") / $nVectorLength)
Else
DllStructSetData($vReturn, "X", 0)
DllStructSetData($vReturn, "Y", 0)
EndIf
Return $vReturn
EndFunc ;==>_Vector_Normalize
Func _Vector_RotateOnZAxis($vRotate, $iDegree)
Local $vReturn = DllStructCreate("float X;float Y")
DllStructSetData($vReturn, "X", DllStructGetData($vRotate, "X") * _Cos($iDegree) - DllStructGetData($vRotate, "Y") * _Sin($iDegree))
DllStructSetData($vReturn, "Y", DllStructGetData($vRotate, "Y") * _Cos($iDegree) + DllStructGetData($vRotate, "X") * _Sin($iDegree))
Return $vReturn
EndFunc ;==>_Vector_RotateOnZAxis
Func _Vector_ProjectVector($vProject1, $vProject2)
Local $vReturn = DllStructCreate("float X;float Y")
$ScalarProduct = DllStructGetData($vProject1, "X") * DllStructGetData($vProject2, "X") + DllStructGetData($vProject1, "Y") * DllStructGetData($vProject2, "Y")
DllStructSetData($vReturn, "X", ($ScalarProduct / (DllStructGetData($vProject1, "X") * DllStructGetData($vProject1, "Y") + DllStructGetData($vProject2, "X") * DllStructGetData($vProject1, "Y"))) * DllStructGetData($vProject2, "X"))
DllStructSetData($vReturn, "Y", ($ScalarProduct / (DllStructGetData($vProject1, "X") * DllStructGetData($vProject1, "Y") + DllStructGetData($vProject2, "X") * DllStructGetData($vProject1, "Y"))) * DllStructGetData($vProject2, "Y"))
Return $vReturn
EndFunc ;==>_Vector_ProjectVector
Func _Vector_GetLength($vLength)
Return Sqrt(DllStructGetData($vLength, "X") ^ 2 + DllStructGetData($vLength, "Y") ^ 2)
EndFunc ;==>_Vector_GetLength
Func _Vector_Create($nXValue, $nYValue)
Local $vReturn = DllStructCreate("float X;float Y")
DllStructSetData($vReturn, "X", $nXValue)
DllStructSetData($vReturn, "Y", $nYValue)
Return $vReturn
EndFunc ;==>_Vector_Create
Func _Cos($nValue)
Return Cos($nValue * $Pi_Div_180)
EndFunc ;==>_Cos
Func _Sin($nValue)
Return Sin($nValue * $Pi_Div_180)
EndFunc ;==>_Sin
Func _Tan($nValue)
Return Tan($nValue * $Pi_Div_180)
EndFunc ;==>_Tan
Func _PointIsInCircle($iX_Point, $iY_Point, $iX_Circle, $iY_Circle, $iRadius_Circle)
$iDistPoints = _GetPointsDistance($iX_Point, $iY_Point, $iX_Circle, $iY_Circle)
If ($iRadius_Circle > 0 And $iDistPoints < $iRadius_Circle) Or ($iRadius_Circle < 0 And $iDistPoints > $iRadius_Circle) Or $iDistPoints = 0 Then Return 1
Return 0
EndFunc ;==>_PointIsInCircle
Func _GetPointsDistance($iPointX1, $iPointY1, $iPointX2, $iPointY2)
Return Sqrt(($iPointX1 - $iPointX2) ^ 2 + ($iPointY1 - $iPointY2) ^ 2)
EndFunc ;==>_GetPointsDistance
Man lernt nie aus, danke autoBert ;).
ZitatIch dachte, dass er GDI+ bereits benutzt hat?
Und dann kommt sowas dabei raus?!
Er braucht eindeutig ein (besseres) GDI+ Tutorial...
[autoit] Zitatund wie geht das?
GUIGetCursorInfo
[/autoit]