Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/08/2016 in all areas

  1. wakillon

    Shape2Polygon

    Create simple forms from polygon is easy but its more difficult with complex forms, so... Shape2Polygon permit to get Polygon array Coordinates from a Black and White Shape for be used with _GDIPlus_GraphicsDrawPolygon. Source, compiled Version and Shape Samples are available in the download section. Hope it can help ! If you get an error while scanning, post the shape and i will try to update the script.
    3 points
  2. Version 1.6.3.0

    17,022 downloads

    Extensive library to control and manipulate Microsoft Active Directory. Threads: Development - General Help & Support - Example Scripts - Wiki Previous downloads: 30467 Known Bugs: (last changed: 2020-10-05) None Things to come: (last changed: 2020-07-21) None BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort
    1 point
  3. willichan

    HyCam2

    Version 1.3

    614 downloads

    Automation for HyCam2 screen recording utility.
    1 point
  4. Moriba

    Android UDF

    Hello, I created this UDF last year for my Orient Myanmar Language System. This UDF can control any Android devices. So used it wisely. ; #CURRENT# ===================================================================================================================== ; _Android_Call ; _Android_CommandExists ; _Android_Connect ; _Android_Dial ; _Android_FileExists ; _Android_Flash ; _Android_ForceStopPackage ; _Android_GetBatteryHealth ; _Android_GetBatteryLevel ; _Android_GetBatteryPlugType ; _Android_GetBatteryStatus ; _Android_GetBatteryTechnology ; _Android_GetBatteryTemperature ; _Android_GetBatteryVoltage ; _Android_GetDeviceID ; _Android_GetExternalStorageDirectory ; _Android_GetLegacyExternalStorageDirectory ; _Android_GetNetworkClass ; _Android_GetNetworkCountryISO ; _Android_GetNetworkOperator ; _Android_GetNetworkOperatorName ; _Android_GetNetworkType ; _Android_GetNetworkTypeName ; _Android_GetPackageInfo ; _Android_GetPhoneType ; _Android_GetProperty ; _Android_GetSerialNumber ; _Android_GetSIMCountryISO ; _Android_GetSIMOperator ; _Android_GetSIMOperatorName ; _Android_GetSIMState ; _Android_GetState ; _Android_HasBusyBox ; _Android_HasRootAccess ; _Android_Install ; _Android_IsAirplaneModeOn ; _Android_IsBatteryCharged ; _Android_IsBatteryLow ; _Android_IsBatteryPresent ; _Android_IsBootloader ; _Android_IsNetworkRoaming ; _Android_IsOffline ; _Android_IsOnline ; _Android_IsScreenOn ; _Android_Pull ; _Android_Push ; _Android_Reboot ; _Android_Remount ; _Android_Send ; _Android_SendSMS ; _Android_Shell ; _Android_StartActivity ; _Android_TakeSnapshot ; _Android_Uninstall ; _Android_WaitForDevice ; _Android_Wake ; _Android_WipeDataCache ; =============================================================================================================================== Download Android UDF (11.22.2014) Download ADB, Fastboot & AAPT Here I will accept whatever your suggestion. Can improve my UDF. I love AutoIt. It's so easy and powerful.
    1 point
  5. Hello Dent, You already have all the tools that you need to do that and you have done similar stuff in your script. Try to get the input ID (if this is similar to the others, it will oly have the name property). Study and understand the "_IEGetObjByName" function, after that ask youself what do you want to do with that element? Select (similar to click)? Can you click with _IEAction($OBJ, "click") ? Please pay special attention to the third parameter of the "_IEGetObjByName" function, here you can grab the correct input element if the name occurs more than one time. I know that you will be able to do this task. Let me know when you accomplish.
    1 point
  6. MichaelHB

    Excel_RangeFind

    Try this modified _Excel_RangeFind function. Func __Excel_RangeFind($oWorkbook, $sSearch, $vRange = Default, $iLookIn = Default, $iLookAt = Default, $bMatchcase = Default) If Not IsObj($oWorkbook) Or ObjName($oWorkbook, 1) <> "_Workbook" Then Return SetError(1, 0, 0) If StringStripWS($sSearch, 3) = "" Then Return SetError(2, 0, 0) If $iLookIn = Default Then $iLookIn = $xlValues If $iLookAt = Default Then $iLookAt = $xlPart If $bMatchcase = Default Then $bMatchcase = False Local $oMatch, $sFirst = "", $bSearchWorkbook = False, $oSheet If $vRange = Default Then $bSearchWorkbook = True $oSheet = $oWorkbook.Sheets(1) $vRange = $oSheet.UsedRange ElseIf IsString($vRange) Then $vRange = $oWorkbook.Activesheet.Range($vRange) If @error Then Return SetError(3, @error, 0) EndIf Local $aResult[100][4], $iIndex = 0, $iIndexSheets = 1, $iNumberOfSheets = $oWorkbook.Worksheets.Count While 1 $oMatch = $vRange.Find($sSearch, Default, $iLookIn, $iLookAt, Default, Default, $bMatchcase) If @error Then Return SetError(4, @error, 0) If IsObj($oMatch) Then $sFirst = $oMatch.Address While 1 $aResult[$iIndex][0] = $oMatch.Worksheet.Name $aResult[$iIndex][1] = $oMatch.Address $aResult[$iIndex][2] = $oMatch.Value $aResult[$iIndex][3] = $oMatch.Formula $iIndex = $iIndex + 1 If Mod($iIndex, 100) = 0 Then ReDim $aResult[UBound($aResult, 1) + 100][4] $oMatch = $vRange.Findnext($oMatch) If Not IsObj($oMatch) Or $sFirst = $oMatch.Address Then ExitLoop WEnd EndIf If Not $bSearchWorkbook Then ExitLoop $iIndexSheets = $iIndexSheets + 1 If $iIndexSheets > $iNumberOfSheets Then ExitLoop $sFirst = "" $oSheet = $oWorkbook.Sheets($iIndexSheets) If @error Then ExitLoop $vRange = $oSheet.UsedRange WEnd ReDim $aResult[$iIndex][4] Return $aResult EndFunc
    1 point
  7. @zxc3 you could not have provided less information if you'd been trying. You have been here long enough to know you need to provide us with a detailed description of what you're trying to accomplish, along with your code (working or not), rather than asking us to first guess at what you're trying to do and then solve it for you.
    1 point
  8. Hello, I have found a "bug" in array.au3 in the function _ArrayBinarySearch(). Summary: Not possible to get the correct index of an element when use "ß", they found always "ss". Here a little Test-Script: #include <Array.au3> Local $Array[6] = ["a_ausser", "a_außer", "b_ausser", "b_außer", "c_ausser", "c_außer"] _ArraySort($Array, 0, 0) For $i=0 to UBound($Array)-1 ConsoleWrite("Index " & $i & ": " & $Array[$i] & @CRLF) Next ;BinarySearch ConsoleWrite("BinarySearchIndex: " & _ArrayBinarySearch($Array, "b_außer", 0) & " <-- must be Index 3 - b_außer" & @CRLF) ConsoleWrite("BinarySearchIndex: " & _ArrayBinarySearch($Array, "b_ausser", 0) & " <-- must be Index 2 - b_ausser" & @CRLF) Output: --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop Index 0: a_ausser Index 1: a_außer Index 2: b_ausser Index 3: b_außer Index 4: c_ausser Index 5: c_außer BinarySearchIndex: 2 <-- must be Index 3 - b_außer BinarySearchIndex: 2 <-- must be Index 2 - b_ausser +>09:35:08 AutoIt3.exe ended.rc:0 Here is the wrong item with Index 2 found, but I search for item 3 now HERE my little bugfix in __ArrayBinarySearch(): #include <Array.au3> Local $Array[6] = ["a_ausser", "a_außer", "b_ausser", "b_außer", "c_ausser", "c_außer"] _ArraySort($Array, 0, 0) For $i=0 to UBound($Array)-1 ConsoleWrite("Index " & $i & ": " & $Array[$i] & @CRLF) Next ;BinarySearch ConsoleWrite("BinarySearchIndex: " & __ArrayBinarySearch($Array, "b_außer", 0) & " <-- must be Index 3 - b_außer" & @CRLF) ConsoleWrite("BinarySearchIndex: " & __ArrayBinarySearch($Array, "b_ausser", 0) & " <-- must be Index 2 - b_ausser" & @CRLF) ; #FUNCTION# ==================================================================================================================== ; Author ........: Jos ; Modified.......: Ultima - added $iEnd as parameter, code cleanup; Melba23 - added support for empty & 2D arrays ; =============================================================================================================================== Func __ArrayBinarySearch(Const ByRef $aArray, $vValue, $iStart = 0, $iEnd = 0, $iColumn = 0) If $iStart = Default Then $iStart = 0 If $iEnd = Default Then $iEnd = 0 If $iColumn = Default Then $iColumn = 0 If Not IsArray($aArray) Then Return SetError(1, 0, -1) ; Bounds checking Local $iDim_1 = UBound($aArray, $UBOUND_ROWS) If $iDim_1 = 0 Then Return SetError(6, 0, -1) If $iEnd < 1 Or $iEnd > $iDim_1 - 1 Then $iEnd = $iDim_1 - 1 If $iStart < 0 Then $iStart = 0 If $iStart > $iEnd Then Return SetError(4, 0, -1) Local $iMid = Int(($iEnd + $iStart) / 2) Switch UBound($aArray, $UBOUND_DIMENSIONS) Case 1 If $aArray[$iStart] > $vValue Or $aArray[$iEnd] < $vValue Then Return SetError(2, 0, -1) ; Search While $iStart <= $iMid And Not ($vValue == $Array[$iMid]) If $vValue < $aArray[$iMid] Then $iEnd = $iMid - 1 Else $iStart = $iMid + 1 EndIf $iMid = Int(($iEnd + $iStart) / 2) WEnd If $iStart > $iEnd Then Return SetError(3, 0, -1) ; Entry not found Case 2 Local $iDim_2 = UBound($aArray, $UBOUND_COLUMNS) - 1 If $iColumn < 0 Or $iColumn > $iDim_2 Then Return SetError(7, 0, -1) If $aArray[$iStart][$iColumn] > $vValue Or $aArray[$iEnd][$iColumn] < $vValue Then Return SetError(2, 0, -1) ; Search While $iStart <= $iMid And Not ($vValue == $aArray[$iMid][$iColumn]) If $vValue < $aArray[$iMid][$iColumn] Then $iEnd = $iMid - 1 Else $iStart = $iMid + 1 EndIf $iMid = Int(($iEnd + $iStart) / 2) WEnd If $iStart > $iEnd Then Return SetError(3, 0, -1) ; Entry not found Case Else Return SetError(5, 0, -1) EndSwitch Return $iMid EndFunc ;==>_ArrayBinarySearch Output: --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop Index 0: a_ausser Index 1: a_außer Index 2: b_ausser Index 3: b_außer Index 4: c_ausser Index 5: c_außer BinarySearchIndex: 3 <-- must be Index 3 - b_außer BinarySearchIndex: 2 <-- must be Index 2 - b_ausser +>09:37:17 AutoIt3.exe ended.rc:0 Here is the correct item with Index 3 found. Only two lines have little changes: line 25 in function: Original: While $iStart <= $iMid And $vValue <> $Array[$iMid] FIX: While $iStart <= $iMid And Not ($vValue == $Array[$iMid]) line 39 in function: Original: While $iStart <= $iMid And $vValue <> $aArray[$iMid][$iColumn]) FIX: While $iStart <= $iMid And Not ($vValue == $aArray[$iMid][$iColumn]) Please check my little bugfix and check in in the repository for the next release.
    1 point
  9. I think it's best practice of Websitedesigner to change the captcha for each session.
    1 point
  10. UEZ

    Shape2Polygon

    Great work again wakillon. A small example how to use the generated array data would be great! Example modified from the help file: #include <Array.au3> #include <GDIPlus.au3> #include <GUIConstantsEx.au3> Example() Func Example() Local $hGUI, $hGraphic, $hBrush, $hPen, $hPath, $hMatrix ; Code Generated by Shape2Polygon, Polygon Size=512x246 (reduction level=8) from C:\...\Shape2Polygon\Sample Shapes\Shape_08.png Local $aPoints = [[215,0],[1,126],[1,128],[0,135],[1,142],[2,149],[3,156],[5,163],[8,170],[11,177],[15,184],[20,191],[25,198],[32,205],[39,212],[46,218],[53,223],[60,227],[67,231],[74,234],[81,237],[88,240],[95,241],[101,240],[97,233],[94,226],[91,219],[89,212],[89,201],[92,194],[99,187],[106,184],[122,184],[129,185],[136,187],[143,189],[150,192],[157,197],[164,204],[167,203],[173,196],[180,190],[187,186],[201,186],[208,188],[215,192],[222,197],[229,204],[235,211],[240,218],[245,225],[249,232],[252,239],[256,245],[260,238],[263,231],[267,224],[271,217],[277,210],[284,203],[291,196],[298,191],[305,188],[312,185],[320,185],[327,186],[334,191],[341,198],[345,205],[349,204],[356,198],[363,193],[370,189],[377,186],[384,184],[396,184],[403,185],[410,187],[417,192],[422,199],[422,213],[420,220],[418,227],[414,234],[409,241],[410,244],[417,242],[424,240],[431,238],[438,234],[445,231],[452,227],[459,222],[466,217],[473,210],[480,203],[486,196],[492,189],[496,182],[501,175],[504,168],[507,161],[509,154],[510,147],[511,140],[510,133],[510,120],[508,113],[506,106],[503,99],[499,92],[494,85],[488,78],[481,71],[474,65],[467,59],[460,54],[453,49],[446,45],[439,41],[432,37],[425,33],[418,30],[411,26],[404,23],[397,21],[390,18],[383,16],[376,13],[370,16],[374,23],[377,30],[379,37],[379,55],[377,62],[374,69],[369,76],[362,83],[355,88],[348,91],[341,93],[333,93],[326,91],[319,88],[312,82],[305,75],[301,68],[297,61],[295,54],[292,47],[291,40],[289,33],[288,26],[287,19],[287,7],[286,0],[281,7],[277,14],[273,21],[271,28],[259,28],[252,29],[245,28],[238,21],[235,14],[231,7],[224,0],[224,17],[223,24],[223,33],[222,40],[220,47],[218,54],[216,61],[213,68],[208,75],[201,82],[194,87],[187,90],[180,92],[171,92],[164,91],[157,89],[150,85],[143,78],[138,71],[134,64],[132,57],[132,40],[134,33],[136,26],[139,19],[137,13],[130,15],[123,18],[116,20],[109,23],[102,26],[95,29],[88,32],[81,35],[74,39],[67,43],[60,47],[53,52],[46,57],[39,63],[32,70],[26,77],[20,84],[15,91],[11,98],[8,105],[5,112],[3,119],[1,126]] ; Create GUI $hGUI = GUICreate("GDI+ Example for Shape2Polygon by UEZ", _ArrayMax($aPoints) + 100, _ArrayMax($aPoints, 0, -1, -1, 1) + 100) GUISetState(@SW_SHOW) _GDIPlus_Startup() $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) ;Create a graphics object from a window handle _GDIPlus_GraphicsSetSmoothingMode($hGraphic, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;Sets the graphics object rendering quality (antialiasing) _GDIPlus_GraphicsClear($hGraphic, 0xFFFFFFFF) $hBrush = _GDIPlus_HatchBrushCreate(35, 0xFF606060, 0xFF000000) $hPen = _GDIPlus_PenCreate(0xFF202020, 3) _GDIPlus_PenSetMiterLimit($hPen, 32) _GDIPlus_PenSetDashCap($hPen, $GDIP_DASHCAPROUND) $hMatrix = _GDIPlus_MatrixCreate() $hPath = _GDIPlus_PathCreate() ;Create new path object ;~ _GDIPlus_PathAddPolygon($hPath, $aPoints) _GDIPlus_PathAddClosedCurve2($hPath, $aPoints, 7.5) ; move coordinates 50 pixels on x/y axis _GDIPlus_MatrixTranslate($hMatrix, 50, 50) _GDIPlus_PathTransform($hPath, $hMatrix) _GDIPlus_GraphicsFillPath($hGraphic, $hPath, $hBrush) ;Fill path to graphics handle (GUI) _GDIPlus_GraphicsDrawPath($hGraphic, $hPath, $hPen) ;Draw path to graphics handle (GUI) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Clean up resources _GDIPlus_PathDispose($hPath) _GDIPlus_BrushDispose($hBrush) _GDIPlus_PenDispose($hPen) _GDIPlus_MatrixDispose($hMatrix) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() EndFunc ;==>Example
    1 point
  11. option 1: when you generate the controls, put their control ID's in a 2D array: col#0 = control ID, col#1 = index number of the group they belong to. very easy to show/hide a specific group. option 2: if the controls are somewhat identical, store only the values in the said array (instead of control ID), then use GuiCtrlSetData() to update the existing controls, which you need to build only once. option 3: ListView? can you post a screenshot?
    1 point
  12. 1 point
  13. MichaelHB, you found my solution with : input type="hidden" id="pstad-loctnid" which I overlooked. The script you wrote works fine as it is. I do not get the error : error "Une erreur est survenue lors de l'affichage de votre annonce. Veuillez contact le Service à la clientèle." Thanks very much for your precious help. GerryIT
    1 point
  14. Abilio_KID

    _Singleton question

    Isn't it simpler to go around and use the builtin AutoIT functions? To check if our program (whatever the name is) is already running (the way I do it, of course): ; Check if this program is already running. If so then exit. $p = ProcessList(StringReplace(@ScriptName,".au3",".exe")) If $p[0][0] > 1 Then MsgBox(0,"Error", @ScriptName & " is already running! Exiting...", 3) Exit EndIf
    1 point
  15. Yes. I think _Singleton is confusing. It might not return or it will return with either the handle to the mutex or the error for the mutex already existing. I think this is easier. If _MutexExists("MydeswswScriptName") Then ; We know the script is already running. Let the user know. MsgBox(0, "Script Name", "This script is already running. Using multiple copies of this script at the same breaks the [(UltimaCoder)] License!") Exit EndIf Func _MutexExists($sOccurenceName) Local $ERROR_ALREADY_EXISTS = 183, $handle, $lastError $sOccurenceName = StringReplace($sOccurenceName, "\", ""); to avoid error $handle = DllCall("kernel32.dll", "int", "CreateMutex", "int", 0, "long", 1, "str", $sOccurenceName) $lastError = DllCall("kernel32.dll", "int", "GetLastError") Return $lastError[0] = $ERROR_ALREADY_EXISTS EndFunc ;==>_MutexExists
    1 point
  16. Jos

    RUN vs EDIT

    Or run SciTEConfig and select Run in stead of Edit as the default action ..
    1 point
×
×
  • Create New...