Jump to content

Search the Community

Showing results for tags 'arrays'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






  1. poker game to study, play, or whatever you want ! an old challenge of mine that I have given up #NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=poker.ico #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ColorConstants.au3> #include <Array.au3> Opt("MustDeclareVars", 1) ;0=no, 1=require pre-declaration #Region === GUI === Local $Form1
  2. Suppose I have a 1-D array with a number of values in it such as Local $aArray[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] Then I want to select one of the values that should become the new first element, with the other elements rotating into new positions while keeping the array size the same. For example, if I wanted $aArray[4] to become $aArray[0] and end up with an array that looks like this: 4 5 6 7 8 9 0 1 2 3 What would be the most efficient way to accomplish this, keeping in mind that the actual arrays I want to do this with will be much larger than this little sample one.
  3. Please help with this 3D Array the first example works the secound doesn't. Need help to understand how Arrays work. Many thanks in advance ;First Example Dim $aArray[2][2][2] $aArray[0][0][0] = 1 $aArray[0][0][1] = 2 $aArray[0][1][0] = 3 $aArray[0][1][1] = 4 $aArray[1][0][0] = 5 $aArray[1][0][1] = 6 $aArray[1][1][0] = 7 $aArray[1][1][1] = 8 For $a = 0 to 1 for $b = 0 to 1 for $c = 0 to 1 ConsoleWrite($aArray[$a][$b][$c] & @CRLF) Next Next Next ;Secound Example Local $aArraym [2][2][2]=[[[1,2,],[3,4],[5,6],[7,8]]] For $
  4. Okay I know this will be one of those - how stupid can I be when I see the answer but I'm baffled at the current time. #include <Debug.au3> Local $aArray[11][2] = [ [10,10],[1,5],[2,0],[3,0],[4,"M"],[5,0],[6,0],[7,0],[8,"M"],[9,0],[10,2] ] _DebugArrayDisplay($aArray, "$aArray") Local $iCount = 0 ;init Local $i For $i = 1 to $aArray[0][0] If $aArray[$i][1] = "M" Then $iCount = $iCount + 1 ;debug ;MsgBox($MB_OK + $MB_TOPMOST, "Debug", "$aArray[$i][0] = " & $aArray[$i][0] & @CRLF & "$aArra
  5. I was running my script and everything was working fine and then it just stopped working. I got this error message: !>12:51:55 AutoIt3.exe ended.rc:-1073741819 +>12:51:55 AutoIt3Wrapper Finished. >Exit code: 3221225477 Time: 354.6 I looked that error up and this article (https://www.autoitscript.com/trac/autoit/ticket/2541) said it was fixed a long time ago. I am using version: SciTE Version 4.1.0, how am I getting this error? (first time I got it after running my code 50+ times) it crashed while trying to loop through emails. Full output log:
  6. I am unable to execute the below script, my requirement is to copy the content from active excel sheet and to display the same. Please let me know where i am missing! #include <Excel.au3> #include <MsgBoxConstants.au3> #include <Array.au3> #include <StringConstants.au3> Local $oExcel = _Excel_Open() $LastRow2 = $oExcel.UsedRange.Rows.Count $Tissue = _Excel_RangeRead($oExcel, Default, "E1:E" & $LastRow2) $TshNr = _Excel_RangeRead($oExcel, Default, "F1:F" & $LastRow2) _ArrayDisplay($Tissue) _ArrayDisplay($TshNr)
  7. So I have been reading on how to use OAuth2 Service accounts(https://developers.google.com/identity/protocols/OAuth2ServiceAccount) and ran into an issue with autoit I can not solve. To keep this short to communicate to the Google API I need to use a JSON Web signature containing {Base64url encoded header}.{Base64url encoded claim set}. The Header and claim set work fine but I do not know how to convert them to a byte array using autoit. I have looked around on the forums and website but have not found anything that seems to work. Here is my code. #include-once #include &l
  8. Hi, first of all thanks to all the guys who always help people in the forums, I wouldn't be able to do anything if wasn't for your help, even if I don't ask it myself. I've created this code to get some info on a monitoring network on my work. It relays on _IETableGetCollection and _IETableWriteToArray. It works well, but take around 3:25 minutes to get the info from 28 pages (some of them are large and take longer to load, but most of them are small and fast). My question is if you see a way to get the program to go faster... I've tried to make it easy for yo
  9. Hello, I have recently tried experimenting with a new feature that I want to add to my program. I wanted to test packet loss, so I opted into a command prompt that displays the necessary data that I want. Now I want to sort out the data by using column sorting if possible by using arrays. My question is: Are you able to sort them out on CMD or is it only Excel spreadsheets? Below find the column I want to sort out: Pinging google.ie [2a00:1450:400b:c01::5e] with 32 bytes of data: Reply from 2a00:1450:400b:c01::5e: time=1033ms Reply from 2a00:1450:400b:c01::5e: time=309
  10. The _ArraySortc() function _ArraySortC(ByRef $aArray, $iDescending = 0, $iStart = 0, $iEnd = 0, $iSubItem = 0, $iPivot = 0, $iCase = 0, $iNumericalSort = 0) The _ArraySort() function from AutoIt's Array.au3 UDF include file is downwardly compatible with the _ArraySortc() function which is in the updated ArrayMultiSortCase.au3 UDF of post #1. In fact, the _ArraySortc() function is a modified version of the _ArraySort() function that gives access to optional numeric sorting and\or case sensitive sorting if needed. The _ArraySortInOrder() function _ArraySortInOrder(ByRef $array, $sSortingO
  11. Im trying to iterate through a 2d array created by ProcessList() function that returns a 2d array containing names and pid's, i wanted to filter through the names and delete entries that have "svchost.exe" and this is how i did it Func _Sanitize($array) For $x = 1 To UBound($array) - 1 ConsoleWrite($array[$x][0] & @CRLF) If $array[$x][0] == "svchost.exe" Then _ArrayDelete($array, $x) EndIf Next EndFunc ;==>_Sanitize And i get this error message What is wrong?
  12. Hello Guys! I wanted to share all my knowledge on arrays! Hope may enjoy the article , Lets start! Declaring arrays! Declaring arrays is a little different than other variables: ; Rules to follow while declaring arrays: ; ; Rule #1: You must have a declarative keyword like Dim/Global/Local before the declaration unless the array is assigned a value from a functions return (Ex: StringSplit) ; Rule #2: You must declare the number of dimensions but not necessarily the size of the dimension if you are gonna assign the values at the time of declaration. #include <Array.au3&g
  13. In every other language doing dim $a[3] = [1, 2, 3] $b = $a creates a reference to a but in autoit it always makes a copy. I didn't realize this until I have performance problems and now I'm trying to switch over to the reference behavior. How can I change the above statement so b is a reference to a and not a full copy?
  14. Hello, I am currently writing a program that parses a massive table from a website, and need a way to add a progress bar while parsing. I am currently using the function _IETableWriteToArray($oObj, True) to parse the array. I need the progress bar to update as the table is parsed, not just at the end of the parsing. Any help at all would be very much appreciated! *EDIT --> The array I am left with after parsing is $array[0-50000][16]
  15. Hello, So this may be more of a challenge of effective programming then specific to AutoIT but I want to solve this problem with AutoIT so i'm putting it here. (If someone has a better language to solve with I'm all ears) So the task I'm trying to achieve is that I have multiple .CSV files that have: year, month, day, hour, value. I need to be able to sum up all the values that have the same date/time, then find which date and time has the maximum value. The problem is that each file may or may not have same amount of days/hours as the rest. So I need to devise a
  16. Associative Array Functions I've seen a couple of UDFs for this on the forum. One of them I quite like. But it's still nearly not as good as this method, IMHO. I don't recall if I discovered the "Scripting.Dictionary" COM object myself or if I got the original base code from somewhere online. I have recently searched the web (and here) hard for any AutoIt references to this, other than my own over the years I've been using this (in ffe, etc..), and I can find nothing, so I dunno. If anyone does, I'd love to give credit where it's due; this is some cute stuff! It could actually be all
  17. How do I work with 2D arrays. I've tried this but get errors. Local $aTest[4][4] = [[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]] ;$aTest[0][] = [10,11,12] ; Error at [] Local $sTest = "" For $i = 0 To UBound($aTest)-1 Local $aExtract = _ArrayExtract($aTest,$i,$i) $sTest = $sTest & MyTest($aExtract) Next Func MyTest($aTemp) _ArrayDisplay($aTemp) ; Error at v $aTemp Return String($aTemp[0]) & " - " & String($aTemp[1]) & " - " & String($aTemp[2]) & @CRLF EndFunc
  18. My esteemed Autoits I need your help once again. I'm trying to figure out how to create a loop that gets 1 value from an array and repeats until each value from the array has been used. I have never used arrays before and I know once I learn more things should get easier for me. Here is what Im trying to do: -Have an array of values that determine what application i log into. ex: app1, app2, app3, app4 etc. -Have a loop that repeats a process sequentially using each value in the array to finish the process for each app1, app2, app 3 and so forth. I have 30 apps that I need
  19. Hi All, I am fairly new to AutoIT and I am still trying to learn, I have been using _FileListToArray to list all the files with a particular extension in an array and then loop through it for operation ( For $i = 1 To UBound($FileArray) - 1). So far this has been working fine. But I am not able to figure out a problem that I have; what if I have 50 files but I only want to loop through first 10 files and then next ten and so on? Or rather I should say, how I can I only feed max 10 files to the array at a time when I do _FileListToArray regardless of the total number of files
  20. I'm trying to get an array from a website so that I can just get the url, but I am not sure how. I read a bit of arrays but I have a feeling I'd have to be writing a lot more than what I should be. I will include the script I have so far and the API url for what I want. API: https://api.fast.com/netflix/speedtest?https=true&token=YXNkZmFzZGxmbnNkYWZoYXNkZmhrYWxm&urlCount=1 (I want the 'url' array that contains the url) Code: #include <MsgBoxConstants.au3> #include <Inet.au3> #include <Array.au3> $site = _INetGetSource('http://api.
  21. Alright, currently I'm trying to merge two loops: Local $aArray[99][13] For $iLoop = 1 to 100 $aArray[$iLoop - 1][0] = RegEnumKey("HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration", $iLoop) If @error <> 0 Then ReDim $aArray[$iLoop - 1][13] ExitLoop EndIf Next For $iLoop1 = 0 to UBound($aArray, 1) - 1 For $iLoop2 = 1 to 12 $aArray[$iLoop1][$iLoop2] = RegEnumKey("HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\" & $aArray[$iLoop1][0], $iLoop2) If @error <> 0 Then ExitLoop Next Ne
  22. Hi guys! How are you? Hope you're fine I'm trying to use SQLite for managing some data, and, I would like to display my "retrieved" data, but I'm trying to do a select from 2 table, and seems to not work properly... What I'd like to do is retrieve data from 2 tables and display in a listview... I tried with: Local $aRisultato, $iRighe, $iColonne, $iRVal $iRval = _SQLite_GetTable2d($hDatabase, "SELECT * FROM Magazzino_Rockwell, Magazzino_Siemens;", $aRisultato, $iRighe, $iColonne) If $iRVal = $SQLITE_OK Then ;_SQLite_Display2DResult($aRisultato) _ArrayDispla
  23. Hi people, It's been a while I have been scripting in vbscript for some time but now i'm back using AutoIt for a project: Scripting Adobe Illustrator with AutoIt . This vb code needs to be converted: Set appRef = CreateObject("Illustrator.Application") 'Create a new document and assign it to a variable Set documentRef = appRef.Documents.Add 'Create a new text frame item and assign it to a variable Set sampleText = documentRef.TextFrames.Add 'Set the contents and position of the TextFrame sampleText.Position = Array(200, 200) sampleText.Contents
  24. I just can't get my head around what I'm trying to do. Ok so I read all the links in a webpage into a 1D array, I then make the array unique as there are some duplicates. I then find all the entries I want from the array and put the number of the row for those entries into another 1D array. So I now have two arrays; one has unique links, the other has the numbers of the rows for the links I actually want. Using the second array I would like to amend the first array, or create a third, with just the links I actually want. Confused? Welcome to my world. I'll put the
  25. I've been searching for a solution on the forum and came across a partial solution in this topic... My problem is that I have a 2D array; column one has the description (a string) of the integer in column two. I want to sort this array by the value of column two from highest to lowest. Only my _ArraySort produces a strange result. Here is the code and the output before and after... Local $PensionsOne = ($MonthlyPensionIncomeOne + $MonthlyPensionCreditIncomeOne) Local $SecondEmploymentOne = ($SecondSalaryOne + $SecondBonusOne + $SecondOvertimeOne + $SecondCommissionOne) L
  • Create New...