Search found 3162 matches

by Helgef
Yesterday, 09:27
Forum: Ask For Help
Topic: [Objects] - Clone() bug? Topic is solved
Replies: 15
Views: 216

Re: [Objects] - Clone() bug? Topic is solved

I do not think it does, clone that is, it will not be a problem in v2 if (when?) binary objects are added. Edit , perhaps not as trivially as I suggested :roll: . Cheers. Now I know why my FastMatrix library started throwing Access Violations left and right... I'm an idiot :( . Glad you found the pr...
by Helgef
Yesterday, 07:59
Forum: Ask For Help
Topic: [Objects] - Clone() bug? Topic is solved
Replies: 15
Views: 216

Re: [Objects] - Clone() bug? Topic is solved

The original function would never return even if this limitation didn't exist, so it is still a problem of the original function, which my version fixes. Your point about the depth issue is the most important point though, but I guess circular references is the most common case which will cause you ...
by Helgef
Yesterday, 07:50
Forum: AutoHotkey v2 Development
Topic: OutputDebug
Replies: 3
Views: 162

Re: OutputDebug

Hello. I'm quite neutral in the matter of dbgXXX vs debugXXX . Just to note, there is already sort of a convention in naming functions, that is a three letter abbreviation, eg, strXXX , winXXX , maybe others. In any case, it could be nice to have a positional directive to enable / disable / set opti...
by Helgef
Yesterday, 05:49
Forum: Ask For Help
Topic: (solved) If-Or Multi Match Syntax? if (x=1 OR x=2 OR x=3) Topic is solved
Replies: 13
Views: 212

Re: (solved) If-Or Multi Match Syntax? if (x=1 OR x=2 OR x=3) Topic is solved

you didn't pay attention to jeeswg's example, that will match, eg, var := "helpX". To note, if you like to use ~= or regexmatch, you can prefix the needle with i), to make it case insensitive.

Cheers.
by Helgef
Yesterday, 03:39
Forum: AutoHotkey v2 Development
Topic: undefined type
Replies: 2
Views: 106

Re: undefined type

Hello nnnik , thanks for sharing your ideas. It can be checked if it is of it's own type and it can be assigned to variables, though whenever it is used in any other way it will throw an error - even when evaluating it to boolean or checking it for other types. This seems very appropriate :thumbup:....
by Helgef
Yesterday, 03:32
Forum: Ask For Help
Topic: [Objects] - Clone() bug? Topic is solved
Replies: 15
Views: 216

Re: [Objects] - Clone() bug? Topic is solved

No What do you mean No? That is what you said, and what I agreed with, i.e., the excessive recursion is the problem. I clearified that circular references causes this. Cheers. Edit: I suppose you mean that my version of the function doesn't fix the function, it was only mean to handle circular refe...
by Helgef
Yesterday, 03:12
Forum: Offtopic
Topic: your personal AutoHotkey style guide
Replies: 67
Views: 3219

Re: your personal AutoHotkey style guide

using To make no sense imo. I'd do it like this, hwnd := hwnds[ pid ], it clearly shows the association between pid and hwnd in a list of hwnds. When you first create the hwnds array, make a comment describing it. Prefixing o or v only clutters the view imo.

Cheers.
by Helgef
Yesterday, 03:01
Forum: Ask For Help
Topic: [Objects] - Clone() bug? Topic is solved
Replies: 15
Views: 216

Re: [Objects] - Clone() bug? Topic is solved

That is more precise, yes :thumbup: . The problem with circular references is that it causes infinite recursion.
by Helgef
Yesterday, 02:58
Forum: Ask For Help
Topic: Extracting numbers from string Topic is solved
Replies: 6
Views: 167

Re: Extracting numbers from string Topic is solved

i is static. An error would be more appropriate.

Cheers.

Edit: it is an error in v2 :thumbup:
by Helgef
Yesterday, 02:49
Forum: Ask For Help
Topic: traditional for loop: for i = a to b (step c) possibilities
Replies: 18
Views: 648

Re: traditional for loop: for i = a to b (step c) possibilities

Being used to choose my own loop variables, when I first saw A_Index, I thought it was joke. At least it has the benefit of syntax highlighting and recogniseability.

Cheers.
by Helgef
Yesterday, 02:39
Forum: Ask For Help
Topic: (solved) If-Or Multi Match Syntax? if (x=1 OR x=2 OR x=3) Topic is solved
Replies: 13
Views: 212

Re: (solved) If-Or Multi Match Syntax? if (x=1 OR x=2 OR x=3) Topic is solved

I would go for matchlist over ~= for readbility and maintainability, the latter looks like a joke imo. Matchlist might be faster, but in most cases, insignificant (guess). Function example, superior for maintainability, readability and convenience, varIsInList(var, list*){ for k, item in list if ( v...
by Helgef
Yesterday, 02:30
Forum: Ask For Help
Topic: list keys and their shift equivalents Topic is solved
Replies: 2
Views: 51

Re: list keys and their shift equivalents Topic is solved

:arrow: Related topic . Example, very limited testing, toUnicode(key, kbd := '', capslock := false) { ; Url: ; - https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-tounicode local static cchBuff := 3 varsetcapacity lpKeyState, 256, 0 if isobject(kbd) for k, key in kbd numput 128...
by Helgef
19 Sep 2018, 05:42
Forum: Ask For Help
Topic: Extracting numbers from string Topic is solved
Replies: 6
Views: 167

Re: Extracting numbers from string Topic is solved

This doesn't do what you think,

Code: [Select all]GeSHi © Codebox Plus

local static i := 1

Check listvars.

Cheers.
by Helgef
19 Sep 2018, 05:37
Forum: Scripts and Functions
Topic: quantiles: list first number, last number, and numbers in-between
Replies: 2
Views: 112

Re: quantiles: list first number, last number, and numbers in-between

- If there are any similar scripts it would be interesting to know.

The same, although, mine is more efficient.

Cheers.
by Helgef
19 Sep 2018, 05:25
Forum: Ask For Help
Topic: [Objects] - Clone() bug? Topic is solved
Replies: 15
Views: 216

Re: [Objects] - Clone() bug? Topic is solved

It doesn't handle circular references. ( meaning it is neither safe nor reliable for general use) Cheers. Edit: Not tested, ObjFullyClone(obj, z := "") { if !z z := [] nobj := obj.Clone() for k,v in nobj if IsObject(v) && !z.haskey(v) z[v]:="", nobj[k] := A_ThisFunc.(v, z...
by Helgef
19 Sep 2018, 02:25
Forum: AutoHotkey v2 Development
Topic: Math Functions
Replies: 16
Views: 392

Re: Math Functions

The number is a double anyways. Specifying a less accurate number will only make make the result less accurate, not one bit faster. Unless you take, eg, pi as 3, and only make calculations with integer and integer results.
by Helgef
17 Sep 2018, 14:08
Forum: Wish List
Topic: [Request]: Official Library & Wrapper
Replies: 54
Views: 1032

Re: [Request]: Official Library & Wrapper

If it is official, it should come with the installer, and be optional to install to the lib folder. Ahk_h comes with libs if I'm not mistaken.

Cheers.
by Helgef
17 Sep 2018, 09:23
Forum: Ask For Help
Topic: (solved) If-Or Multi Match Syntax? if (x=1 OR x=2 OR x=3) Topic is solved
Replies: 13
Views: 212

Re: (solved) If-Or Multi Match Syntax? if (x=1 OR x=2 OR x=3) Topic is solved

I'd use if var in matchlist over ~=. Alternative, a variadic function plus for loop, it is much simpler., avoids strings. In / contains are not Deprecated.

Cheers.
by Helgef
15 Sep 2018, 13:08
Forum: AutoHotkey v2 Development
Topic: <> no longer acceptable as a comparison operator
Replies: 35
Views: 641

Re: <> no longer acceptable as a comparison operator

Thanks, Helgef. Do you know what the thinking was on removing it? Hello, I didn't mean to ignore your question, I've been afk. There was a few mentions here . - I would keep <> for these reasons: Hello jeeswg :wave: . - I haven't heard one good reason to remove <>. One good reason is because you wa...
by Helgef
15 Sep 2018, 11:54
Forum: AutoHotkey v2 Development
Topic: Exceptions (for unknown properties, more)
Replies: 6
Views: 186

Re: Exceptions (for unknown properties, more)

Hello :wave:. I'm all for better identification of the type of exception being thrown, however, imo, less precise information is better than no information at all. Also, mostly I do not want to handle exceptions like call to non-existent method in any other way than correcting a coding mistake. The ...

Go to advanced search