Search found 6163 matches

by lexikos
09 May 2019, 18:37
Forum: AutoHotkey v2 Development
Topic: Will AutoHotkey v2 Syntax Be More Confusing For Newbies?
Replies: 54
Views: 1035

Re: Will AutoHotkey v2 Syntax Be More Confusing For Newbies?

I disagree with the points of view that any part of v1 is easier or less confusing. v2 requires learning a few trivial things earlier on (like how to quote strings), but in the process removes so many points of confusion that v1 retains. Label, Gosub, Return are easier to understand and use than fun...
by lexikos
09 May 2019, 18:12
Forum: AutoHotkey v2 Development
Topic: [a101] querying instance var tries to call method instead, bug? Topic is solved
Replies: 5
Views: 134

Re: [a101] querying instance var tries to call method instead, bug? Topic is solved

If you find yourself getting a property just for its side-effects and not its value, you should re-think your design.
by lexikos
07 May 2019, 21:35
Forum: AutoHotkey v2 Development
Topic: [a101] UDFnObj .Call() excess params should throw maybe? Topic is solved
Replies: 7
Views: 220

Re: [a101] UDFnObj .Call() excess params should throw maybe? Topic is solved

The point is not to "work with varargs". Varargs would just be a workaround for the restriction placed by parameter count validation. Normally, there is one function definition and multiple callers. The author of the function decides which parameter it accepts and what they mean, so passing more is ...
by lexikos
07 May 2019, 06:19
Forum: Bug Reports
Topic: Omitting TickInterval's value (slider option)
Replies: 2
Views: 240

Re: Omitting TickInterval's value (slider option)

It seems to be a peculiarity of the Trackbar control that the ticks are not added until you set the range or tick interval, even if you set either setting to the value it should already have. Gui, Add, Text,, No messages sent Gui, Add, Slider, Section hwndh x150 yp w400 +0x1 Gui, Add, Text, xm, TBM_...
by lexikos
07 May 2019, 03:17
Forum: Wish List
Topic: Callable Func, BoundFunc, lambdas, custom user objs(ie no %%)
Replies: 25
Views: 1058

Re: Callable Func, BoundFunc, lambdas, custom user objs(ie no %%)

I might consider allowing () as an operator applied to any expression which is not otherwise recognized as a function call; however, it would have to be (var)() , not var() , otherwise valuable error checking is lost, and the function and variable namespaces become mixed. I'm pretty sure this was al...
by lexikos
07 May 2019, 03:05
Forum: AutoHotkey v2 Development
Topic: [a101] Crash when debug with GUI Topic is solved
Replies: 2
Views: 126

Re: [a101] Crash when debug with GUI Topic is solved

The problem is that the built-in objects are ignoring the "max depth" argument from the debugger, so if Gui.FocusedCtrl is non-empty, Gui.FocusedCtrl and GuiControl.Gui create an infinite loop. It will be fixed. If the debugger was to take the focus away from the GUI before updating the variable lis...
by lexikos
06 May 2019, 22:23
Forum: AutoHotkey v2 Development
Topic: [a101] UDFnObj .Call() excess params should throw maybe? Topic is solved
Replies: 7
Views: 220

Re: [a101] UDFnObj .Call() excess params should throw maybe? Topic is solved

It was intended behavior. Before variadic calls, there was no way to call a function with a variable number of parameters, so dynamic calls were permitted to pass more than the function accepts. It is still useful for calling callbacks where the callback author isn't required to define all parameter...
by lexikos
06 May 2019, 17:08
Forum: AutoHotkey v2 Development
Topic: Objects - preview of upcoming changes
Replies: 25
Views: 2564

Re: Objects - preview of upcoming changes

I have updated the script to utilize the __Item property added in v2.0-a101. The x.Item[y] properties are removed. Use x[y] instead. When the script performs recursion into a property, such as with obj.prop[y] or arr[x, y] , it now uses v[y] instead of v.Item[y] . To handle this in custom objects, o...
by lexikos
06 May 2019, 03:27
Forum: AutoHotkey v2 Development
Topic: AutoHotkey v2 alpha (UPDATES)
Replies: 57
Views: 34035

v2.0-a101-a9017f5

Merged pull requests from Helgef: #117: Improved validation of Menu options. #118: Changed ** (power) operator to throw an exception if both operands are zero. #121: Disabled unquoted arg and return types for DllCall. #124: Changed << and >> to throw an exception if the right-hand operand is outside...
by lexikos
30 Apr 2019, 07:54
Forum: AutoHotkey v2 Development
Topic: ProgramFiles variable | Type(A_LastError) | ProcessWaitClose Timeout | Run Return value
Replies: 6
Views: 337

Re: ProgramFiles variable | Type(A_LastError) | ProcessWaitClose Timeout | Run Return value

ErrorLevel is basically an ordinary super-global variable. ProgramFiles was partially reintroduced by accident when commit 019ab94d was merged into the alpha branch by commit b9b520a9. Prior to these commits, built-in variables were resolved by a very long if-else-if ladder. This was replaced by a t...
by lexikos
30 Apr 2019, 07:39
Forum: Announcements
Topic: Test build - InputHook, long paths, switch-case
Replies: 24
Views: 1469

Re: Test build - InputHook, long paths, switch-case

And every change which might make keylogging easier [...] InputHook does not make keyloggers easier [...] sometimes I'm wondering why you think that the changes in v1 are more important than v2 developement. Perhaps you have forgotten this: Besides inevitable [bug] fixes you should restrict your ac...
by lexikos
29 Apr 2019, 02:01
Forum: AutoHotkey v2 Development
Topic: ProgramFiles variable | Type(A_LastError) | ProcessWaitClose Timeout | Run Return value
Replies: 6
Views: 337

Re: ProgramFiles variable | Type(A_LastError) | ProcessWaitClose Timeout | Run Return value

For Run, there are two reasons I have not shifted the OutputVarPID to the return value: RunWait returns the exit code but also has OutputVarPID. (But Batch uses ErrorLevel for the exit code, and that's probably the origin of our ErrorLevel...) I consider having Run return something like WScript.Shel...
by lexikos
28 Apr 2019, 01:36
Forum: Wish List
Topic: custom function direct to object
Replies: 6
Views: 315

Re: custom function direct to object

No, it is not simple. The current implementation can't handle this, let alone parsing a full class ( or function ) body within an expression. There is no chance that I will implement this in v1 . For starters, I would need to first re-implement nested functions, otherwise you would never be able to ...
by lexikos
27 Apr 2019, 16:46
Forum: Wish List
Topic: custom function direct to object
Replies: 6
Views: 315

Re: custom function direct to object

An anonymous function would either omit the name or use the keyword Func. It would not create a "new" function (I guess that may be what the name you gave it is intended to imply). Whether named or not, whether embedded in an expression or not, the function is created at load time and you merely sto...
by lexikos
27 Apr 2019, 16:27
Forum: Announcements
Topic: Test build - InputHook, long paths, switch-case
Replies: 24
Views: 1469

Re: Test build - InputHook, long paths, switch-case

just me I think what you are insinuating is that no one needs this, or that functionality that can be used for keylogging is inherently bad. What do you hope to accomplish by asking your question? InputHook improves the flexibility and reliability of existing capabilities. Among other things, it ma...
by lexikos
26 Apr 2019, 00:35
Forum: AutoHotkey v2 Development
Topic: fat function in class method changes var outside itsscope
Replies: 59
Views: 3302

Re: fat function in class method changes var outside itsscope

:facepalm:

All code written in the AutoHotkey language is script code.

But not all script code gets executed.
by lexikos
24 Apr 2019, 22:06
Forum: AutoHotkey v2 Development
Topic: fat function in class method changes var outside itsscope
Replies: 59
Views: 3302

Re: fat function in class method changes var outside itsscope

btw, I understand obj.key returns string not an address, but why dont we have unified syntax here allowing to get address of obj's property with & operator: &obj.key the same way it works with variables? The expression var does not return a value, but a variable reference . It is not dereferenced u...
by lexikos
24 Apr 2019, 19:42
Forum: Announcements
Topic: Test build - InputHook, long paths, switch-case
Replies: 24
Views: 1469

Re: Test build - InputHook, long paths, switch-case

Rather the contrary in [my opinion], since you cannot have {Key up} as endkey or have !{key} to mean alt + key. So these two lists of keys should have different syntax because the functions using them have different capabilities? What if we want to add this capability down the track? In that case, ...

Go to advanced search