Jump to content
Jemboy

Data records with Array

Recommended Posts

Jemboy

Hi, 

About 25 years ago I used to use (Turbo) Pascal about the sameway I use AutoIt now. Building little tools to make life easier.
I remember, Turbo Pascal had data records, you could use with arrays and if memory serve me, you could even save en read the records to/from a file.

See example at: http://pascal-programming.info/lesson11.php

A Record is a datastructure with some variables in it, making it easy to manipulate.
You could send or return a record to/from a function, so you don't have to work with global variables when you have to return multiple variabeles.

You could read a bunch of recordsets as an array and just use MyArray [1].Name and MyArray[1].Surname,
instead of MyArray[1][0] and MyArray[1][1] etc. making the source easier to read.

 

My question, is something like records implemented into Autoit, is there somekind of UDF that will do the trick or
is these feature somehow planned for the future?

Regards,

Jem.

P.s. sorry for using the link, but I started explaining this record thing and found that the link eplainded it better than I could ever do!

 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites
Melba23

Jemboy,

You could look at the experimental Map datastructure - this thread explains all that is publicly available about them.

Personally I still tend to use arrays and Enums to make the code easier to follow:

#include <MsgBoxConstants.au3>

Enum $eName, $eSurname ; Set to 0, 1



Global $aNames[2][2] = [["Fred", "Bloggs"], ["Dora", "Smith"]]

For $i = 0 To 1
    MsgBox($MB_SYSTEMMODAL, "First", $aNames[$i][$eName] & " " & $aNames[$i][$eSurname])
Next

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
jvanegmond

AutoIt beta added a Maps feature which is an excellent drop in replacement for this. It's not identical, you won't have any compile time checking done on the names used, but it's definitely a handy thing to have and may solve your use case.

Dim $myBookRec[]

$myBookRec.Title  = 'Some Book'
$myBookRec.Author = 'Victor John Saliba'
$myBookRec.ISBN   = '0-12-345678-9'
$myBookRec.Price  = 25.5

ConsoleWrite('Here are the book details:' & @CRLF)
ConsoleWrite(@CRLF)
ConsoleWrite('Title:  ' & $myBookRec.Title & @CRLF)
ConsoleWrite('Author: ' & $myBookRec.Author & @CRLF)
ConsoleWrite('ISBN:   ' & $myBookRec.ISBN & @CRLF)
ConsoleWrite('Price:  ' & $myBookRec.Price & @CRLF)
  • Like 1

Share this post


Link to post
Share on other sites
jchd

The nearest AutoIt construct is DllStruct but note that you have to declare each of them explicitely if you want to make an array of them.

Maps aren't close to Pascal records.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites
jchd

A dev??? What do you mean?


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites
RTFC

@jemboy: you can stick a struct directly into an array, and then access specific fields within the struct, for any desired record within scope, with DllstructGetData/SetData:

Local Const $tagSTRUCT1 = "struct;int var1;byte var2;uint var3;char var4[128];endstruct"
$maxrecords=10

; create data struct for each record
Global $records[$maxrecords+1]
For $rc=1 To $maxrecords
    $records[$rc] = DllStructCreate($tagSTRUCT1)
Next
$records[0]=Ubound($records)-1

; load some content
DllStructSetData($records[1],"var4","lastname1")
DllStructSetData($records[2],"var4","lastname2")
DllStructSetData($records[3],"var4","lastname3")

; retrieve a field for a specific record
$myrecord=2
MsgBox(0,"struct in rec " & $myrecord,DllStructGetData($records[$myrecord],"var4"))

 

Edited by RTFC
  • Like 1

Share this post


Link to post
Share on other sites
Melba23

RTFC,

While I appreciate that you can use Structs to store data, this has always been strongly opposed by the Devs on the grounds that the internals of Structs are not documented other than as a way to pass parameters when calling a DLL.  I kept this quote from Jon when the subject was raised a while ago:

The big worry - and something Valik pointed out in priv-devchat - is that without doubt people will [..] create some hybrid datatypes that are vaguely documented and unsupported. They'll be used with other features in unsupported ways and then we get trapped when we try and change some behaviour that was undefined anyway. They'll definately be used outside of the scope of just being passed to DllCall.

So I would absolutely NOT recommend using them in this way - and certainly not expecting any form of support, or sympathy if they suddenly no longer work as expected.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
RTFC

@M23:Sorry, I was unaware of this discussion and that the approach I suggested was frowned upon. However, using structs themselves as containers for multiple fields of different type is documented, and they offer quick access to individual members. I personally use them in various languages for storing associated bits of data; I wasn't aware I was falling foul of canonical use of AutoIt in this.

Edited by RTFC
typo
  • Like 1

Share this post


Link to post
Share on other sites
jchd

If DllStruct stop working the way they work today there will be more than unexpected behaviors. For instance would _WinAPI_WriteFile stop working when it's passed a DllStruct, which is readily used in some standard includes and Wrapper, to say the least? That is exactly what the OP could be using DllStruct for. Also would the large number of DllStructs used in other WinAPI calls stop working?

For me DllStructs are containers which can hold data under a strict format definable by users with well documented basic types. Maybe both Valik and Jon feared completely different [mis]uses, but certainly not this one.

  • Like 2

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites
RTFC

@jchd: thanks. I was sort of hoping/expecting you'd see it that way too.:) But I think Melba's point in removing my post was more specifically aimed at the example script I posted, which could be/was apparently construed as subverting the proper AutoIt way of defining a single struct in a stand-alone variable for Dll parsing, and thereby (inadvertently) advertising a type of usage that the devs would rather discourage. Your broader definition certainly fits my own coding style, though. But I don't know enough about AutoIt's internal workings to be able to judge whether the devs' concerns are legitimate here. Let's just leave it at that. After all, I was only trying to help the OP, and such a fundamental, universal data container as a struct seemed a more obvious suggestion (to me) than a beta feature.:(

Edited by RTFC
  • Like 1

Share this post


Link to post
Share on other sites
Melba23

RTFC,

Melba's point in removing my post

Just to be clear, I have not removed anything at all in this thread - all I did was highlight the opinion of the language author, which I thought might be of interest to any reading.

  I don't know enough about AutoIt's internal workings to be able to judge whether the devs' concerns are legitimate here

However the Devs do know and they discourage such usage - that is good enough for me. But I said above, there is nothing to stop you doing whatever you want - just expect neither support nor sympathy if there is an internal change which still allows Structs to be used for calling DLLs but breaks any code you have previously written.

M23

Edit: Another (ex)Dev who also thinks it is a bad idea: 

Edited by Melba23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
jchd

The main points remains that the OP asked for an AutoIt construct similar in essential properties to the Pascal record and this does have an answer: DllStruct are just doing that, keeping in mind that they are an equivalent to C structs but not to C typedefed structs.

What DllStructs are not suitable for is when one expects to use them for, say, masquerading the inner layout of objects or similar acrobatic tricks. This is the kind of sideways use that I believe Valik and Jon had in mind. That or doing tricks with the stack or even more dangerous misuse. Agreed, AutoIt isn't the language of choice to rewrite Stuxnet.

I'd like to see a rebutal to the fact that they can be used (and are used today) to pass data to _WinAPI_WriteFile and from _WinAPI_ReadFile as an opaque binary container (address and size). This is all the OP wanted and I see no reason why such legitimate use should be discouraged.

Yet again I must warn against the fact that, contrary to Pascal records, assigning an existing DllStruct to another variable doesn't create a distinct copy of the DllStruct, but a clone of the original struct based at the same address.

Local $tBuf = DllStructCreate('dword')
DllStructSetData($tBuf, 1, 1234)
ConsoleWrite(DllStructGetData($tBuf, 1) & @LF)
Local $tBufCopy = $tBuf
DllStructSetData($tBuf, 1, 5678)
ConsoleWrite(DllStructGetData($tBufCopy, 1) & @LF)

 

  • Like 2

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites
LarsJ

I think the OP asked for something like this:

Local $tagMyRecord = "int Integer;double Real;char String[128]"
Local $aMyArray[3] = [ DllStructCreate( $tagMyRecord ), _
                       DllStructCreate( $tagMyRecord ), _
                       DllStructCreate( $tagMyRecord ) ]

$aMyArray[0].Integer = 1234
$aMyArray[0].Real    = 1234.12
$aMyArray[0].String  = "This is string 0"
$aMyArray[1].Integer = 5678
$aMyArray[1].Real    = 5678.56
$aMyArray[1].String  = "This is string 1"
$aMyArray[2].Integer = 9090
$aMyArray[2].Real    = 9090.90
$aMyArray[2].String  = "This is string 2"

ConsoleWrite( $aMyArray[0].Integer & @LF )
ConsoleWrite( $aMyArray[0].Real    & @LF )
ConsoleWrite( $aMyArray[0].String  & @LF )
ConsoleWrite( $aMyArray[1].Integer & @LF )
ConsoleWrite( $aMyArray[1].Real    & @LF )
ConsoleWrite( $aMyArray[1].String  & @LF )
ConsoleWrite( $aMyArray[2].Integer & @LF )
ConsoleWrite( $aMyArray[2].Real    & @LF )
ConsoleWrite( $aMyArray[2].String  & @LF )

 

  • Like 1

Share this post


Link to post
Share on other sites
RTFC

@Melba:When I was reading this thread yesterday, the post with my example had somehow disappeared, and as this occurred right after you posted your response, I interpreted this (wrongly, as it now turns out) as you having made the decision to remove that entry. Sorry for the confusion. And I take the point about lack of future support, but this basically holds for any part of the language (I remember _Iif() disappearing). But I'm with jchd on structs; I cannot imagine that one would restrict their usage to transient dll I/O receptacles only. Using them as semi-permanent data records in memory would seem fair use to me, and in keeping with all other languages that support them. I also have difficulty imagining how dll-associated use could be kept intact while use as a more permanent storage container would disappear. Whether or not it is wise to stick a struct in an array cell is a far more thorny (and technical) issue, and I'll take it from you that the devs have good reason to discourage this. I was certainly not aware of this. But (at least for my applications) it would be a fairly trivial patch to avoid such usage, if support for it were to be discontinued.

As an aside, I cannot find any mention in the Helpfile that structs should not be used as aggregate data containers in general, but maybe I'm looking in the wrong places.

@jchd: I find struct pointer cloning in the way you describe a highly useful feature, actually; it allows separate UDFs to use their own internal referencing conventions to alter a shared data space, and provided these UDFs are part of the same executing thread, you don't need a mutex..

@LarsJ: interesting notation; never used that.

Edited by RTFC

Share this post


Link to post
Share on other sites
Melba23

RTFC,

No problem - I was just trying to make sure every one had the "bigger picture".  I agree with you that there seems little problem with using Structs in this manner, but that there are some risks associated with so doing as the undocumented internals of AutoIt could change at some time in the future.

I cannot find any mention in the Helpfile that structs should not be used as aggregate data containers

Which I would take as a good hint that they were not intended as such - but that there is no specific prohibition against so doing. And I feel that is a good summary of what this thread has concluded.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • VollachR
      By VollachR
      Hi,
      I'm looking for a way to take a number value from a Row2 of a 2D array and according to this check if files that appear in rows 3-11 in the array exists.
      For example, if the number in Row2 is 5 I need to check for the files in Row 3-6 only, if it is 6 than rows 3-7 and so on.
      I thought on using a FOR loop but I have very little experience with those.
      Can you suggest the best way to do what I need?
      BTW, the files in Rows 3-11 will usually have blank value for any row above the number in Row2 (e.g. Row2 = 5 so Rows3-6 will have values but 8-11 be empty), The values I need are in Column 1 of the array, the name of the key from the INI file that the array was created from is in Column 0.
      Full Example:
      Row2 of Array:
      Col0 = Games# - Col1 = 5
      Rows3-6
      Col0 = Exe2 - Col1 = Path To File
      Col0 = Exe3 - Col1 = Path To File
      Col0 = Exe4 - Col1 = Path To File
      Col0 = Exe5 - Col1 = Path To File
      I need that if Row2 is 5 to check these above for rows if the file exists, if it was 6 then the next row as well and so on up until number 10 in Row2 as it can't go above 10.
      So basically for whatever number in Row2 from 2-10 need to check 1-9 rows from 3-11 to see if the files in Col1 exists and if any of them don't exist it should call a function that shows an error message.
      I'm pretty sure I have the first line of the for look correct:
      For $i = 1 To $aAIO[2][1] Just not sure how to continue from there, also not sure if $i should be equal 1 or 2.
      Help will be appreciated.
    • FMS
      By FMS
      Hello,
      I'm trying to get data from twitter to an array and so far I found an Twitter UDF whish lookes very intresting but couldn't get it to work.
      It lookes not supported any more(2010) and buggy when i read all te replies.
      More around this subject (autoit and twitter) i couldn't find on this forum.
      Is there sombody who know's a good way to get live data from twitter to an array inside autoit?
      (I kinda doubt that this isn't tackled before)
      In the end I was hoping to get all tweets from date to date from an specific subject inside a 2D array to work whit.
    • AndreasNWWWWW
      By AndreasNWWWWW
      I got a question:  i am trying to run different functions based upon what i select in these radio buttons.(code below)
      it needs to check server 1. then run function 1 or function 2 after what i selected in the checkbox.
      once that function is done it moves to the next one, until it has been trough all 5 
       
      iv'e tried using while loops with different while $i equals to something but then i manualy need to go in and edit the script every time.
      #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 437, 192, 124) $Server2 = GUICtrlCreateLabel("Server2", 216, 95, 41, 17) $server1 = GUICtrlCreateLabel("Server1", 216, 72, 41, 17) $server4 = GUICtrlCreateLabel("Server4", 216, 144, 41, 17) $server3 = GUICtrlCreateLabel("Server3", 216, 119, 41, 17) $server5 = GUICtrlCreateLabel("Server5", 216, 170, 41, 17) $Start = GUICtrlCreateButton("Start", 240, 248, 147, 25) $Checkbox1 = GUICtrlCreateCheckbox("function1", 288, 72, 97, 17) $Checkbox2 = GUICtrlCreateCheckbox("function2", 392, 72, 97, 17) $Checkbox3 = GUICtrlCreateCheckbox("function1", 288, 96, 97, 17) $Checkbox4 = GUICtrlCreateCheckbox("function2", 392, 96, 97, 17) $Checkbox5 = GUICtrlCreateCheckbox("function1", 288, 120, 97, 17) $Checkbox6 = GUICtrlCreateCheckbox("function2", 392, 120, 97, 17) $Checkbox7 = GUICtrlCreateCheckbox("function1", 288, 144, 97, 17) $Checkbox8 = GUICtrlCreateCheckbox("function2", 392, 144, 97, 17) $Checkbox9 = GUICtrlCreateCheckbox("function1", 288, 170, 97, 17) $Checkbox10 = GUICtrlCreateCheckbox("function2", 392, 170, 97, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd  
    • 31290
      By 31290
      Hi everyone, 
      I'm currently writing a script that allow me to list all currently installed software on a computer but some of the are listed in the HKLM64 hive of the registry whereas 95% of all others are in the HKLM "normal" one.
      Thing is, I'd like to combine these two reg key into one single ListView item.
      Here's my code so far, knowing that it's working on both cases (changing to HKLM64 or HKLM short)
      Thanks in advance for the help
      -31290-
    • Iceburg
      By Iceburg
      Hi everyone, I'm at best a noobie.  I have read through the Array helps, and specifically the 2D array help file, and I'm struggling to get my code working.
      I have an array that is read from a file, thats working great.  I'm trying to do some math on the array, so I can find the largest, average, lowest, day over day change %, etc.
      The array read working fine, I get 43 lines, line 0 is 44, and then I get data that looks like
      0519 $10,000
      0520 $10,001
      0521 $10,002
      The data in this array is a single 1D array, breaking it out into 2 columns so I can do the math is what I can get to happen.  
      How do I reference the array to store this data?  Second, how do I assign this data to the appropriate row/column?
      Thanks in advance.
      Dim $all_cash_amounts[UBound($aInput)][2] Dim $max_amount_in_account Dim $min_amount_in_account _FileReadToArray($LC_Check_file_path, $aInput) _ArrayDisplay($aInput) local $date = StringRegExp($aInput[1], "(\d\d\d\d)", 1) local $cash = StringRegExp($aInput[1], "\d+\s(-?[0-9\.\,]+)", 1) ConsoleWrite("Date is: " & $date & @CRLF) For $i = 1 To UBound($aInput)-1     $date = StringRegExp($aInput[$i], "(\d\d\d\d)", 1)     $all_cash_amounts[$i][2] = $date[$i][0], $cash[$i][1]      Next _ArrayDisplay($all_cash_amounts)  
×