Search found 2894 matches

by Helgef
32 minutes ago
Forum: AutoHotkey v2 Development
Topic: %Expr% [BUG] or [_3D_ not understood]
Replies: 9
Views: 80

Re: %Expr% [BUG] or [_3D_ not understood]

Because then you couldn't refer to a variable dynamically. Why do you want to remove it?
by Helgef
53 minutes ago
Forum: AutoHotkey v2 Development
Topic: %Expr% [BUG] or [_3D_ not understood]
Replies: 9
Views: 80

Re: %Expr% [BUG] or [_3D_ not understood]

There are no bugs here. The function is assume-local if it is nested inside another function, otherwise it is assume-global. Regarding Test 4) , as pointed out in the link I provided above, you need to refer to the variables non-dynamically inside a nested function in order for them to be visible (f...
by Helgef
Yesterday, 16:02
Forum: AutoHotkey v2 Development
Topic: %Expr% [BUG] or [_3D_ not understood]
Replies: 9
Views: 80

Re: %Expr% [BUG] or [_3D_ not understood]

Built in Variables are available everywhere, you can't declare them (eg local).
by Helgef
18 May 2018, 14:43
Forum: Scripts and Functions
Topic: [Script] Offline Docs: Go To Definition
Replies: 1
Views: 117

Re: [Script] Offline Docs: Go To Definition

Cool idea, I like it very much, I will put it in my misc script :thumbup:. Comments, I'd recommend clipboard := "" before send ^c and clipwait instead of sleep after. Also, I'd put a winwait ... after run , and then call activateHelpPasteFast after the winwait . You could use setkeydelay a...
by Helgef
16 May 2018, 15:00
Forum: Ask For Help
Topic: object classes: coding style
Replies: 14
Views: 301

Re: object classes: coding style

every larger piece of software that you use uses OOP
every function we write in ahk causes an instance of some Func class :D
- Btw how much do you like OOP? Do you think that OOP should get the Nobel Peace Prize?

:lol:

Cheers.
by Helgef
16 May 2018, 12:20
Forum: Ask For Help
Topic: [AHK_L v2] Localized K, V in for loop?
Replies: 7
Views: 144

Re: [AHK_L v2] Localized K, V in for loop?

msgbox but 'v' is back to %v% As expected, the value variable is not restored in v1. tl;dr if you aren't paying attention to scoping/naming foreach may mutate stuff you didn't intend it to Also in v2, you should not be fooled by the word localize , and believe that the variables are necessarily loc...
by Helgef
15 May 2018, 11:27
Forum: AutoHotkey v2 Development
Topic: Type mismatch. AutoHotkey_2.0-a096-2ad11cb
Replies: 11
Views: 299

Re: Type mismatch. AutoHotkey_2.0-a096-2ad11cb

Hello :wave: . ;... a:= b + 123 ;... Till now it was 123 if b == "" now exception ??? No it wasn't, non-numerics in math expressions was treated as an error and yielded an empty string. Even in v1 using non-numerics in math expressions are considered an error, according to the documentatio...
by Helgef
14 May 2018, 13:22
Forum: AutoHotkey v2 Development
Topic: Type mismatch. AutoHotkey_2.0-a096-2ad11cb
Replies: 11
Views: 299

Re: Type mismatch. AutoHotkey_2.0-a096-2ad11cb

If you clear your variable, you shouldn't use it in a math expression afterwards, luckily, we now get notified if we make such a mistake. This is the best thing that has happened to the language since sliced butter. Now, we only need var := "1" to behave the same way, that is, throw an exc...
by Helgef
14 May 2018, 13:15
Forum: Offtopic
Topic: OOP design patterns in AHK
Replies: 13
Views: 661

Re: OOP design patterns in AHK

Not sure I agree with the Singleton implementations in here. I think it is ok, and yours too, thanks for sharing :thumbup: c := this.__Class this._Instance := new %c%() You could do this ._Instance := new this ;). (yes, I highlighted it manually , for no particular reason) Cheers.
by Helgef
13 May 2018, 13:19
Forum: Ask For Help
Topic: unable to read IP_ADAPTER_UNICAST_ADDRESS substructure of GetAdaptersAddresses DLL call
Replies: 11
Views: 167

Re: unable to read IP_ADAPTER_UNICAST_ADDRESS substructure of GetAdaptersAddresses DLL call

Flipeador , do you have code which retrieves a pointer to such a memory location? This structure is not a true C-language structure because it contains variable-length members. This structure was created solely to depict the organization of data in a version resource and does not appear in any of t...
by Helgef
13 May 2018, 11:23
Forum: Ask For Help
Topic: Hold down CTRL+R keys repeat script
Replies: 7
Views: 89

Re: Hold down CTRL+R keys repeat script

Hello and good day :wave: .
#f11 this is windows key + f11.
Loop 3000 this is about 3000 times.
sleep, 50000 this is 50 seconds.
sleep 500 this is half a second :thumbup: .

Cheers.
by Helgef
13 May 2018, 11:16
Forum: Ask For Help
Topic: objects/object classes: new features from a newbie-friendly perspective
Replies: 25
Views: 735

Re: objects/object classes: new features from a newbie-friendly perspective

(a) sure, (b) perhaps, (c) no.

Intravenous feeding.
Regarding the order, it is well described here,
meta functions wrote:When the script gets, sets or calls a key which does not exist within the target object, the base object is invoked as follows:
[...]

Cheers.
by Helgef
13 May 2018, 05:38
Forum: Ask For Help
Topic: unable to read IP_ADAPTER_UNICAST_ADDRESS substructure of GetAdaptersAddresses DLL call
Replies: 11
Views: 167

Re: unable to read IP_ADAPTER_UNICAST_ADDRESS substructure of GetAdaptersAddresses DLL call

PIP_ADAPTER_UNICAST_ADDRESS(Ptr) { ; Reserved. Used by the compiler to align the structure Local Data := { Alignment: NumGet(Ptr+0, "UInt64") ; The length, in bytes, of this structure , Length: NumGet(Ptr+0, "UInt") } ; move this brace to the line above Return Data } See comment...
by Helgef
13 May 2018, 01:40
Forum: Ask For Help
Topic: objects/object classes: new features from a newbie-friendly perspective
Replies: 25
Views: 735

Re: objects/object classes: new features from a newbie-friendly perspective

Is that what you meant? [Please always be specific re. objects, the subject is too complicated and prone to cause misunderstandings. Plus I could spend all day trawling through the object documentation.] No. I'll be as clear or unclear as I like. Evidently, you should. obj := new %class% Any* opera...
by Helgef
12 May 2018, 12:14
Forum: Ask For Help
Topic: Array issue
Replies: 3
Views: 44

Re: Array issue

A_index is 0 when no loop is executing, your arrays have 1-based index.

Cheers.
by Helgef
12 May 2018, 10:22
Forum: AutoHotkey v2 Development
Topic: Inconsistent behavior of deref in closure Topic is solved
Replies: 3
Views: 142

Re: Inconsistent behavior of deref in closure Topic is solved

This behaviour is documented and works a expected, Dynamic variable references inside a nested function can resolve to variables from the outer function only if the nested function (or one of its own nested functions) also contains a non-dynamic reference to the variable. If we do some operation bef...
by Helgef
12 May 2018, 07:52
Forum: Ask For Help
Topic: How to use "Suspend, Permit" with single line subroutines? Topic is solved
Replies: 7
Views: 109

Re: How to use "Suspend, Permit" with single line subroutines? Topic is solved

I wouldn't convert massive scripts to v2 only for the purpose of using #suspendExempt.
can now AHKv2 handle the windows 8.1 alt tab (Task Switcher)?

I do not know. You can read about v2 here.

Good luck.

Go to advanced search