Search found 86 matches

by sirksel
18 Sep 2020, 08:14
Forum: Bug Reports
Topic: [a122] wrong string property call when string is name of func
Replies: 1
Views: 259

[a122] wrong string property call when string is name of func

Am I missing something obvious here? Seems like all strings should work the same and call the property defined for String. When the string happens to be the name of the function, it calls the property defined for Func. Is there possibly a bug in the Func("Name") optimization code, or is this the exp...
by sirksel
05 Sep 2020, 08:15
Forum: AutoHotkey v2 Help
Topic: overriding inherited property with value Topic is solved
Replies: 2
Views: 159

overriding inherited property with value Topic is solved

I know one can override a calculated property in a subclass by simply redefining the calculated property. Is there any way to revert back from a calculated to non-calculated property (value property or member access or whatever the correct term is)? I've tried various ways, but I keep getting the "p...
by sirksel
23 Aug 2020, 20:36
Forum: AutoHotkey v2 Help
Topic: [a122] InputHook issues
Replies: 6
Views: 1954

Re: [a122] InputHook issues

Wow! Thanks for the explanation. I do get the point that Critical and InputHook don't seem to work well together for the reasons you outline. By the way, except for this issue with InputHook, I've never had another issue with timers/hotkeys/hotstrings in lots of other contexts in this script (which ...
by sirksel
22 Aug 2020, 10:20
Forum: AutoHotkey v2 Help
Topic: [a122] InputHook issues
Replies: 6
Views: 1954

Re: [a122] InputHook issues

Maybe not quite fixed. I have one more issue. When I put this code back into my main script, it still worked in an unexpected way. I traced it down to an interaction with Critical . Here's the code: ;critical 10 ;UNCOMMENT THIS LINE TO CAUSE EARLY TERMINATION inp(len:=-1, tmo:=2.0, tmi:=1.0) ;input ...
by sirksel
15 Aug 2020, 13:35
Forum: AutoHotkey v2 Help
Topic: [a122] InputHook issues
Replies: 6
Views: 1954

Re: [a122] InputHook issues

Thanks, Lexikos. One * did the trick! Everything works as expected. I pulled this from some older code I hadn't run in a while, and I didn't even think about the fact that surplus parameters are no longer allowed. Must have been pre-a103 that I last ran this. I think the * handling is much better (e...
by sirksel
15 Aug 2020, 04:13
Forum: AutoHotkey v2 Help
Topic: [a122] InputHook issues
Replies: 6
Views: 1954

[a122] InputHook issues

I'm not sure if this is a bug, or my lack of understanding of the docs. Probably the latter... The help file for InputHook.Timeout says that "The timeout period ordinarily starts when Start is called, but will restart if this property is assigned a value while Input is in progress." The following is...
by sirksel
14 Aug 2020, 15:14
Forum: Bug Reports
Topic: [a119] bug: truthy evaluation of byref empty string Topic is solved
Replies: 2
Views: 1416

Re: [a119] bug: truthy evaluation of byref empty string Topic is solved

As of a121, this is fixed! Thank you.
For some reason, I'm unable to mark this topic solved. The button is missing...
by sirksel
08 Aug 2020, 07:44
Forum: Bug Reports
Topic: [a119] bug: truthy evaluation of byref empty string Topic is solved
Replies: 2
Views: 1416

[a119] bug: truthy evaluation of byref empty string Topic is solved

Seems only to be a problem when passing byref:

Code: Select all

x := ''
msgbox (x == '') ':' (!x)   ; 1:1
f(x), g(x)

f(byref v) {
  msgbox (v == '') ':' (!v)  ; BUG: 1:0
}

g(v) {
  msgbox (v == '') ':' (!v)  ; 1:1
}
Possibly related to the closure issues posted in a previous thread, but possibly not.
by sirksel
24 Jun 2020, 04:19
Forum: Bug Reports
Topic: [a112] from [a109] conversion issue
Replies: 7
Views: 2106

Re: [a112] from [a109] conversion issue

lexikos and swagfag Sorry friends... I pulled my post down (since it was the last) to try to make it shorter , but I didn't realize you were answering at the same time. The original post is below. You are correct, lexikos. It was a test class. =============================== SOLVED. I wasn't trying...
by sirksel
22 Jun 2020, 14:49
Forum: Bug Reports
Topic: [a112] from [a109] conversion issue
Replies: 7
Views: 2106

Re: [a112] from [a109] conversion issue

Helgef I've figured out why, I think, the error exists. The function is also named xl() . If I change the variable name to any other super-global name, it works. I thought this always worked before because the function namespace was separate. I referred to xl to get to the super-global object refer...
by sirksel
22 Jun 2020, 07:49
Forum: Bug Reports
Topic: [a112] from [a109] conversion issue
Replies: 7
Views: 2106

[a112] from [a109] conversion issue

I keep getting an error with the following line, which doesn't really depend on anything. It worked in 109 but not 112. I can figure out the change that's affecting it. xl is a super-global and this appears in a function that refreshes that super-global. try return comobjtype(xl, 'iid') == 'Excel' ?...
by sirksel
21 Jun 2020, 17:44
Forum: AutoHotkey v2 Development
Topic: [wish] "non-simple" parameter defaults and constants, cont'd
Replies: 7
Views: 3971

Re: [wish] "non-simple" parameter defaults and constants, cont'd

Lexikos , this is great. Thanks! I love the idea of null or Nothing . I would especially love it if it were falsey upon evaluation, since missing OR blank/zero is such a common test. Similar to your discussion of Nothing, I currently use two sentinels: na and nl (super-global quasi-constants -- but...
by sirksel
21 Jun 2020, 08:45
Forum: AutoHotkey v2 Development
Topic: [wish] "non-simple" parameter defaults and constants, cont'd
Replies: 7
Views: 3971

Re: [wish] "non-simple" parameter defaults and constants, cont'd

lexikos , thanks for this. Sounds promising! I haven't used the latest version yet (need to update lots of code for the ErrorLevel changes...), but I have a question about unset . I apologize that I haven't tried it yet. For me, I'm thinking it might only get rid of my sentinel structures if it can...
by sirksel
03 Jun 2020, 12:18
Forum: Suggestions on documentation improvements
Topic: For..Until
Replies: 5
Views: 534

Re: For..Until

Right, I get it. I need to learn to read! :) Anyhow, maybe it's because such a construct doesn't exist with for-loops in several other languages I know... so I read right past those three words? I guess I wasn't actually proposing my little array snippet as an example for the docs. If you guys go do...
by sirksel
03 Jun 2020, 06:55
Forum: Suggestions on documentation improvements
Topic: For..Until
Replies: 5
Views: 534

For..Until

I just saw a sentence in the documentation I've never noticed before in a decade of using autohotkey, but apparently has been there since v1: "Until can be used with any Loop or For " (underline added) I always knew I could do Loop..Until, but I somehow never realized I could do this: a := [2,4,6,8,...
by sirksel
03 Jun 2020, 03:45
Forum: AutoHotkey v2 Help
Topic: __New/__Init Questions
Replies: 6
Views: 573

Re: __New/__Init Questions

Got it. This helps a lot. Thanks Helgef!
by sirksel
03 Jun 2020, 02:13
Forum: AutoHotkey v2 Help
Topic: __New/__Init Questions
Replies: 6
Views: 573

Re: __New/__Init Questions

Excellent. Thanks, Helgef. I'm just cleaning up code as I'm transferring it to the latest alpha, so I'm trying fix little issues as I see them. 1. To clarify my question just a bit, there's no reason you'd ever set _x in both places: class test { _x := 0 ;this just slows things down, right? _y := 0 ...
by sirksel
02 Jun 2020, 21:24
Forum: AutoHotkey v2 Help
Topic: __New/__Init Questions
Replies: 6
Views: 573

__New/__Init Questions

1. Class body instance var declaration vs. New() assignments: Is there any reason (aside from documentation) to initialize a (non-accumulating) instance variable in the class body that's going to be assigned anyhow in __New() based on a parameter? 2. __Init: Is there any special functionality that c...
by sirksel
28 May 2020, 17:23
Forum: AutoHotkey v2 Help
Topic: Replacement for ObjRawGet as "Safe" Property Get? Topic is solved
Replies: 3
Views: 708

Re: Replacement for ObjRawGet as "Safe" Property Get? Topic is solved

Good point. My newer .sget(name, default:='') method is really a test of properties in the object or the base(s), while I had been using ObjRawGet for just testing the object itself. I see how your edited code is more closely tied to that original functionality. Thanks!
by sirksel
28 May 2020, 05:46
Forum: AutoHotkey v2 Help
Topic: Replacement for ObjRawGet as "Safe" Property Get? Topic is solved
Replies: 3
Views: 708

Replacement for ObjRawGet as "Safe" Property Get? Topic is solved

The purpose of ObjRawSet and ObjRawGet is unclear - they were used for both properties and associative arrays, but now only operate on properties. I hadn't decided between renaming them, removing them, or something else, so just tagged them as deprecated. Anyone updating (to the latest v2) old code...

Go to advanced search