increment numeric values in file content

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
mojobadshah
Posts: 25
Joined: 12 Nov 2019, 16:32

increment numeric values in file content

02 May 2020, 00:54

I want to increment numeric values in file content. I have already sorted out a list count ahk. What I like about it is that it lets me stdin-stdout from any file type to any file type and it reads its contents into a loop parse. I'm also trying to sort out a counter that will increment numeric values by 1 according to the same means. This is what I have put together:

Code: Select all

FileRead, H, C:\your path\Results

var := str

Loop, Parse, var, `n, `r
{
    RegexMatch(a_loopfield, "=(\d+)", m)
    str .= RegexReplace(a_loopfield, m, "=" m1+1)
}

FileAppend, % var, Results
What needs to happen in order for this RegexMatch increment function to maintain this FileRead, H, C:\ > regex loop parse > FileAppend composure?

[Mod edit: Provisional topic name added. Change as you wish!]

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 272 guests