Search found 260 matches

by Micromegas
28 Sep 2023, 09:56
Forum: Ich brauche Hilfe
Topic: Umgang mit case-sensitiven ini-Dateien
Replies: 5
Views: 2257

Re: Umgang mit case-sensitiven ini-Dateien

[…] dass man das wirklich nur mit der "Holzhackermethode" lösen kann. […] Es gibt auch eine ❀Blumenpflückerinnenmethode❀: In der INI-Datei zu Großbuchstaben ein sonst wenig gebrauchtes Zeichen hinzufügen, und dieses vor dem Aufruf von IniRead ersetzen. Zum Beispiel ein ^ voranstellen. Oder, was mir...
by Micromegas
07 Sep 2023, 03:32
Forum: Ask for Help (v1)
Topic: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved
Replies: 23
Views: 2161

Re: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved

Nice! Thanks for both the idea and the implementation, which is better than what i came up with. (I tried to generate the needle with a loop, and relied on the RegExMatch to do the loop. That might be a bit more efficient, but the return value confused me; i didn't get just one call per callout, as ...
by Micromegas
06 Sep 2023, 11:15
Forum: Ask for Help (v1)
Topic: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved
Replies: 23
Views: 2161

Re: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved

Is using multi needles and testing for each separately, a possibility, or out of the question? That's what i'm considering. It's extra work and a performance drain, of course, but it should get the job done. Or maybe addition/nested grouping? Haven't thought of that. By the latter, you mean nested ...
by Micromegas
06 Sep 2023, 10:14
Forum: Ask for Help (v1)
Topic: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved
Replies: 23
Views: 2161

Re: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved

[…] once the match fails the first time […] it does not continue any further checks. This seems related to my second bullet of 2:58 am. You showed that what I wrote then was too narrow: One can tweak the needle so that a different subpattern fails first. But what i need is simply the mark for the f...
by Micromegas
06 Sep 2023, 08:18
Forum: Ask for Help (v1)
Topic: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved
Replies: 23
Views: 2161

Re: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved

Does this sound accurate? Yes, thanks. I also agree that the condition that the whole string must match reduces the usefulness of the "Mark" feature. But i can still imagine some limited use in a case like this: needle := "(?:a(*MARK:found_a))|(?:[^a.](*MARK:found_something_else))" Call_Match(".......
by Micromegas
06 Sep 2023, 06:17
Forum: Ask for Help (v1)
Topic: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved
Replies: 23
Views: 2161

Re: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved

boiler wrote:
06 Sep 2023, 06:13
@andymbody — This is the v2 section. You posted v1 code in reply.
Yes, but it's only one character change: Just leave out the %.
by Micromegas
06 Sep 2023, 06:15
Forum: Ask for Help (v1)
Topic: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved
Replies: 23
Views: 2161

Re: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved

andymbody wrote:
06 Sep 2023, 06:05
This return "2" as requested. Does this work?
No. It simply returns 2 because you left out the mark 3. It still returns nothing if there is no match for Charlie.
by Micromegas
06 Sep 2023, 06:04
Forum: Ask for Help (v1)
Topic: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved
Replies: 23
Views: 2161

Re: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved

I could be wrong, but I think your needle is gibberish (not formatted correctly). What specifically would you like to extract from the string "<a hello> <b world> <x !>" I think the needle is well formatted, but it expects a different haystack, namely the same with "c" instead of "x". That is just ...
by Micromegas
06 Sep 2023, 05:58
Forum: Ask for Help (v1)
Topic: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved
Replies: 23
Views: 2161

Re: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved

With non-capturing subpatterns (?: … )|(?: alternative ) around each row one can achieve that only the marks of matches are exposed. But there are two problems with that: It's quite intricate to devise the alternative for each row. If the last case (Charlie) matches, it will just return c , so that ...
by Micromegas
06 Sep 2023, 04:49
Forum: Ask for Help (v1)
Topic: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved
Replies: 23
Views: 2161

Re: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved

To be more specific: It's straightforward that (*MARK:NAME) is a text to be inserted in the NeedleRegEx. But I'm missing further details. In particular: Can that be only used for complete matches? For example in the following code: iPos := RegExMatch("<a hello> <b world> <x !>", "OsiU)" . "(*MARK:0)...
by Micromegas
06 Sep 2023, 03:47
Forum: Ask for Help (v1)
Topic: ‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved
Replies: 23
Views: 2161

‘(*MARK:NAME)’ for RegEx Match.Mark Topic is solved

The RegExMatch doc says
Match.Mark: Returns the NAME of the last encountered (*MARK:NAME), when applicable.
Is (*MARK:NAME) documented anywhere?


[Mod action: Moved topic to the v1 section since the v2 version was abandoned later in the thread and a full v2 script was never posted.]
by Micromegas
26 Jun 2023, 07:47
Forum: Ask for Help (v1)
Topic: v2.0.3 conflicting with v1 Topic is solved
Replies: 3
Views: 408

Re: v2.0.3 conflicting with v1 Topic is solved

Thanks for the idea of asking the program for A_AhkPath . It now tells me C:\Program Files\AutoHotkey\v2\v1.1.36.02\AutoHotkeyU64.exe . By contrast, C:\Program Files\AutoHotkey\AutoHotkeyU64.exe still exists, but that has a modified time of June 2022, while the file at the new location is from last ...
by Micromegas
26 Jun 2023, 03:56
Forum: Ask for Help (v1)
Topic: v2.0.3 conflicting with v1 Topic is solved
Replies: 3
Views: 408

v2.0.3 conflicting with v1 Topic is solved

When I first installed v2 half a year ago, the two worked fine side by side - until now. Now I wanted to update to 2.0.3 (but instead of updating I installed it again). Since then v1 doesn't find the standard library anymore. I now get errors like the following: Error: Call to nonexistent function. ...
by Micromegas
26 Jan 2023, 12:57
Forum: Ask for Help (v1)
Topic: Simple RegEx error
Replies: 2
Views: 220

Re: Simple RegEx error

Sorry, my bad: I had a non-printable character before the variable name. (I remember having the same problem two years ago, when someone here pointed it out.)
by Micromegas
26 Jan 2023, 12:40
Forum: Ask for Help (v1)
Topic: Simple RegEx error
Replies: 2
Views: 220

Simple RegEx error

I can't believe I'm having a problem with this very simple RegExMatch() call: #NoEnv #SingleInstance force #Warn sHaystack := "abcyxw" iMatch := RegExMatch(sHaystack, "^(?P<Begin>.+)y", Match) if iMatch sMatch := MatchBegin else sMatch := "(nothing)" MsgBox % "iMatch=" iMatch "`nsMatch=""" sMatch ""...
by Micromegas
11 Dec 2022, 14:48
Forum: Ask for Help (v1)
Topic: How to set file properties?
Replies: 9
Views: 3847

Re: How to set file properties?

Good question. Unfortunately, I can't remember now what I did. Most likely I abandoned the functionality that I wanted to achieve. Sorry that I can't give you a better answer.
by Micromegas
14 Nov 2022, 10:37
Forum: Ask for Help (v1)
Topic: initialization in a library Topic is solved
Replies: 5
Views: 579

Re: initialization in a library Topic is solved

Thank you! This works with the following caller.ahk:

Code: Select all

#Warn 

#Include %A_ScriptDir%	; when both files are in the same directory, as for this test.
#include callee.ahk

callee.tell()
by Micromegas
14 Nov 2022, 03:03
Forum: Ask for Help (v1)
Topic: initialization in a library Topic is solved
Replies: 5
Views: 579

Re: initialization in a library Topic is solved

Thank you for your prompt reply. Please don't be scared; it's well possible that there's something simple i overlooked. And for this example you're right: #include should work. But my example was oversimplified. So, sorry, it is getting more complicated, after all: In reality, I have several librari...
by Micromegas
14 Nov 2022, 02:06
Forum: Ask for Help (v1)
Topic: initialization in a library Topic is solved
Replies: 5
Views: 579

Re: initialization in a library Topic is solved

Any ideas? This seemed like such a basic question to me that i was a bit embarrassed to ask.

Go to advanced search