New to data parsing of text file using arrays... needing direction

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
TXShooter
Posts: 165
Joined: 13 Dec 2017, 09:27

New to data parsing of text file using arrays... needing direction

Post by TXShooter » 09 Jan 2018, 09:15

I'm still rather new to AHK and am struggling here and there with things. My latest 'segment' is to parse a textual data file to extract an array of values in the middle. It's construct isn't something that I find conventional, but does it really have to be?

Here's an exert of my data file (which if you need to know it is a Reaper.rpp file):

Code: Select all

    FLOATPOS 0 0 0 0
    FXID {BB787D93-DE7A-4536-ACEA-DD4A33747ECB}
    WAK 0
  >
  <MASTERPLAYSPEEDENV
    ACT 0 -1
    VIS 0 1 1
    LANEHEIGHT 0 0
    ARM 0
    DEFSHAPE 0 -1 -1
  >
  <TEMPOENVEX
    ACT 0 -1
    VIS 1 0 1
    LANEHEIGHT 0 0
    ARM 0
    DEFSHAPE 1 -1 -1
  >
  MARKER 1 538.02455548287924 "Victory Today Is Mine " 0 0 1 R
  MARKER 2 646.24578231297517 "End Choir Song" 0 0 1 R
  MARKER 3 1117.1464625853457 "Hide Me Behind The Cross" 0 0 1 R
  MARKER 4 1359.098390023122 "End Special" 0 0 1 R
  MARKER 5 1360.8631065764109 "Pastor Starts" 0 0 1 R
  MARKER 6 1544.2445722788718 "Sermon Start - I Don't Know About Tomorrow" 0 0 1 R
  MARKER 7 3809.2680045369557 "Sermon End" 0 0 1 R
  <PROJBAY
  >
  <TRACK {8F813165-D07D-4231-8557-C56D7D6D571C}
    NAME "Hand Mic 1"
    PEAKCOL 16810239
    BEAT -1
    AUTOMODE 0
    VOLPAN 0.00000003162278 0 -1 -1 1
    MUTESOLO 0 0 0
    IPHASE 0
    ISBUS 0 0
    BUSCOMP 0 0
    SHOWINMIX 1 0.6667 0.5 1 0.5 0 0 0
    FREEMODE 0
    SEL 1
    REC 1 0 1 0 0 0 0
    VU 2
    TRACKHEIGHT 0 0
    INQ 0 0 0 0.5 100 0 0 100
    NCHAN 2
    FX 1
    TRACKID {8F813165-D07D-4231-8557-C56D7D6D571C}
    PERF 0
    MIDIOUT -1
    MAINSEND 1 0
    <FXCHAIN
      WNDRECT 24 52 655 403
      SHOW 0
      LASTSEL 0
      DOCKED 0
    >
    <ITEM
      POSITION 0
      SNAPOFFS 0
I'm currently stuck in my code trying to work through the parsing routine whereby the first messagebox isn't even displaying, like it is being skipped. What I am trying to do is retrieve the Markers by Number, Time, and Title, but I can't seem to figure out what I'm doing wrong.

Code: Select all

;Variables:
#NoEnv  						; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  						; Enable warnings to assist with detecting common errors.
SendMode Input  				; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  	; Ensures a consistent starting directory.
global SaveAsFileName
global reaperMarkerNumber := []
global reaperMarkerTime := []
global reaperMarkerTitle := []

	reaperGetRPPFile(WorkingPathName)

reaperGetRPPFile(WorkingPathName)
{
	Loop, read, C:\Church Service Recording.RPP ;%WorkingPathName%.rpp
	MsgBox File %WorkingPathName%.rpp is about to be parsed line by line.
	{
		StringSplit, LineArray, A_LoopReadLine, %A_Space%
		MsgBox In the middle of parsing routine
		reaperMarkerNumber.Insert(LineArray1)
		reaperMarkerTime.Insert(LineArray2)
		reaperMarkerTitle.Insert(LineArray3)
		;MsgBox, %reaperMarkerTitle.1%
	}
	MsgBox Something from %WorkingPathName%.rpp?
	ExitApp
}
My head is swamped with Google and AHK searches, I'm not even sure which way is up anymore. Is there a kind soul out there willing to assist me in figuring this out?

Odlanir
Posts: 659
Joined: 20 Oct 2016, 08:20

Re: New to data parsing of text file using arrays... needing direction

Post by Odlanir » 09 Jan 2018, 13:32

Code: Select all

reaperMarkerNumber := []
reaperMarkerTime   := []
reaperMarkerTitle  := []

reaperGetRPPFile("C:\Church Service Recording.RPP")
loop, % reaperMarkerNumber.maxindex() {
   strOUT .= reaperMarkerNumber[a_index] a_tab reaperMarkerTime[a_index] a_tab reaperMarkerTitle[a_index] "`n"
}
MsgBox %strOUT%
ExitApp

reaperGetRPPFile(WorkingPathName) {
   global
   Loop, read, %WorkingPathName% 
   {
      if ( !instr(A_LoopReadLine, "MARKER") )
         continue
      RegExMatch(Trim(A_LoopReadLine), "O)^MARKER\s+(\d+)\s+([\d.]+)\s+""(.*)"".*$", Arr)
      reaperMarkerNumber.Push(Arr[1])
      reaperMarkerTime.Push(Arr[2])      
      reaperMarkerTitle.Push(Arr[3])
   }
}
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode

User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: New to data parsing of text file using arrays... needing direction

Post by TheDewd » 09 Jan 2018, 13:41

My attempt:

Basically the same as Odlanir, but I was too slow to post...

Code: Select all

#SingleInstance, Force

MarkerNumber := []
MarkerTime   := []
MarkerTitle  := []

Loop, Read, Exert.RPP
{
    Line := A_LoopReadLine

    If (InStr(Line, "MARKER", true, 1, 1)) {
        RegExMatch(Line, "MARKER\s(\d+)\s(.*?)\s""(.*?)""", Marker)
            MarkerNumber.Push(Marker1)
            MarkerTime.Push(Marker2)
            MarkerTitle.Push(Marker3)
    }
}

; Examples
MsgBox, % MarkerTitle[4]
MsgBox, % MarkerTime[2]
MsgBox, % MarkerNumber[3]
return

User avatar
KuroiLight
Posts: 327
Joined: 12 Apr 2015, 20:24
Contact:

Re: New to data parsing of text file using arrays... needing direction

Post by KuroiLight » 09 Jan 2018, 14:14

Lol, I post a tad late too...

Code: Select all

FileRead, filecontents, .\data.txt
reaperMarkerData := {}

last_pos := 1
Loop {
    last_pos := RegExMatch(filecontents, "imS)^\s*MARKER\s*(?P<Numb>\d+)\s*(?P<Time>[\d\.]+)\s*\""(?P<Title>.+)\""", line_, last_pos+5)
    if(line_Numb and line_Time and line_Title)
        reaperMarkerData[line_Numb] := {Title:line_Title, Time:line_Time}
} Until !last_pos

output_Result := ""
for i, v in reaperMarkerData
    output_Result .= "Index: " . i . "`n`tTitle: " . v.Title . "`n`tTime: " . v.Time . "`n"
MsgBox, %output_Result%
or

Code: Select all

FileRead, filecontents, .\data.txt
reaperMarkerNumber := []
reaperMarkerTime := []
reaperMarkerTitle := []

last_pos := 1
Loop {
    last_pos := RegExMatch(filecontents, "imS)^\s*MARKER\s*(?P<Numb>\d+)\s*(?P<Time>[\d\.]+)\s*\""(?P<Title>.+)\""", line_, last_pos+5)
    if(line_Numb and line_Time and line_Title) {
        reaperMarkerNumber.Push(line_Numb)
        reaperMarkerTime.Push(line_Title)
        reaperMarkerTitle.Push(line_Time)
    }
} Until !last_pos
Windows 10, Ryzen 1600, 16GB G.Skill DDR4, 8GB RX 480 | [MyScripts][MySublimeSettings] [Unlicense][MIT License]
01/24/18
[/color]

User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

Re: New to data parsing of text file using arrays... needing direction

Post by FanaticGuru » 09 Jan 2018, 14:17

Here is an example of using RegEx to parse a string.

Code: Select all

Data =
(
	FLOATPOS 0 0 0 0
    FXID {BB787D93-DE7A-4536-ACEA-DD4A33747ECB}
    WAK 0
  >
  <MASTERPLAYSPEEDENV
    ACT 0 -1
    VIS 0 1 1
    LANEHEIGHT 0 0
    ARM 0
    DEFSHAPE 0 -1 -1
  >
  <TEMPOENVEX
    ACT 0 -1
    VIS 1 0 1
    LANEHEIGHT 0 0
    ARM 0
    DEFSHAPE 1 -1 -1
  >
  MARKER 1 538.02455548287924 "Victory Today Is Mine " 0 0 1 R
  MARKER 2 646.24578231297517 "End Choir Song" 0 0 1 R
  MARKER 3 1117.1464625853457 "Hide Me Behind The Cross" 0 0 1 R
  MARKER 4 1359.098390023122 "End Special" 0 0 1 R
  MARKER 5 1360.8631065764109 "Pastor Starts" 0 0 1 R
  MARKER 6 1544.2445722788718 "Sermon Start - I Don't Know About Tomorrow" 0 0 1 R
  MARKER 7 3809.2680045369557 "Sermon End" 0 0 1 R
  <PROJBAY
  >
  <TRACK {8F813165-D07D-4231-8557-C56D7D6D571C}
    NAME "Hand Mic 1"
    PEAKCOL 16810239
    BEAT -1
    AUTOMODE 0
    VOLPAN 0.00000003162278 0 -1 -1 1
    MUTESOLO 0 0 0
    IPHASE 0
    ISBUS 0 0
    BUSCOMP 0 0
    SHOWINMIX 1 0.6667 0.5 1 0.5 0 0 0
    FREEMODE 0
    SEL 1
    REC 1 0 1 0 0 0 0
    VU 2
    TRACKHEIGHT 0 0
    INQ 0 0 0 0.5 100 0 0 100
    NCHAN 2
    FX 1
    TRACKID {8F813165-D07D-4231-8557-C56D7D6D571C}
    PERF 0
    MIDIOUT -1
    MAINSEND 1 0
    <FXCHAIN
      WNDRECT 24 52 655 403
      SHOW 0
      LASTSEL 0
      DOCKED 0
    >
    <ITEM
      POSITION 0
      SNAPOFFS 0
)

; Build Array
Markers := {}
X:=1
while (X := RegExMatch(Data, "U)MARKER (\d+) (\S*) ""(.*)""", M, X+StrLen(M)))
	Markers.Push({Number:M1, Time:M2, Title:M3})

; Examples of how to iterate through Array
for index, Marker in Markers
	MsgBox % index "`t" Marker.Number "`t" Marker.Time "`t" Marker.Title

; Example of accessing specific information from array
; Display Number, Time and Title of Marker of the third Marker
MsgBox % Markers[3].Number "`t" Markers[3].Time "`t" Markers[3].Title
If the Markers' index and Number are always going to be the same, it would probably be easier to use that Number as a Key instead of a Number property.

Edit: Appears a lot of activity while I was posting also. Maybe my example shows a more compact way to loop through a string using RegEx to get multiple matches. This is a common need. Also shows how to keep everything in one Object and use "properties" which is generally better practices.

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks

TXShooter
Posts: 165
Joined: 13 Dec 2017, 09:27

Re: New to data parsing of text file using arrays... needing direction

Post by TXShooter » 09 Jan 2018, 14:34

WOW!!! Lots of goodies to look at now! Thanks!

Is there a difference between these lines (1.2, 2.2 and 3.2 below) as it applies to performing mathematical manipulations on the array values?? I'm needing to calculate the time differences between each of the 'markers', and identify which one is the longest.

1.1) RegExMatch(Trim(A_LoopReadLine), "O)^MARKER\s+(\d+)\s+([\d.]+)\s+""(.*)"".*$", Arr)
1.2) reaperMarkerNumber.Push(Arr[1])

2.1) RegExMatch(Line, "MARKER\s(\d+)\s(.*?)\s""(.*?)""", Marker)
2.2) MarkerNumber.Push(Marker1)

3.1) while (X := RegExMatch(Data, "U)MARKER (\d+) (\S*) ""(.*)""", M, X+StrLen(M)))
3.2) Markers.Push({Number:M1, Time:M2, Title:M3})

User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

Re: New to data parsing of text file using arrays... needing direction

Post by FanaticGuru » 09 Jan 2018, 16:37

TXShooter wrote:WOW!!! Lots of goodies to look at now! Thanks!

Is there a difference between these lines (1.2, 2.2 and 3.2 below) as it applies to performing mathematical manipulations on the array values?? I'm needing to calculate the time differences between each of the 'markers', and identify which one is the longest.

1.1) RegExMatch(Trim(A_LoopReadLine), "O)^MARKER\s+(\d+)\s+([\d.]+)\s+""(.*)"".*$", Arr)
1.2) reaperMarkerNumber.Push(Arr[1])

2.1) RegExMatch(Line, "MARKER\s(\d+)\s(.*?)\s""(.*?)""", Marker)
2.2) MarkerNumber.Push(Marker1)

3.1) while (X := RegExMatch(Data, "U)MARKER (\d+) (\S*) ""(.*)""", M, X+StrLen(M)))
3.2) Markers.Push({Number:M1, Time:M2, Title:M3})
1 and 2 are very similiar. One just uses the Object option of RegEx and other does not.
3 is a little different as it Pushes Number, Time, and Title all to the same object where as the other two use three separate objects to store the information.

Here is an example of calculating each Marker's length and adding it as a property to your Markers object.

Code: Select all

Data =
(
	FLOATPOS 0 0 0 0
    FXID {BB787D93-DE7A-4536-ACEA-DD4A33747ECB}
    WAK 0
  >
  <MASTERPLAYSPEEDENV
    ACT 0 -1
    VIS 0 1 1
    LANEHEIGHT 0 0
    ARM 0
    DEFSHAPE 0 -1 -1
  >
  <TEMPOENVEX
    ACT 0 -1
    VIS 1 0 1
    LANEHEIGHT 0 0
    ARM 0
    DEFSHAPE 1 -1 -1
  >
  MARKER 1 538.02455548287924 "Victory Today Is Mine " 0 0 1 R
  MARKER 2 646.24578231297517 "End Choir Song" 0 0 1 R
  MARKER 3 1117.1464625853457 "Hide Me Behind The Cross" 0 0 1 R
  MARKER 4 1359.098390023122 "End Special" 0 0 1 R
  MARKER 5 1360.8631065764109 "Pastor Starts" 0 0 1 R
  MARKER 6 1544.2445722788718 "Sermon Start - I Don't Know About Tomorrow" 0 0 1 R
  MARKER 7 3809.2680045369557 "Sermon End" 0 0 1 R
  <PROJBAY
  >
  <TRACK {8F813165-D07D-4231-8557-C56D7D6D571C}
    NAME "Hand Mic 1"
    PEAKCOL 16810239
    BEAT -1
    AUTOMODE 0
    VOLPAN 0.00000003162278 0 -1 -1 1
    MUTESOLO 0 0 0
    IPHASE 0
    ISBUS 0 0
    BUSCOMP 0 0
    SHOWINMIX 1 0.6667 0.5 1 0.5 0 0 0
    FREEMODE 0
    SEL 1
    REC 1 0 1 0 0 0 0
    VU 2
    TRACKHEIGHT 0 0
    INQ 0 0 0 0.5 100 0 0 100
    NCHAN 2
    FX 1
    TRACKID {8F813165-D07D-4231-8557-C56D7D6D571C}
    PERF 0
    MIDIOUT -1
    MAINSEND 1 0
    <FXCHAIN
      WNDRECT 24 52 655 403
      SHOW 0
      LASTSEL 0
      DOCKED 0
    >
    <ITEM
      POSITION 0
      SNAPOFFS 0
)

; Build Array
Markers := {}
X:=1
while (X := RegExMatch(Data, "U)MARKER (\d+) (\S*) ""(.*)""", M, X+StrLen(M)))
	Markers.Push({Number:M1, Time:M2, Title:M3})

; Add Length property to Markers array
P := 0
SetFormat, FloatFast, 0.14 ; Time is higher than default precision of 6 decimal places
for index, Marker in Markers
	Marker["Length"] := -P + P := Marker.Time ; tricky timing stuff to subtract current from previous in one line

; Examples of how to iterate through Array
for index, Marker in Markers
	MsgBox % "Iterate`n" index "`t" Marker.Number "`t" Marker.Time "`t" Marker.Title "`t" Marker.Length

; Example of accessing specific information from specific Marker
MsgBox % "Third Marker`n" Markers[3].Number "`t" Markers[3].Time "`t" Markers[3].Title "`t" Markers[3].Length

; Find Highest Length
for index, Marker in Markers
	if (Marker.Length > Hi)
		Hi := Marker.Length, HiX := index

MsgBox % "Highest Length Marker:`n" Markers[HiX].Number "`t" Markers[HiX].Time "`t" Markers[HiX].Title "`t" Markers[HiX].Length

MsgBox % ST_printarr(Markers)
Also includes an example of then finding the highest length Marker.

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks

TXShooter
Posts: 165
Joined: 13 Dec 2017, 09:27

Re: New to data parsing of text file using arrays... needing direction

Post by TXShooter » 09 Jan 2018, 17:57

FanaticGuru wrote:
TXShooter wrote:WOW!!! Lots of goodies to look at now! Thanks!

Is there a difference between these lines (1.2, 2.2 and 3.2 below) as it applies to performing mathematical manipulations on the array values?? I'm needing to calculate the time differences between each of the 'markers', and identify which one is the longest.

1.1) RegExMatch(Trim(A_LoopReadLine), "O)^MARKER\s+(\d+)\s+([\d.]+)\s+""(.*)"".*$", Arr)
1.2) reaperMarkerNumber.Push(Arr[1])

2.1) RegExMatch(Line, "MARKER\s(\d+)\s(.*?)\s""(.*?)""", Marker)
2.2) MarkerNumber.Push(Marker1)

3.1) while (X := RegExMatch(Data, "U)MARKER (\d+) (\S*) ""(.*)""", M, X+StrLen(M)))
3.2) Markers.Push({Number:M1, Time:M2, Title:M3})
1 and 2 are very similiar. One just uses the Object option of RegEx and other does not.
3 is a little different as it Pushes Number, Time, and Title all to the same object where as the other two use three separate objects to store the information.

Here is an example of calculating each Marker's length and adding it as a property to your Markers object.

Code: Select all

  MARKER 1 538.02455548287924 "Victory Today Is Mine " 0 0 1 R
  MARKER 2 646.24578231297517 "End Choir Song" 0 0 1 R
  MARKER 3 1117.1464625853457 "Hide Me Behind The Cross" 0 0 1 R
  MARKER 4 1359.098390023122 "End Special" 0 0 1 R
  MARKER 5 1360.8631065764109 "Pastor Starts" 0 0 1 R
  MARKER 6 1544.2445722788718 "Sermon Start - I Don't Know About Tomorrow" 0 0 1 R
  MARKER 7 3809.2680045369557 "Sermon End" 0 0 1 R

; Build Array
Markers := {}
X:=1
while (X := RegExMatch(Data, "U)MARKER (\d+) (\S*) ""(.*)""", M, X+StrLen(M)))
	Markers.Push({Number:M1, Time:M2, Title:M3})

; Add Length property to Markers array
P := 0
SetFormat, FloatFast, 0.14 ; Time is higher than default precision of 6 decimal places
for index, Marker in Markers
	Marker["Length"] := -P + P := Marker.Time ; tricky timing stuff to subtract current from previous in one line

; Examples of how to iterate through Array
for index, Marker in Markers
	MsgBox % "Iterate`n" index "`t" Marker.Number "`t" Marker.Time "`t" Marker.Title "`t" Marker.Length

; Example of accessing specific information from specific Marker
MsgBox % "Third Marker`n" Markers[3].Number "`t" Markers[3].Time "`t" Markers[3].Title "`t" Markers[3].Length

; Find Highest Length
for index, Marker in Markers
	if (Marker.Length > Hi)
		Hi := Marker.Length, HiX := index

MsgBox % "Highest Length Marker:`n" Markers[HiX].Number "`t" Markers[HiX].Time "`t" Markers[HiX].Title "`t" Markers[HiX].Length

MsgBox % ST_printarr(Markers)
Also includes an example of then finding the highest length Marker.

FG
I'm going to have to study your example in detail... looks like it does exactly what I'm trying to accomplish!

Here's what I've done with what has been given so far in hopes of achieving the same thing:

Code: Select all

reaperGetRPPFile(WorkingPathName,FileName) 
{
   global
   Loop, read, %WorkingPathName%\%FileName% 
	{
      if ( !instr(A_LoopReadLine, "MARKER") )
         continue
      RegExMatch(Trim(A_LoopReadLine), "O)^MARKER\s+(\d+)\s+([\d.]+)\s+""(.*)"".*$", Arr)
      reaperMarkerNumber.Push(Arr[1])
      reaperMarkerTime.Push(Arr[2])      
      reaperMarkerTitle.Push(Arr[3])
	}
	
	loop, % reaperMarkerNumber.maxindex() {
			strOUT .= reaperMarkerNumber[a_index] a_tab reaperMarkerTime[a_index] a_tab reaperMarkerTitle[a_index] "`n"
	}
	return
}

reaperGetRegion()
{
	regionTemp1 = 0									; Create temporary variables
	regionTemp2 = 0
	regionSet   = 0
	loop, % reaperMarkerTime.maxindex() {					; Calculate the time between the markers, assuming '0' for the first marker location
			regionTemp2 := reaperMarkerTime[a_index]
			regionSet := regionTemp2 - regionTemp1
			reaperRegion.Push([a_index]) = regionSet			; Store the calculations as 'Regions' to be used later..... maybe (not sure yet)
			regOUT .= reaperRegion[a_index]
			regionTemp1 := regionTemp2
	}
	
			[color=#0000FF] Now find the largest region (Assumption: the preacher's sermon is the longest region, and that's what we want to work with)[/color]
	regionTemp1 = 0									; Reset the tempoary variables
	regionTemp2 = 0
	regionSet	= 0
	loop, % reaperRegion.maxindex() {
			[b]; find the highest value and note its array location.[/b]
	}
	MsgBox Exiting %regOUT%
	
	ExitApp
}

Question: Will this produce the largest marker time, or the largest region between markers?

Code: Select all

; Find Highest Length
for index, Marker in Markers
	if (Marker.Length > Hi)
		Hi := Marker.Length, HiX := index

User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

Re: New to data parsing of text file using arrays... needing direction

Post by FanaticGuru » 09 Jan 2018, 19:51

TXShooter wrote:Question: Will this produce the largest marker time, or the largest region between markers?

Code: Select all

; Find Highest Length
for index, Marker in Markers
	if (Marker.Length > Hi)
		Hi := Marker.Length, HiX := index
This calculates and stores the change in each Markers' Time which is the Length of that Marker:

Code: Select all

; Add Length property to Markers array
P := 0
SetFormat, FloatFast, 0.14 ; Time is higher than default precision of 6 decimal places
for index, Marker in Markers
	Marker["Length"] := -P + P := Marker.Time
Then this finds the highest length from that stored info:

Code: Select all

; Find Highest Length
for index, Marker in Markers
	if (Marker.Length > Hi)
		Hi := Marker.Length, HiX := index
When done, HiX will contain the index of the Markers element with the largest Length.

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks

TXShooter
Posts: 165
Joined: 13 Dec 2017, 09:27

Re: New to data parsing of text file using arrays... needing direction

Post by TXShooter » 09 Jan 2018, 20:22

[quote="FanaticGuru"]This calculates and stores the change in each Markers' Time which is the Length of that Marker:

Code: Select all

; Add Length property to Markers array
P := 0
SetFormat, FloatFast, 0.14 ; Time is higher than default precision of 6 decimal places
for index, Marker in Markers
	Marker["Length"] := -P + P := Marker.Time
I JUST spotted that... I'm gonna have to work on it again later... work at 3am just ain't no fun when coding gets the better of ya. Thank you for helping to direct me in this. I do appreciate the efforts and knowledge.

Post Reply

Return to “Ask for Help (v1)”