Search found 28 matches

by OliverK
04 Mar 2024, 05:47
Forum: Ask for Help (v2)
Topic: Passing properties of an object WITHIN an object between functions
Replies: 12
Views: 381

Re: Passing properties of an object WITHIN an object between functions

No, there are always other hacks. For instance, if the property corresponds to an actual variable, you can use a reference to that variable instead of a reference to the property. I demonstrated this in the topic Byref Array elements (Wish List) . (You still can't use the syntax &this.myvar .) Inte...
by OliverK
01 Mar 2024, 05:16
Forum: Ask for Help (v2)
Topic: Passing properties of an object WITHIN an object between functions
Replies: 12
Views: 381

Re: Passing properties of an object WITHIN an object between functions

It is not possible to construct a VarRef for a property of an object (such as foo.bar ), A_Clipboard or any other built-in variable, so those cannot be passed ByRef. Source: Functions - Definition & Usage | AutoHotkey v2 This is because a property is not a variable, and VarRef doesn't support the l...
by OliverK
13 Feb 2024, 08:40
Forum: Ask for Help (v2)
Topic: Passing properties of an object WITHIN an object between functions
Replies: 12
Views: 381

Re: Passing properties of an object WITHIN an object between functions

So... no idea at the moment how to properly pass object properties via references in a method's parameters?
by OliverK
13 Feb 2024, 05:42
Forum: Ask for Help (v2)
Topic: Passing properties of an object WITHIN an object between functions
Replies: 12
Views: 381

Re: Passing properties of an object WITHIN an object between functions

this.GetsCalled(this.myvar) this.myvar isn't an object reference but a property getter, so you pass the string "teststring2" to the GetsCalled() method. On the other hand &this.myvar passes a VarRef of a temporary variable containing that string. Well, @this.myvar was the first thing I tried, but i...
by OliverK
13 Feb 2024, 05:37
Forum: Ask for Help (v2)
Topic: Buffer cannot be cloned. Bug?
Replies: 13
Views: 367

Re: Buffer cannot be cloned. Bug?

What would you do with a cloned buffer? Clone creates a shallow copy of an object, i.e. 'each property or method owned by the object is copied into the clone'. The Buffer object has two special properties, Ptr and Size . The memory block assigned to the buffer doesn't seem to be an own property. So...
by OliverK
13 Feb 2024, 03:10
Forum: Ask for Help (v2)
Topic: Passing properties of an object WITHIN an object between functions
Replies: 12
Views: 381

Re: Passing properties of an object WITHIN an object between functions

Objects are always passed by reference, so there's no point in passing them via &. Yes, this would've been my assumption too regarding my experience in other languages. But.. Class TESTME2 { myvar := "teststring2" MyFunction() { this.GetsCalled(this.myvar) msgbox this.myvar } GetsCalled(myvarrefnam...
by OliverK
13 Feb 2024, 03:05
Forum: Ask for Help (v2)
Topic: Buffer cannot be cloned. Bug?
Replies: 13
Views: 367

Re: Buffer cannot be cloned. Bug?

In addition to the methods and property inherited from Object , Buffer objects have the following predefined properties. Nowhere does it say that not all methods are inherited, or any of them are overridden. This may be true but that it "must inherit" all the methods and properties is not correct a...
by OliverK
13 Feb 2024, 02:27
Forum: Ask for Help (v2)
Topic: Buffer cannot be cloned. Bug?
Replies: 13
Views: 367

Re: Buffer cannot be cloned. Bug?

teadrinker wrote:
12 Feb 2024, 17:33
Buffer extends Object and must inherit all of its methods and properties, including the Clone() method.
"Must"? Are you sure about that?

Methods can be overwritten, at least as far as I know.

Don't know why in this case though..
by OliverK
13 Feb 2024, 01:55
Forum: Ask for Help (v2)
Topic: Passing properties of an object WITHIN an object between functions
Replies: 12
Views: 381

Re: Passing properties of an object WITHIN an object between functions

Ah, well.. okay.. this works, but it's no solution to my "real" problem (.. but I didn't state my REAL problem which led me to the originating post as far as I see... so.. my fault). In this case, you have to know already that you want to address "this.myvar". Passing a reference as a parameter woul...
by OliverK
12 Feb 2024, 11:51
Forum: Ask for Help (v2)
Topic: Passing properties of an object WITHIN an object between functions
Replies: 12
Views: 381

Passing properties of an object WITHIN an object between functions

Hello. Just a (simple?) question.. how to pass a property of a class (or the object based on the class) WITHIN a function call ? Something like #Requires AutoHotkey v2.0 testinstance := TESTME() testinstance.MyFunction() Class TESTME { myvar := "teststring" MyFunction() { this.GetsCalled(&this.myvar...
by OliverK
15 Aug 2023, 03:54
Forum: Visual Studio Code
Topic: No outline anymore... Topic is solved
Replies: 3
Views: 1626

Re: No outline anymore... Topic is solved

Short update.. this was the solution. Thanks!
by OliverK
11 Aug 2023, 11:42
Forum: Visual Studio Code
Topic: No outline anymore... Topic is solved
Replies: 3
Views: 1626

Re: No outline anymore... Topic is solved

thqby wrote:
11 Aug 2023, 05:00
Maybe you need vscode-autohotkey2-lsp, this is a vscode extension that is compatible with v2.
I'll look into this.. thanks!
by OliverK
11 Aug 2023, 03:52
Forum: Visual Studio Code
Topic: No outline anymore... Topic is solved
Replies: 3
Views: 1626

No outline anymore... Topic is solved

Hello, I'm using the latest VSCode and the extensions AutoHotkey Plus Plus and AutoHotKey Debug.. and my outline subwindow keeps telling me ""No symbols found in document.." no matter which AHK file I load (V2 only, I don't use V1 any more) Debugging and auto-formatting seems to work (but no paramet...
by OliverK
11 Aug 2023, 03:33
Forum: Visual Studio Code
Topic: AutoHotkey Plus Plus author here :)
Replies: 16
Views: 4169

Re: AutoHotkey Plus Plus author here :)

Seeing the indention there in the unfolded block.. how can you avoid that the curly braces are indented? It's not my style, never seen that to be honest.. So: if(a = b) ...{ ......; do something ...} should be: if(a = b) { ...; do something } (.) just placeholders for space Everytime I have to move ...
by OliverK
10 Aug 2023, 10:18
Forum: Ask for Help (v2)
Topic: ListView and editable columns other than column 1 ..
Replies: 2
Views: 253

Re: ListView and editable columns other than column 1 ..

Thanks! I've looked for the topic via the the forum search function, but for whatever reason I didn't find it there.
by OliverK
10 Aug 2023, 02:23
Forum: Ask for Help (v2)
Topic: ListView and editable columns other than column 1 ..
Replies: 2
Views: 253

ListView and editable columns other than column 1 ..

Hello everyone,

I know there was a class for ListViews to enable editing of ListView columns other than column 1.. but it is for V1 only, of course.

Did anyone bother to convert it to V2 or is there an alternative available?

Thanks!
by OliverK
24 Apr 2023, 15:29
Forum: Ask for Help (v2)
Topic: RELIABLE way to identify if an audio device can record audio?
Replies: 18
Views: 1501

Re: RELIABLE way to identify if an audio device can record audio?

you guys are amazing. I had a similar problem to these problems myself within the past couple of days. I also found the VA library, and I also considered converting it or partially converting it for my needs, but up to now I've been too lazy to really dig into it. Instead I found a NirSoft tool tha...
by OliverK
19 Apr 2023, 22:09
Forum: AutoHotkey Development
Topic: [Sugguestion] add Missing code - Default_Recording device
Replies: 4
Views: 1041

Re: [Sugguestion] add Missing code - Default_Recording device

Ah, well.. didn't recognize you're the same person from the other thread... :P >>"Like a loop going throught all numbers until it mutes em all." Well, if you WANT to realize it in such a kind of "brute-force-way" you could put the SoundSetMute call within a "try" block and let it fail silently if it...
by OliverK
19 Apr 2023, 00:03
Forum: AutoHotkey Development
Topic: [Sugguestion] add Missing code - Default_Recording device
Replies: 4
Views: 1041

Re: [Sugguestion] add Missing code - Default_Recording device

Dealing with audio devices is quite a complex topic in Windows... looking in source code of comparable solutions (even official Microsoft ones like "Microsoft Power Toys") shows that there's a lot of stuff which has to be done to enumerate devices, identifying them (and their capabilities) and so on...
by OliverK
18 Apr 2023, 23:56
Forum: Ask for Help (v2)
Topic: Voice activated AHK scripts
Replies: 4
Views: 602

Re: Voice activated AHK scripts

I've never worked with Microsoft voice recognition beforce.. but one idea would be: IF the voice recognition can identify single letters, then I would just use hotstrings in AHK to trigger your code.. or call other programs and stuff.

Go to advanced search