Create Angulos.au3

Create Angulos.au3

#include <Array.au3>
#include <Misc.au3>
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <GuiComboBoxEx.au3>
Global $hGui, $hMsg, $active = True
Global $hGraphic, $hPen, $hPen2, $hBitmap, $hBackbuffer, $hCursor, $mouse[4], $xx2, $yy2

Global $largura = 800, $altura = 600, $limites[6]

Global Const $PI = 3.1415926535897932384626433832795
Global Const $radToDeg = 180 / $PI

$hGui = GUICreate('Ângulos', $largura, $altura)
Global $hSeno = GUICtrlCreateCheckbox('Seno', 10, 5, 80, 20)
Global $hCos = GUICtrlCreateCheckbox('Cosseno', 10, 25, 80, 20)
Global $hTan = GUICtrlCreateCheckbox('Tangente', 100, 5, 80, 20)
Global $hCot = GUICtrlCreateCheckbox('Cotangente', 100, 25, 80, 20)
Global $hSec = GUICtrlCreateCheckbox('Secante', 190, 5, 80, 20)
Global $hCosec = GUICtrlCreateCheckbox('Co-Sec', 190, 25, 80, 20)
Global $hPasso = GUICtrlCreateCombo('', 280, 5, 80, 20, $CBS_DROPDOWNLIST)
Global $hInvertido = GUICtrlCreateCheckbox('Inverso', 370, 5, 80, 20)
GUICtrlSetData($hPasso, 'Livre|1|5|10|15|30', 'Livre')

Global $iSeno = False, $iCos = False, $iTan = False, $iCot = False, $iSec = False, $iCoSec = False, $iInverso = False
GUISetState(@SW_SHOWNORMAL)

_GDIPlus_Startup()
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics($largura - 20, $altura - 60, $hGraphic)

_limites()

Func _limites()
	$limites[0] = 10
	$limites[1] = 50
	$limites[2] = $largura - 20
	$limites[3] = $altura - 50
	$limites[4] = ($largura - 20) / 2
	$limites[5] = ($altura - 50) / 2
	;_ArrayDisplay($limites)
EndFunc   ;==>_limites
$hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)

$hPen = _GDIPlus_PenCreate()
$hPen2 = _GDIPlus_PenCreate(0xFFFF0000, 3)
$hPen3 = _GDIPlus_PenCreate(0xFF00FF00)
$hPen4 = _GDIPlus_PenCreate(0xFF0000FF)
_GDIPlus_GraphicsClear($hBackbuffer)
_GDIPlus_GraphicsSetSmoothingMode($hBackbuffer, 2)

Global $hBrush_01 = _GDIPlus_BrushCreateSolid(0xFF336699)
Global $hBrush_02 = _GDIPlus_BrushCreateSolid(0xFFFF0000)
Global $hBrush_03 = _GDIPlus_BrushCreateSolid(0xFF00FF00)
Global $hFamily = _GDIPlus_FontFamilyCreate('Courier New')
Global $hFont = _GDIPlus_FontCreate($hFamily, 10)
Global $hPosX = _GDIPlus_RectFCreate(2, 0, 120, 15)
Global $hPosY = _GDIPlus_RectFCreate(2, 20, 120, 15)
Global $hAng = _GDIPlus_RectFCreate(2, 80, 120, 15)
Global $hInv = _GDIPlus_RectFCreate(2, 100, 120, 15)

Global $hPosX1 = _GDIPlus_RectFCreate(2, 40, 120, 15)
Global $hPosY1 = _GDIPlus_RectFCreate(2, 60, 120, 15)
Global $hStringFormat = _GDIPlus_StringFormatCreate()

Global $start = TimerInit()
While Sleep(10)
	$hMsg = GUIGetMsg()
	Switch $hMsg
		Case $GUI_EVENT_CLOSE
			Quit()
		Case $hSeno
			$iSeno = $iSeno == False ? True : False
		Case $hCos
			$iCos = $iCos == False ? True : False
		Case $hTan
			$iTan = $iTan == False ? True : False
		Case $hCot
			$iCot = $iCot == False ? True : False
		Case $hSec
			$iSec = $iSec == False ? True : False
		Case $hCosec
			$iCoSec = $iCoSec == False ? True : False
		Case $hInvertido
			$iInverso = $iInverso == False ? True : False
	EndSwitch

	$hCursor = GUIGetCursorInfo()
	If Not $hCursor Then
		$mouse[0] = $hCursor[0] - $limites[0]
		$mouse[1] = $hCursor[1] - $limites[1]
	EndIf

	If WinActive($hGui) Then
		If Not $active Then $active = True
		If TimerDiff($start) >= 10 Then
			Update()
			$start = TimerInit()
		EndIf
	ElseIf Not WinActive($hGui) And $active Then
		$active = False
	EndIf
WEnd

Func Update()
	_GDIPlus_GraphicsClear($hBackbuffer, 0xF0FFFFFF)
	;_GDIPlus_StringFormatSetAlign($hStringFormat, 1)
	_GDIPlus_GraphicsDrawStringEx($hBackbuffer, 'x[' & $mouse[0] & ']', $hFont, $hPosX, $hStringFormat, $hBrush_01)
	_GDIPlus_GraphicsDrawStringEx($hBackbuffer, 'y[' & $mouse[1] & ']', $hFont, $hPosY, $hStringFormat, $hBrush_01)
	_GDIPlus_GraphicsDrawStringEx($hBackbuffer, 'x[' & $mouse[0] - 389 & ']', $hFont, $hPosX1, $hStringFormat, $hBrush_02)
	_GDIPlus_GraphicsDrawStringEx($hBackbuffer, 'y[' & - ($mouse[1] - 270) & ']', $hFont, $hPosY1, $hStringFormat, $hBrush_02)
	$ang = _ang(0, 0, $mouse[0] - 389, -($mouse[1] - 270))
	_GDIPlus_GraphicsDrawStringEx($hBackbuffer, 'º[' & $ang[0] & ']', $hFont, $hAng, $hStringFormat, $hBrush_02)

	_box($hBackbuffer, 0, 0, $largura - 21, $altura - 61)
	_GDIPlus_GraphicsDrawLine($hBackbuffer, ($largura - 21) / 2, 0, ($largura - 21) / 2, $altura - 60, $hPen)

	_GDIPlus_GraphicsDrawLine($hBackbuffer, 0, ($altura - 60) / 2, $largura - 21, ($altura - 60) / 2, $hPen)
	_GDIPlus_GraphicsDrawEllipse($hBackbuffer, ($largura - 20) / 2 - 200 - 1, ($altura - 60) / 2 - 200, 400, 400)
	;_GDIPlus_GraphicsDrawLine($hBackbuffer, ($largura - 21) / 2, ($altura - 60) / 2, $mouse[0], $mouse[1], $hPen2)
	$cos = Int(200 * Cos(($ang[0] / 180) * $PI))
	$sen = Int(200 * Sin(($ang[0] / 180) * $PI))
	$tan = Int(200 * ($sen / $cos))
	$cot = Int(200 * ($cos / $sen))
	$sec = Int(200 * (1 / (Cos(($ang[0] / 180) * $PI))))
	$cosec = Int(200 * (1 / (Sin(($ang[0] / 180) * $PI))))

	_GDIPlus_GraphicsDrawPie($hBackbuffer, ($largura - 20) / 2 - 1 - 25, ($altura - 60) / 2 - 25, 50, 50, 0, -$ang[0])

	If $iSeno Then
		_GDIPlus_GraphicsDrawLine($hBackbuffer, ($largura - 20) / 2 - 1, ($altura - 60) / 2, 389, 270 - $sen, $hPen2)
		_GDIPlus_GraphicsDrawLine($hBackbuffer, 389 + $cos, 270 - $sen, 389, 270 - $sen, $hPen)
	EndIf

	If $iCos Then
		_GDIPlus_GraphicsDrawLine($hBackbuffer, ($largura - 20) / 2 - 1, ($altura - 60) / 2, 389 + $cos, 270, $hPen2)
		_GDIPlus_GraphicsDrawLine($hBackbuffer, 389 + $cos, 270 - $sen, 389 + $cos, 270, $hPen)
	EndIf

	If $iTan Then
		_GDIPlus_GraphicsDrawLine($hBackbuffer, 189, 1, 189, 538, $hPen)
		_GDIPlus_GraphicsDrawLine($hBackbuffer, 589, 1, 589, 538, $hPen)
		If $cos > 0 Then
			_GDIPlus_GraphicsDrawLine($hBackbuffer, 589, 270 - $tan, 589, 270, $hPen2)
			_GDIPlus_GraphicsDrawLine($hBackbuffer, 389 + $cos, 270 - $sen, 589, 270 - $tan, $hPen)
		Else
			_GDIPlus_GraphicsDrawLine($hBackbuffer, 189, 270 + $tan, 189, 270, $hPen2)
			_GDIPlus_GraphicsDrawLine($hBackbuffer, 389 + $cos, 270 - $sen, 189, 270 + $tan, $hPen)
		EndIf
	EndIf

	If $iCot Then
		_GDIPlus_GraphicsDrawLine($hBackbuffer, 1, 70, 778, 70, $hPen)
		_GDIPlus_GraphicsDrawLine($hBackbuffer, 1, 470, 778, 470, $hPen)
		If $sen > 0 Then
			_GDIPlus_GraphicsDrawLine($hBackbuffer, ($largura - 20) / 2 - 1, 70, ($largura - 20) / 2 - 1 + $cot, 70, $hPen2)
			_GDIPlus_GraphicsDrawLine($hBackbuffer, 389 + $cos, 270 - $sen, ($largura - 20) / 2 - 1 + $cot, 70, $hPen)
		Else
			_GDIPlus_GraphicsDrawLine($hBackbuffer, ($largura - 20) / 2 - 1, 470, ($largura - 20) / 2 - 1 - $cot, 470, $hPen2)
			_GDIPlus_GraphicsDrawLine($hBackbuffer, 389 + $cos, 270 - $sen, ($largura - 20) / 2 - 1 - $cot, 470, $hPen)
		EndIf
	EndIf

	If $iSec Then
		Local $resposta = ''
		Select
			Case $ang[0] == 0 Or $ang[0] = 360
				$resposta = '#1 secante[não existe]'
			Case $ang[0] > 0 And $ang[0] < 90
				$resposta = '#2 secante[' & $ang[0] & '] angulo[' & 90 + $ang[0] & ']'
			Case $ang[0] == 90 Or $ang[0] == 180
				$resposta = '#3 secante[não existe]'
			Case $ang[0] > 90 And $ang[0] < 180
				$resposta = '#4 secante[' & $ang[0] & '] angulo[' & $ang[0] - 90 & ']'
			Case $ang[0] > 180 And $ang[0] < 270
				$resposta = '#5 secante[' & $ang[0] & ']'
			Case $ang[0] > 270 And $ang[0] < 360
				$resposta = '#6 secante[' & $ang[0] & ']'
		EndSelect

		_GDIPlus_GraphicsDrawLine($hBackbuffer, 389 + $sec, 270, 389, 270, $hPen2)
		_GDIPlus_GraphicsDrawLine($hBackbuffer, 389 + $sec, 270, 389, 270 - $cosec, $hPen4)
	EndIf

	If $iCoSec Then
		Local $resposta = ''
		Select
			Case $ang[0] == 0 Or $ang[0] = 360
				$resposta = '#1 secante[não existe]'
			Case $ang[0] > 0 And $ang[0] < 90
				$resposta = '#2 secante[' & $ang[0] & '] angulo[' & 90 + $ang[0] & ']'
			Case $ang[0] == 90 Or $ang[0] == 180
				$resposta = '#3 secante[não existe]'
			Case $ang[0] > 90 And $ang[0] < 180
				$resposta = '#4 secante[' & $ang[0] & '] angulo[' & $ang[0] - 90 & ']'
			Case $ang[0] > 180 And $ang[0] < 270
				$resposta = '#5 secante[' & $ang[0] & ']'
			Case $ang[0] > 270 And $ang[0] < 360
				$resposta = '#6 secante[' & $ang[0] & ']'
		EndSelect

		_GDIPlus_GraphicsDrawLine($hBackbuffer, 389 + $sec, 270, 389, 270 - $cosec, $hPen4)
		_GDIPlus_GraphicsDrawLine($hBackbuffer, 389, 270, 389, 270 - $cosec, $hPen2)
	EndIf

	If $iInverso Then
		Local $invertido = $ang[0] > 180 ? $ang[0] - 180 : 180 + $ang[0]
		$invertido = $invertido = 360 ? 0 : $invertido
		$invertido = StringFormat('%.2f', $invertido)
		_GDIPlus_GraphicsDrawLine($hBackbuffer, ($largura - 20) / 2 - 1, ($altura - 60) / 2, 389 - $cos, 270 + $sen, $hPen3)
		_GDIPlus_GraphicsDrawStringEx($hBackbuffer, 'º[' & $invertido & ']', $hFont, $hInv, $hStringFormat, $hBrush_03)
	EndIf
	_GDIPlus_GraphicsDrawLine($hBackbuffer, ($largura - 20) / 2 - 1, ($altura - 60) / 2, 389 + $cos, 270 - $sen, $hPen3)

	_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 10, 50, $largura - 20, $altura - 60)
EndFunc   ;==>Update

Func Quit()
	_GDIPlus_BrushDispose($hBrush_01)
	_GDIPlus_BrushDispose($hBrush_02)
	_GDIPlus_BrushDispose($hBrush_03)
	_GDIPlus_FontFamilyDispose($hFamily)
	_GDIPlus_FontDispose($hFont)
	_GDIPlus_StringFormatDispose($hStringFormat)

	_GDIPlus_GraphicsDispose($hBackbuffer)
	_GDIPlus_BitmapDispose($hBitmap)
	_GDIPlus_PenDispose($hPen)
	_GDIPlus_PenDispose($hPen2)
	_GDIPlus_PenDispose($hPen3)
	_GDIPlus_GraphicsDispose($hGraphic)
	_GDIPlus_Shutdown()
	Exit
EndFunc   ;==>Quit

Func _box($hToGraphic, $ix1, $iy1, $il, $ia)
	Local $aBox[5][2]
	$aBox[0][0] = 4
	$aBox[1][0] = $ix1
	$aBox[1][1] = $iy1
	$aBox[2][0] = $ix1 + $il
	$aBox[2][1] = $iy1
	$aBox[3][0] = $ix1 + $il
	$aBox[3][1] = $iy1 + $ia
	$aBox[4][0] = $ix1
	$aBox[4][1] = $iy1 + $ia
	_GDIPlus_GraphicsDrawPolygon($hToGraphic, $aBox)
EndFunc   ;==>_box

Func _ang($xx1, $yy1, $xx2, $yy2)
	Local $arr[2], $ca = Abs($yy2 - $yy1), $co = Abs($xx2 - $xx1)
	Select
		Case $xx1 > $xx2
			Select
				Case $yy1 < $yy2
					$arr[0] = ATan(($co) / ($ca)) * $radToDeg + 90
				Case $yy1 == $yy2
					$arr[0] = 180
				Case $yy1 > $yy2
					$arr[0] = 270 - ATan(($co) / ($ca)) * $radToDeg
			EndSelect
		Case $xx1 == $xx2
			Select
				Case $yy1 < $yy2
					$arr[0] = 90
				Case $yy1 == $yy2
					$arr[0] = 0
				Case $yy1 > $yy2
					$arr[0] = 270
			EndSelect
		Case $xx1 < $xx2
			Select
				Case $yy1 < $yy2
					$arr[0] = 90 - ATan(($co) / ($ca)) * $radToDeg
				Case $yy1 == $yy2
					$arr[0] = 0
				Case $yy1 > $yy2
					$arr[0] = ATan(($co) / ($ca)) * $radToDeg + 270
					;$arr[0] = 270 - ATan(($co) / ($ca)) * $radToDeg
			EndSelect
	EndSelect
	$arr[0] = StringFormat('%.2f', $arr[0])
	$arr[1] = Sqrt($co ^ 2 + $ca ^ 2)
	Return $arr
EndFunc   ;==>_ang

error: pathspec 'Angulos/Angulos.au3' did not match any file(s) known to git


Пример скрипта для пуша в гит

Пример скрипта для пуша в гит

;        .
$sDomen = "Domen"
$sUserName = "stepanov_ao"
$sPassword = ""

$sCommand = "cmd.exe /c git push -u origin --all -v"

$sWorkingDir = $CmdLine[1]
$sOurFile = $CmdLine[2]

$sOurFile = """" & $sOurFile & """"
$sCommand = $sCommand & " > " & $sOurFile & " 2>&1"

$iReturn = RunAsWait($sUserName, $sDomen, $sPassword, 1, $sCommand, $sWorkingDir)

Exit( $iReturn )

error: pathspec 'scripts/GitPush.au3' did not match any file(s) known to git


Clearstring fix Accento en A

Clearstring fix Accento en A

func clearstring($mensage)
;~    $mensage = StringReplace($mensage,"(","")
;~    $mensage = StringReplace($mensage,")","")
   $mensage = StringReplace($mensage,","," ")
   $mensage = StringReplace($mensage,"'","")
   $mensage = StringReplace($mensage,"","")
   $mensage = StringReplace($mensage,"|","")
   $mensage = StringReplace($mensage,"`","")
   $mensage = StringReplace($mensage,"","")
   $mensage = _Latin_char_Remover($mensage)
;~ 	ConsoleWrite('+(' & @ScriptName & '-' & @ScriptLineNumber & ') : $mensage = ' & $mensage & @crlf )
   return $mensage
EndFunc

Func _Latin_char_Remover($string_to_change)

	 $string_to_change = StringReplace($string_to_change, '-', 'i')
	 $string_to_change = StringReplace($string_to_change, 'í', 'i')
	 $string_to_change = StringReplace($string_to_change, 'ú', 'u')
	 $string_to_change = StringReplace($string_to_change, 'i', 'u')
	 $string_to_change = StringReplace($string_to_change, 'é', 'e')
	 $string_to_change = StringReplace($string_to_change, 'ó', 'o')
	 $string_to_change = StringReplace($string_to_change, 'á', 'a')
;~ 	 $string_to_change = StringReplace($string_to_change, '', 'i')

	 $string_to_change = StringReplace($string_to_change, '', 'a')
	 $string_to_change = StringReplace($string_to_change, '', 'A')
	 $string_to_change = StringReplace($string_to_change, '', 'A')
	 $string_to_change = StringReplace($string_to_change, '', 'A')

	 $string_to_change = StringReplace($string_to_change, '', 'C')

	 $string_to_change = StringReplace($string_to_change, '', 'e')
	 $string_to_change = StringReplace($string_to_change, '', 'E')
	 $string_to_change = StringReplace($string_to_change, '', 'E')

	 $string_to_change = StringReplace($string_to_change, '', 'i')
	 $string_to_change = StringReplace($string_to_change, '', 'I')
	 $string_to_change = StringReplace($string_to_change, '', 'I')

	 $string_to_change = StringReplace($string_to_change, '', 'o')
	 $string_to_change = StringReplace($string_to_change, '', 'O')
	 $string_to_change = StringReplace($string_to_change, '', 'O')
	 $string_to_change = StringReplace($string_to_change, '', 'O')

	 $string_to_change = StringReplace($string_to_change, '', 'u')
	 $string_to_change = StringReplace($string_to_change, '', 'U')
	 $string_to_change = StringReplace($string_to_change, '', 'U')

	 $string_to_change = StringReplace($string_to_change, '', 'Y')

	 $string_to_change = StringReplace($string_to_change, '', 'n')
	 $string_to_change = StringReplace($string_to_change, '', 'N')
    Return $string_to_change
EndFunc   ;==>_Latin_char_Remover

func clearstring($mensage)
;~    $mensage = StringReplace($mensage,"(","")
;~    $mensage = StringReplace($mensage,")","")
   $mensage = StringReplace($mensage,","," ")
   $mensage = StringReplace($mensage,"'","")
   $mensage = StringReplace($mensage,"","")
   $mensage = StringReplace($mensage,"|","")
   $mensage = StringReplace($mensage,"`","")
   $mensage = StringReplace($mensage,"","")
   $mensage = _Latin_char_Remover($mensage)
;~ 	ConsoleWrite('+(' & @ScriptName & '-' & @ScriptLineNumber & ') : $mensage = ' & $mensage & @crlf )
   return $mensage
EndFunc

Func _Latin_char_Remover($string_to_change)

	 $string_to_change = StringReplace($string_to_change, '-', 'i')
	 $string_to_change = StringReplace($string_to_change, 'í', 'i')
	 $string_to_change = StringReplace($string_to_change, 'ú', 'u')
	 $string_to_change = StringReplace($string_to_change, 'i', 'u')
	 $string_to_change = StringReplace($string_to_change, 'é', 'e')
	 $string_to_change = StringReplace($string_to_change, 'ó', 'o')
;~ 	 $string_to_change = StringReplace($string_to_change, '', 'i')

	 $string_to_change = StringReplace($string_to_change, '', 'a')
	 $string_to_change = StringReplace($string_to_change, '', 'A')
	 $string_to_change = StringReplace($string_to_change, '', 'A')
	 $string_to_change = StringReplace($string_to_change, '', 'A')

	 $string_to_change = StringReplace($string_to_change, '', 'C')

	 $string_to_change = StringReplace($string_to_change, '', 'e')
	 $string_to_change = StringReplace($string_to_change, '', 'E')
	 $string_to_change = StringReplace($string_to_change, '', 'E')

	 $string_to_change = StringReplace($string_to_change, '', 'i')
	 $string_to_change = StringReplace($string_to_change, '', 'I')
	 $string_to_change = StringReplace($string_to_change, '', 'I')

	 $string_to_change = StringReplace($string_to_change, '', 'o')
	 $string_to_change = StringReplace($string_to_change, '', 'O')
	 $string_to_change = StringReplace($string_to_change, '', 'O')
	 $string_to_change = StringReplace($string_to_change, '', 'O')

	 $string_to_change = StringReplace($string_to_change, '', 'u')
	 $string_to_change = StringReplace($string_to_change, '', 'U')
	 $string_to_change = StringReplace($string_to_change, '', 'U')

	 $string_to_change = StringReplace($string_to_change, '', 'Y')

	 $string_to_change = StringReplace($string_to_change, '', 'n')
	 $string_to_change = StringReplace($string_to_change, '', 'N')
    Return $string_to_change
EndFunc   ;==>_Latin_char_Remover


simple autoit script for test

simple autoit script for test

#include <IE.au3>
;http://msdn.microsoft.com/en-us/library/Aa752084.aspx
$ourl="http://localhost:5000/"

$oIE = _IEAttach ($ourl,"url")
If @error = $_IEStatus_NoMatch Then
	$oIE = _IECreate ($ourl & "sample.html")
endIf

$oForm = _IEFormGetObjByName ($oIE, "form1")
;username, call DOM directly
$oIE.document.getElementById("username").value="helloAutoIT"
;state select
$oSelect = _IEFormElementGetObjByName ($oForm, "state")
_IEFormElementOptionSelect ($oSelect, "S2", 1, "byText")
;options raido
_IEFormElementRadioSelect($oForm, "2nd", "type", 1, "byValue")

ConsoleWrite(@Error)
Sleep(10000)
_IEFormSubmit($oForm, 0)
_IELoadWait($oIE)
Sleep(60000)
_IEQuit($oIE)

error: pathspec 'tests/examplefiles/autoit_submit.au3' did not match any file(s) known to git


Create RandomName.au3

Create RandomName.au3

#include <Misc.au3>
#include <Array.au3>
#include <String.au3>
Local $names[1]
ConsoleWrite("Nome:" & _nome() & @LF)

Local $yy = 0
While $yy < 50
	Local $temp = _nome()
	ConsoleWrite("[" & $yy & "][" & StringInStr("y", $temp) & "]" & $temp & @LF)
	_ArrayAdd($names, $temp)
	$yy += 1
WEnd
_ArrayDisplay($names)

; #FUNCTION# ====================================================================================================================
; Name...........: _nome
; Description ...: Retorna uma string contendo um nome construído com sílabas aleatórias
;                  Return a string with a name build with random syllable
; Syntax.........: _nome()
; Parameters ....:
; Return values .: string name
; Author ........: Luigi (Luismar Chechelaky)
; Modified.......:
; Remarks .......:
; Link ..........:
; Example .......: Yes
; AutoIt version.: 3.3.12.0
; ===============================================================================================================================
Func _nome()
	;	require
	;	#include <Misc.au3>
	;	#include <String.au3>
	Local $aVogais = StringSplit("aeiouy", "")
	Local $aConsoantes = StringSplit("bcdfghjklmnpqrstvwx", "")
	Local $aDigrafos = StringSplit("ch,lh,nh,ph,ç,ss,rr,wh,st,lk,nk,br,kn,bl,cl", ",")
	Local $aFinal = StringSplit("bcdfghklmprstvwx", "")
	;ConsoleWrite(">" & $aConsoantes[0] & @LF)
	Local $sNome = "", $sSobreNome = ""
	$sNome = (Random(0, 1, 1) ? $aVogais[Random(1, 6, 1)] : "")

	For $x = 0 To Random(1, 2, 1)
		If $x Then
			$sNome &= $aConsoantes[Random(1, 19, 1)] & $aVogais[Random(1, 6, 1)]
		Else
			If $sNome Then
				$sNome &= (Random(0, 1, 1) ? $aConsoantes[Random(1, $aConsoantes[0] - 1, 1)] : $aDigrafos[Random(1, $aDigrafos[0], 1)]) & $aVogais[Random(1, 6, 1)]
			Else
				$sNome &= $aConsoantes[Random(1, $aConsoantes[0] - 1, 1)] & $aVogais[Random(1, 6, 1)]
			EndIf
		EndIf
	Next
	$sNome = $sNome & (Random(0, 1, 1) ? $aFinal[Random(1, $aFinal[0], 1)] : "")
	$sSobreNome = (Random(0, 1, 1) ? $aVogais[Random(1, 5, 1)] : "")
	For $xx = 0 To Random(1, 4, 1)
		If $xx Then
			$sSobreNome &= $aConsoantes[Random(1, 19, 1)] & $aVogais[Random(1, 5, 1)]
		Else
			If $sSobreNome Then
				$sSobreNome &= (Random(0, 1, 1) ? $aConsoantes[Random(1, $aConsoantes[0] - 1, 1)] : $aDigrafos[Random(1, $aDigrafos[0], 1)]) & $aVogais[Random(1, 5, 1)]
			Else
				$sSobreNome &= $aConsoantes[Random(1, $aConsoantes[0] - 1, 1)] & $aVogais[Random(1, 5, 1)]
			EndIf
		EndIf
	Next
	$sSobreNome = $sSobreNome & (Random(0, 1, 1) ? $aFinal[Random(1, $aFinal[0], 1)] : "")
	Return _StringProper($sNome) & (Random(0, 1, 1) ? (Random(0, 1, 1) ? " de " : " do ") : " ") & _StringProper($sSobreNome)
EndFunc   ;==>_nome

error: pathspec 'Diversos/RandomName.au3' did not match any file(s) known to git


telegram function _deleteMsg

telegram function _deleteMsg

error: pathspec 'udf/Telegram' did not match any file(s) known to git
error: pathspec 'UDF.au3' did not match any file(s) known to git


Added a usage example for AutoIt

Added a usage example for AutoIt

; AutoIt script example
; https://www.autoitscript.com
;

; Launch the browser and open an URL
Local $driver = ObjCreate("Selenium.FirefoxDriver")
$driver.Get("https://en.wikipedia.org/wiki/Main_Page")

; List all links, remove duplicates and sort them
Local $links = $driver.FindElementsByCss("a").Attribute("href")
$links.Distinct
$links.Sort

; Launch Excel and create a Workbook
Local $excel = ObjCreate("Excel.Application")
$excel.WorkBooks.Add 	; Add a new workbook
$excel.Visible = 1 		; Let Excel show itself

; Write the links in Excel and quit
$links.ToExcel($excel.ActiveWorkBook.ActiveSheet, "Links")
$driver.Quit

error: pathspec 'Examples/AutoIt/ListLinksToExcel.au3' did not match any file(s) known to git


Fixed bug that installation was not possible to path containing spaces.

;;  Copyright 2008-2009 Nokia Siemens Networks Oyj
;;
;;  Licensed under the Apache License, Version 2.0 (the "License");
;;  you may not use this file except in compliance with the License.
;;  You may obtain a copy of the License at
;;
;;      http://www.apache.org/licenses/LICENSE-2.0
;;
;;  Unless required by applicable law or agreed to in writing, software
;;  distributed under the License is distributed on an "AS IS" BASIS,
;;  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;;  See the License for the specific language governing permissions and
;;  limitations under the License.

;; Robot Framework One Click Installer for Windows
;;
;; This installer installs Robot Framework and its preconditions Python and
;; Jython (optional). If installer is executed without arguments, it opens a
;; dialog explaining the options and asking the user to enter the installation
;; directory. If a command line options is given, it must be a path to an
;; existing directory and it is used as installation directory.
;;
;; For more information about this script see $USAGE below. To learn more
;; about silent Python installation, see url [1]. Silent Jython installation
;; options can be seen with command [2].
;;
;; [1] http://www.python.org/download/releases/2.5/msi/#automated
;; [2] java -jar jython_installer-2.2.x.jar --help

;;
;; Config
;;

; Expected patterns for installer names and target directory names.
$PYTHON_DIR_NAME = "Python"
$JYTHON_DIR_NAME = "Jython"
$PYTHON_PATTERN = "python-2.*.msi"
$ROBOT_PATTERN = "robotframework-2.*.exe"
$JYTHON_PATTERN = "jython_installer-2.*.jar"

$USAGE = "One Click Installer installs Robot Framework and its " & _
         "preconditions Python and Jython (optional)." & @CRLF & @CRLF & _
         "Please specify the directory where you want software to be " & _
         "installed. Also make sure that you have required Robot Framework " & _
         "and Python installers, and optionally Jython installer, in the " & _
         "same directory as this installer." & @CRLF & @CRLF & _
         "For more information see http://robotframework.org/."

;;
;; Main
;;

$base_dir = GetBaseDirectory()
$python_installer = GetRequiredInstaller($PYTHON_PATTERN, "Python")
$robot_installer = GetRequiredInstaller($ROBOT_PATTERN, "Robot Framework")
$jython_installer = GetOptionalInstaller($JYTHON_PATTERN)
$python_dir = GetPythonDir($base_dir & $PYTHON_DIR_NAME)
$jython_dir = GetJythonDir($base_dir & $JYTHON_DIR_NAME, $jython_installer)
InstallPython($python_installer, $python_dir)
InstallJython($jython_installer, $jython_dir)
SetPath($python_dir, $jython_dir)  ; This must be done before InstallRobot to always have msvcrt71.dll in PATH
InstallRobot($robot_installer)
Exit

;;
;; Functions
;;

Func GetBaseDirectory()
    If $CmdLine[0] == 0 Then
        $base = InputBox("Robot Framework One Click Installer", $USAGE, "C:\", "", 400, 250)
    ElseIf $CmdLine[0] == 1 Then
        $base = $CmdLine[1]
    Else
        Cancel("Usage: " & @ScriptName & " [basedir]")
    EndIf
    If $base == "" Then
        Cancel("Installation cancelled by user.")
    ElseIf FileExists($base) == 0 Then
        Cancel("Given directory doesn't exist.")
    ElseIf StringRight($base, 1) <> "\" Then
        $base = $base & "\"
    EndIf
    Return $base
EndFunc

Func Cancel($msg)
    MsgBox(0, "Installation Cancelled", $msg)
    Exit
EndFunc

Func GetRequiredInstaller($pattern, $name)
    $installer = GetOptionalInstaller($pattern)
    If $installer == "" Then
        Cancel("Could not find " & $name & " installer with pattern '" & $pattern & "'")
    Endif
    return $installer
EndFunc

Func GetOptionalInstaller($pattern)
    $found = FileFindFirstFile($pattern)
    If $found == -1 Then
        $installer = ""
    Else
        $installer = FileFindNextFile($found)
    EndIf
    FileClose($found)
    return $installer
EndFunc

Func GetPythonDir($dir)
    VerifyInstallationDir($dir, "Python")
    return $dir
EndFunc

Func GetJythonDir($dir, $installer)
    If $installer == "" Then
        return ""
    EndIf
    VerifyInstallationDir($dir, "Jython")
    return $dir
EndFunc

Func VerifyInstallationDir($dir, $name)
    If FileExists($dir) == 1 Then
        Cancel($name & " installation directory '" & $dir & "' already exists.")
    EndIf
EndFunc

Func InstallPython($installer, $dir)
    $cmd = "msiexec /i " & $installer & " TARGETDIR=""" & $dir & """ /qb!"
    RunWait($cmd)
EndFunc

Func InstallJython($installer, $dir)
    If $installer == "" Then
        return
    EndIf
    $cmd = "java -jar " & $installer & " -s -d """ & $dir & """"
    RunWait($cmd)
EndFunc

Func InstallRobot($installer)
    Run($installer)
    WaitSetupWindowAndClickEnter("This Wizard will install")
    WaitSetupWindowAndClickEnter("Select python installation")
    WaitSetupWindowAndClickEnter("Ready to install")
    WaitSetupWindowAndClickEnter("Postinstall script finished")
EndFunc

Func WaitSetupWindowAndClickEnter($exp_text)
    WinWaitActive("Setup", $exp_text)
    Send("{ENTER}")
EndFunc

Func SetPath($python, $jython)
    $update = $python & ";" & $python & "\Scripts;" & $jython
    $orig = RegRead("HKCU\Environment", "PATH")

    If $orig == "" Then
        $new = $update
    ElseIf StringRight($orig, 1) == ";" Then
        $new = $orig & $update
    Else
        $new = $orig & ";" & $update
    EndIf

    RegWrite("HKCU\Environment", "PATH", "REG_EXPAND_SZ", $new)
    EnvUpdate()
EndFunc

;;  Copyright 2008-2009 Nokia Siemens Networks Oyj
;;
;;  Licensed under the Apache License, Version 2.0 (the "License");
;;  you may not use this file except in compliance with the License.
;;  You may obtain a copy of the License at
;;
;;      http://www.apache.org/licenses/LICENSE-2.0
;;
;;  Unless required by applicable law or agreed to in writing, software
;;  distributed under the License is distributed on an "AS IS" BASIS,
;;  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;;  See the License for the specific language governing permissions and
;;  limitations under the License.

;; Robot Framework One Click Installer for Windows
;;
;; This installer installs Robot Framework and its preconditions Python and
;; Jython (optional). If installer is executed without arguments, it opens a
;; dialog explaining the options and asking the user to enter the installation
;; directory. If a command line options is given, it must be a path to an
;; existing directory and it is used as installation directory.
;;
;; For more information about this script see $USAGE below. To learn more
;; about silent Python installation, see url [1]. Silent Jython installation
;; options can be seen with command [2].
;;
;; [1] http://www.python.org/download/releases/2.5/msi/#automated
;; [2] java -jar jython_installer-2.2.x.jar --help

;;
;; Config
;;

; Expected patterns for installer names and target directory names.
$PYTHON_DIR_NAME = "Python"
$JYTHON_DIR_NAME = "Jython"
$PYTHON_PATTERN = "python-2.*.msi"
$ROBOT_PATTERN = "robotframework-2.*.exe"
$JYTHON_PATTERN = "jython_installer-2.*.jar"

$USAGE = "One Click Installer installs Robot Framework and its " & _
         "preconditions Python and Jython (optional)." & @CRLF & @CRLF & _
         "Please specify the directory where you want software to be " & _
         "installed. Also make sure that you have required Robot Framework " & _
         "and Python installers, and optionally Jython installer, in the " & _
         "same directory as this installer." & @CRLF & @CRLF & _
         "For more information see http://robotframework.org/."

;;
;; Main
;;

$base_dir = GetBaseDirectory()
$python_installer = GetRequiredInstaller($PYTHON_PATTERN, "Python")
$robot_installer = GetRequiredInstaller($ROBOT_PATTERN, "Robot Framework")
$jython_installer = GetOptionalInstaller($JYTHON_PATTERN)
$python_dir = GetPythonDir($base_dir & $PYTHON_DIR_NAME)
$jython_dir = GetJythonDir($base_dir & $JYTHON_DIR_NAME, $jython_installer)
InstallPython($python_installer, $python_dir)
InstallJython($jython_installer, $jython_dir)
SetPath($python_dir, $jython_dir)  ; This must be done before InstallRobot to always have msvcrt71.dll in PATH
InstallRobot($robot_installer)
Exit

;;
;; Functions
;;

Func GetBaseDirectory()
    If $CmdLine[0] == 0 Then
        $base = InputBox("Robot Framework One Click Installer", $USAGE, "C:\", "", 400, 250)
    ElseIf $CmdLine[0] == 1 Then
        $base = $CmdLine[1]
    Else
        Cancel("Usage: " & @ScriptName & " [basedir]")
    EndIf
    If $base == "" Then
        Cancel("Installation cancelled by user.")
    ElseIf FileExists($base) == 0 Then
        Cancel("Given directory doesn't exist.")
    ElseIf StringRight($base, 1) <> "\" Then
        $base = $base & "\"
    EndIf
    Return $base
EndFunc

Func Cancel($msg)
    MsgBox(0, "Installation Cancelled", $msg)
    Exit
EndFunc

Func GetRequiredInstaller($pattern, $name)
    $installer = GetOptionalInstaller($pattern)
    If $installer == "" Then
        Cancel("Could not find " & $name & " installer with pattern '" & $pattern & "'")
    Endif
    return $installer
EndFunc

Func GetOptionalInstaller($pattern)
    $found = FileFindFirstFile($pattern)
    If $found == -1 Then
        $installer = ""
    Else
        $installer = FileFindNextFile($found)
    EndIf
    FileClose($found)
    return $installer
EndFunc

Func GetPythonDir($dir)
    VerifyInstallationDir($dir, "Python")
    return $dir
EndFunc

Func GetJythonDir($dir, $installer)
    If $installer == "" Then
        return ""
    EndIf
    VerifyInstallationDir($dir, "Jython")
    return $dir
EndFunc

Func VerifyInstallationDir($dir, $name)
    If FileExists($dir) == 1 Then
        Cancel($name & " installation directory '" & $dir & "' already exists.")
    EndIf
EndFunc

Func InstallPython($installer, $dir)
    $cmd = "msiexec /i " & $installer & " TARGETDIR=" & $dir & " /qb!"
    RunWait($cmd)
EndFunc

Func InstallJython($installer, $dir)
    If $installer == "" Then
        return
    EndIf
    $cmd = "java -jar " & $installer & " -s -d " & $dir
    RunWait($cmd)
EndFunc

Func InstallRobot($installer)
    Run($installer)
    WaitSetupWindowAndClickEnter("This Wizard will install")
    WaitSetupWindowAndClickEnter("Select python installation")
    WaitSetupWindowAndClickEnter("Ready to install")
    WaitSetupWindowAndClickEnter("Postinstall script finished")
EndFunc

Func WaitSetupWindowAndClickEnter($exp_text)
    WinWaitActive("Setup", $exp_text)
    Send("{ENTER}")
EndFunc

Func SetPath($python, $jython)
    $update = $python & ";" & $python & "\Scripts;" & $jython
    $orig = RegRead("HKCU\Environment", "PATH")

    If $orig == "" Then
        $new = $update
    ElseIf StringRight($orig, 1) == ";" Then
        $new = $orig & $update
    Else
        $new = $orig & ";" & $update
    EndIf

    RegWrite("HKCU\Environment", "PATH", "REG_EXPAND_SZ", $new)
    EnvUpdate()
EndFunc


Create replace.au3

Create replace.au3

#include <Array.au3>
#include <File.au3>

; path do diretório
Global $sFolder = "C:\Dropbox\"

; monta um array com todos os arquivos '.au3' recursivamente do diretório $sFolder
Global $aFiles = _FileListToArrayRec($sFolder, "*.au3", 1, 1, 0, 2)

For $ii = 1 To $aFiles[0]
	; imprime o diretÃ³rio no console
	ConsoleWrite($aFiles[$ii] & @LF)
	; abre o arquivo $aFile[$ii], verifica se existe "$ghGDIPDll" e troca por "$__g_hGDIPDll"
	_ReplaceStringInFile($aFiles[$ii], "$ghGDIPDll", "$__g_hGDIPDll")
Next

error: pathspec 'ScriptsUteis/Replace/replace.au3' did not match any file(s) known to git


Create _ArrayAdd2D.au3

Create _ArrayAdd2D.au3

#include-once
#include <Array.au3>

;	Criando o array
;Global $aTeste[1][3] = [[0]]

;	Adicionando elementos
;_ArrayAdd2D($aTeste, "a", "b", "c")
;_ArrayAdd2D($aTeste, 1, 2, 3)

;	Visualizando
;_ArrayDisplay($aTeste)

; #FUNCTION# ====================================================================================================================
; Name...........: _ArrayAdd2D
; Description ...: Add 'n' elements in $aInput
; Syntax.........: _ArrayAdd2D($aArray, "a", 20)
; Parameters ....: $aInput	ByRef input array
;				   $mOptNN	colums to add in array
; Return values .:
; Author ........: Luismar Chechelaky
; Modified.......: 2015/09/08
; Remarks .......:
; Related .......:
; Link ..........:
; ===============================================================================================================================

Func _ArrayAdd2D(ByRef $aInput, $mOpt1 = Default, $mOpt2 = Default, $mOpt3 = Default, $mOpt4 = Default, $mOpt5 = Default, $mOpt6 = Default, $mOpt7 = Default, $mOpt8 = Default, $mOpt9 = Default, $mOpt10 = Default)
	Local $id = UBound($aInput, 1)
	ReDim $aInput[$id + 1][UBound($aInput, 2)]
	$aInput[0][0] = $id

	#Region AutoIt 3.3.10.0 e superior
	Local $iCol = @NumParams < UBound($aInput, 2) ? @NumParams : UBound($aInput, 2)
	#EndRegion AutoIt 3.3.10.0 e superior

	#Region AutoIt 3.3.8.1 e anterior
;~ 	If @NumParams < UBound($aInput, 2) Then
;~ 		Local $iCol = @NumParams
;~ 	Else
;~ 		Local $iCol = UBound($aInput, 2)
;~ 	EndIf
	#EndRegion AutoIt 3.3.8.1 e anterior
	For $ii = 1 To $iCol
		$aInput[$id][$ii - 1] = Execute("$mOpt" & $ii)
	Next
EndFunc   ;==>_ArrayAdd2D

error: pathspec '_ArrayAdd2D.au3' did not match any file(s) known to git


Create GetChampionPatchNotes.au3

Create GetChampionPatchNotes.au3

#include <IE.au3>

;
; AutoIt Version: 3.0
; Author:         Tom Paolillo
;
; Script Function:
;   Retrieve patch notes data for specific champions
;

$championName = $CmdLine[1]

FileDelete("\documents\school\mqp\raw_patch_note_files\ " & $championName & "_patch_notes_raw.txt")

$oIE = _IECreate ()

_IENavigate ($oIE, "http://leagueoflegends.wikia.com/wiki/" & $championName & "/Background")
_IELoadWait($oIE)
$pageText = _IEBodyReadText($oIE)

FileWrite("\documents\school\mqp\raw_patch_note_files\ " & $championName & "_patch_notes_raw.txt", $pageText)

_IEQuit($oIE)

error: pathspec 'GetChampionPatchNotes.au3' did not match any file(s) known to git


add: launcher.au3

add: launcher.au3

; Getting params
$param=''
For $i = 1 To $CmdLine[0]
   $param &= " " & $CmdLine[$i]
Next

; Start script
Run("bash.exe vm-connect.sh" & $param)
Local $hWnd = WinWait("[CLASS:ConsoleWindowClass]", "", 10)

; Hide console window
WinSetState($hWnd, "", @SW_HIDE)

error: pathspec 'launcher.au3' did not match any file(s) known to git


Create kymove.au3

Create kymove.au3

#include-once
#include <Array.au3>
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>

OnAutoItExitRegister("Quit")

Opt("GUIOnEventMode", 1)
Opt("GUIEventOptions", 1)
Opt("MustDeclareVars", 1)

; #SCRIPT# =====================================================================================================================
; Name ..........: kymove
; Description ...: Desenvolver o estudo de movimento de polígonos em qualquer direção com velocidade real.
;                  Isto é, a velocidade na horizontal e vertical é aproximadamente a mesma nas diagonais.
;                  Utiliza um sistema de redução de velocidade, quando em movimento em um direção, ao pressionar a tecla oposta,
;                  você tem a velocidade reduzida pela metada.
; Author ........: Luigi (Luismar Chechelaky)
; Modified ......:
; Remarks .......:
; Related .......:
; Link ..........:
; ===============================================================================================================================

Global $MAIN_TITLE = "KYMOVE"

Global Const $ROOT = Round(Sqrt(2) / 2, 3)

Global $Z_RUN[3] = [TimerInit(), TimerInit(), 0]
Global $hGui, $hGraphic, $hBitmap, $hBackbuffer
Global $hBrush
Global $hPen
Global $sTitle = $MAIN_TITLE
Global $iWidth, $iHeight
Global $iMouveOverActor
Global $25, $26, $27, $28, $hor, $ver
Global $aKey[][5] = [[0, 1], [25, 0, 0, 0], [26, 0, 0, 0, 0], [27, 0, 0, 0, 0], [28, 0, 0, 0, 0], [11, 0, 0, 0, 0], [20, 0, 0, 0, 0]]
$aKey[0][0] = UBound($aKey, 1) - 1

Global $aMouse[5] = [@DesktopHeight / 2, @DesktopWidth / 2]
Global $aMouseTry = $aMouse
Global $aMouseDif[2]
Global $oActor = SD()
Global $iActor = 0, $iOver = 0, $iOverTry = 0
Global $aGraphic[10] = [0, 0]

Global $hDLL = DllOpen("user32.dll")

Func Gui($iWid, $iHei)
	$iWidth = $iWid
	$iHeight = $iHei

	$hGui = GUICreate($sTitle, $iWidth + 2, $iHeight + 2, -1, -1, Default, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))
	GUISetOnEvent($GUI_EVENT_CLOSE, "_quit")

;~ $GUI_EVENT_MINIMIZE
;~ $GUI_EVENT_RESTORE
;~ $GUI_EVENT_MAXIMIZE
	GUISetOnEvent($GUI_EVENT_PRIMARYDOWN, "_Mouse_PrimaryDown", $hGui)
	GUISetOnEvent($GUI_EVENT_PRIMARYUP, "_Mouse_PrimaryUp", $hGui)
	GUISetOnEvent($GUI_EVENT_SECONDARYDOWN, "_Mouse_SecondaryDonw", $hGui)
	GUISetOnEvent($GUI_EVENT_SECONDARYUP, "_Mouse_SecondaryUp", $hGui)
	GUISetOnEvent($GUI_EVENT_MOUSEMOVE, "_Mouse_Move", $hGui)
;~ $GUI_EVENT_RESIZED
;~ $GUI_EVENT_DROPPED

	GUISetState(@SW_SHOW, $hGui)
	_GDIPlus_Startup()
	$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui)
	$hBitmap = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hGraphic)
	$hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)

	$hPen = _GDIPlus_PenCreate()

	_GDIPlus_GraphicsClear($hBackbuffer)
	_GDIPlus_GraphicsSetSmoothingMode($hBackbuffer, 2)
	While Z_RUN()
		_Update()
	WEnd
EndFunc   ;==>Gui

Func AddBox($iXX, $iYY, $iWid = 32, $iHei = 32, $sName = False, $iSpeed = 2)
	Local $iID = $oActor.Count + 1
	Local $oo = SD()
	$oo.Add("x", $iXX)
	$oo.Add("y", $iYY)
	$oo.Add("w", $iWid)
	$oo.Add("h", $iHei)
	$sName = $sName ? $sName : "name" & $oActor.Count + 1
	$oo.Add("name", $sName)
	$oo.Add("ss", $iSpeed)
	$oo.Add("s", $iSpeed * $ROOT)
	Local $aPoly[5][2] = [ _
			[4], _
			[$iXX, $iYY], _
			[$iXX + $iWid - 1, $iYY], _
			[$iXX + $iWid - 1, $iYY + $iHei - 1], _
			[$iXX, $iYY + $iHei - 1] _
			]
	$oo.Add("poly", $aPoly)
	$oActor.Add($iID, $oo)
EndFunc   ;==>AddBox

Func _Quit()
	Exit
EndFunc   ;==>_Quit

Func _Update()
	_GDIPlus_GraphicsClear($hBackbuffer, 0xF0FFFFFF)
	$iOver = 0
	For $each In $oActor
		$iOverTry = isPointInPath($aMouse[0], $aMouse[1], $each)
		If Not $iOver And $iOverTry Then
			$iOver = $iOverTry
			ExitLoop
		EndIf
	Next
	_MoveActor()
	For $each In $oActor
		_DrawActor($each, $iOver, $iActor)
	Next
	_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 1, 1, $iWidth, $iHeight)
EndFunc   ;==>_Update

Func _DrawActor($each, $iOver, $iActor)
	Local $iColor
	If $iOver = $each Then
		If $iActor = $each Then
			$iColor = $aMouseTry[2] ? 0xFFCCFFCC : 0xFF00FF00

		Else
			$iColor = 0xFF339966
		EndIf
	Else
		$iColor = $iActor = $each ? 0xFF00FF00 : 0xFF000000
	EndIf
	_box($hBackbuffer, _
			$oActor.Item($each).Item("x"), _
			$oActor.Item($each).Item("y"), _
			$oActor.Item($each).Item("w"), _
			$oActor.Item($each).Item("h"), _
			$iColor _
			)
;~ 	_GDIPlus_GraphicsDrawPolygon($hBackbuffer, $oActor.Item($each).Item("poly"))
EndFunc   ;==>_DrawActor

Func Quit()
	DllClose($hDLL)
	_GDIPlus_GraphicsDispose($hBackbuffer)
	_GDIPlus_BitmapDispose($hBitmap)
	_GDIPlus_GraphicsDispose($hGraphic)
	_GDIPlus_Shutdown()
	GUIDelete($hGui)
	Exit
EndFunc   ;==>Quit

Func _box($hToGraphic, $iXX, $iYY, $iWW, $iHH, $iColor = 0, $bFill = False)
	; _box3
	If $iWW = 1 And $iHH = 1 Then
		If $iColor Then
			_GDIPlus_BrushSetSolidColor($hBrush, $iColor)
			_GDIPlus_GraphicsFillRect($hBackbuffer, $iXX, $iYY, $iWW, $iHH, $hBrush)
		Else
			_GDIPlus_GraphicsFillRect($hBackbuffer, $iXX, $iYY, $iWW, $iHH)
		EndIf
	Else
		Local $aBox[5][2]
		$aBox[0][0] = 4
		$aBox[1][0] = $iXX
		$aBox[1][1] = $iYY
		$aBox[2][0] = $iXX + $iWW - 1
		$aBox[2][1] = $iYY
		$aBox[3][0] = $iXX + $iWW - 1
		$aBox[3][1] = $iYY + $iHH - 1
		$aBox[4][0] = $iXX
		$aBox[4][1] = $iYY + $iHH - 1
		If $iColor Then
			_GDIPlus_PenSetColor($hPen, $iColor)
			_GDIPlus_GraphicsDrawPolygon($hToGraphic, $aBox, $hPen)
		Else
			_GDIPlus_GraphicsDrawPolygon($hToGraphic, $aBox)
		EndIf
		If $bFill Then
			_GDIPlus_BrushSetSolidColor($hBrush, $iColor)
			_GDIPlus_GraphicsFillRect($hBackbuffer, $iXX, $iYY, $iWW, $iHH, $hBrush)
		EndIf
	EndIf
EndFunc   ;==>_box

Func Z_RUN()
	Do
	Until TimerDiff($Z_RUN[0]) > 16
	$Z_RUN[0] = TimerInit()
	$Z_RUN[2] += 1
	If TimerDiff($Z_RUN[1]) > 999 Then
		WinSetTitle($hGui, "", $MAIN_TITLE & " FPS[" & $Z_RUN[2] & "]")
		$Z_RUN[1] = TimerInit()
		$Z_RUN[2] = 0
	EndIf
	Return True
EndFunc   ;==>Z_RUN

Func SD()
	Return ObjCreate("Scripting.Dictionary")
EndFunc   ;==>SD

Func isPointInPath($xx, $yy, $each)
	Local $aPoly = $oActor.Item($each).Item("poly")
;~ 	https://en.wikipedia.org/wiki/Even%E2%80%93odd_rule
	Local $iNum = UBound($aPoly, 1) - 1
	Local $jj = $iNum
	Local $cc = 0
	For $ii = 1 To $iNum
		If (($aPoly[$ii][1] > $yy) <> ($aPoly[$jj][1] > $yy)) And ($xx < ($aPoly[$jj][0] - $aPoly[$ii][0]) * ($yy - $aPoly[$ii][1]) / ($aPoly[$jj][1] - $aPoly[$ii][1]) + $aPoly[$ii][0]) Then
			$cc = Not $cc
		EndIf
		$jj = $ii
	Next
	Return $cc ? $each : 0
EndFunc   ;==>isPointInPath

Func _Mouse_PrimaryDown()
	$iActor = $iOver
	$aMouseTry[2] = 1
EndFunc   ;==>_Mouse_PrimaryDown

Func _Mouse_PrimaryUp()
	$aMouseTry[2] = 0
EndFunc   ;==>_Mouse_PrimaryUp

Func _Mouse_SecondaryDonw()
EndFunc   ;==>_Mouse_SecondaryDonw

Func _Mouse_SecondaryUp()
EndFunc   ;==>_Mouse_SecondaryUp

Func _Mouse_Move()
	$aMouseTry = GUIGetCursorInfo($hGui)
	If IsArray($aMouseTry) Then
		$aMouse[0] = $aMouseTry[0]
		$aMouse[1] = $aMouseTry[1]
		$aMouse[2] = $aMouseTry[2]
		$aMouse[3] = $aMouseTry[3]
	EndIf
EndFunc   ;==>_Mouse_Move

Func _MoveActor()
	; movimento com freio

	If Not $iActor Then Return

	$25 = _IsPressed($aKey[1][0], $hDLL)
	$26 = _IsPressed($aKey[2][0], $hDLL)
	$27 = _IsPressed($aKey[3][0], $hDLL)
	$28 = _IsPressed($aKey[4][0], $hDLL)

	; sentido
	Switch $hor
		Case -1, -0.5
			If $25 Then
				$hor = $27 ? -0.5 : -1
			Else
				If $27 Then
					$hor = 1
				Else
					$hor = 0
					$oActor.Item($iActor).Item("x") = Int($oActor.Item($iActor).Item("x"))
				EndIf
			EndIf
		Case 1, 0.5
			If $27 Then
				$hor = $25 ? 0.5 : 1
			Else
				If $25 Then
					$hor = -1
				Else
					$hor = 0
					$oActor.Item($iActor).Item("x") = Int($oActor.Item($iActor).Item("x"))
				EndIf
			EndIf
		Case Else
			If $25 Then
				If $27 Then
					$hor = 0
					$oActor.Item($iActor).Item("x") = Int($oActor.Item($iActor).Item("x"))
				Else
					$hor = -1
				EndIf
			Else
				If $27 Then
					$hor = -1
				Else
					$hor = 0
					$oActor.Item($iActor).Item("x") = Int($oActor.Item($iActor).Item("x"))
				EndIf
			EndIf
	EndSwitch

	Switch $ver
		Case -1, -0.5
			If $26 Then
				$ver = $28 ? -0.5 : -1
			Else
				If $28 Then
					$ver = 1
				Else
					$ver = 0
					$oActor.Item($iActor).Item("y") = Int($oActor.Item($iActor).Item("y"))
				EndIf
			EndIf
		Case 1, 0.5
			If $28 Then
				$ver = $26 ? 0.5 : 1
			Else
				If $26 Then
					$ver = -1
				Else
					$ver = 0
					$oActor.Item($iActor).Item("y") = Int($oActor.Item($iActor).Item("y"))
				EndIf
			EndIf
		Case Else
			If $26 Then
				If $28 Then
					$ver = 0
					$oActor.Item($iActor).Item("y") = Int($oActor.Item($iActor).Item("y"))
				Else
					$ver = -1
				EndIf
			Else
				If $28 Then
					$ver = -1
				Else
					$ver = 0
					$oActor.Item($iActor).Item("y") = Int($oActor.Item($iActor).Item("y"))
				EndIf
			EndIf
	EndSwitch

	; movimento combinado $hor e $ver
	If $hor Then
		If $ver Then
			$oActor.Item($iActor).Item("x") += $hor * $oActor.Item($iActor).Item("s")
			$oActor.Item($iActor).Item("y") += $ver * $oActor.Item($iActor).Item("s")
		Else
			$oActor.Item($iActor).Item("x") += $hor * $oActor.Item($iActor).Item("ss")
		EndIf
	Else
		$oActor.Item($iActor).Item("y") += $ver * $oActor.Item($iActor).Item("ss")
	EndIf
	_ActorSetPoly()
EndFunc   ;==>_MoveActor

Func _ActorSetPoly()
	Local $iXX = Int($oActor.Item($iActor).Item("x"))
	Local $iYY = $oActor.Item($iActor).Item("y")
	Local $iWid = $oActor.Item($iActor).Item("w")
	Local $iHei = $oActor.Item($iActor).Item("h")
	Local $aPoly = $oActor.Item($iActor).Item("poly")

	$aPoly[1][0] = $iXX
	$aPoly[1][1] = $iYY
	$aPoly[2][0] = $iXX + $iWid - 1
	$aPoly[2][1] = $iYY
	$aPoly[3][0] = $iXX + $iWid - 1
	$aPoly[3][1] = $iYY + $iHei - 1
	$aPoly[4][0] = $iXX
	$aPoly[4][1] = $iYY + $iHei - 1

	$oActor.Item($iActor).Item("poly") = $aPoly
EndFunc   ;==>_ActorSetPoly

error: pathspec 'kymove/kymove.au3' did not match any file(s) known to git