Search found 454 matches

by vvhitevvizard
30 Jul 2020, 14:06
Forum: AutoHotkey Development
Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Replies: 35
Views: 13511

Re: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved

Pseudo arrays should be done with anyways... two thumbs up. its batch-style remnants. BTW, the only use for %var% syntax I see with: 1. obj.%prop_name% (where prop_name var contains a string, it might be replaced with obj.getprop("string") , obj.setprop("string", value) methods or something like th...
by vvhitevvizard
30 Jul 2020, 11:30
Forum: AutoHotkey Development
Topic: Remove Gui.Add("Ctrl", ...) or Gui.AddCtrl(...)?
Replies: 16
Views: 6144

Re: Remove Gui.Add("Ctrl", ...) or Gui.AddCtrl(...)?

In my opinion, addCtrl is shorter than add 'Ctrl' :angel:. the latter is more suitable to build controls programmatically . I, for one, would like to have all the .add method's string parameters to be controlled via separate method calls, in addition to the existing syntax. gc.bgcolor() , gc.fontfa...
by vvhitevvizard
30 Jul 2020, 11:17
Forum: AutoHotkey Development
Topic: Remove Gui.Add("Ctrl", ...) or Gui.AddCtrl(...)?
Replies: 16
Views: 6144

Re: Remove Gui.Add("Ctrl", ...) or Gui.AddCtrl(...)?

My most favoured syntax would be: Gui.add(Gui.Button(...), position) It could also be myGui.add ctrl.new() I like these :thumbup: PS: I voted for Gui.AddCtrl(...) removal. Short variant is preferable, it is better for possible extensions to have additional prefixes, gui.add() used way too frequentl...
by vvhitevvizard
30 Jul 2020, 10:49
Forum: AutoHotkey Development
Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Replies: 35
Views: 13511

Re: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved

First, you do not use pseudo-arrays . Damn it, u r right again. varX%varY% gives a load-time warning if varY is not initialized somewhere else, but it gives no load-time warnings otherwise (OK). i:=a_tickcount ;if we comment this line, it gives a load-time warning on the next line "i: this var appe...
by vvhitevvizard
30 Jul 2020, 09:59
Forum: AutoHotkey Development
Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Replies: 35
Views: 13511

Re: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved

I see your point, sorry. If you are going to refer to the vars both dynamically and non-dynamically, initialise them. I don't think this is a problem. point is u initialize pseudo-array members at runtime and at load time AHK tries to check every addressing to those not-yet-existing vars. That's wh...
by vvhitevvizard
30 Jul 2020, 09:53
Forum: AutoHotkey Development
Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Replies: 35
Views: 13511

Re: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved

Right, but on a119 square1 is bringing up warnings saying the variable is unset. I like this new feature, but it does not handle square%A_Index% type syntax well. Its not possible to check run-time created vars at load time. I would like to keep that warning, too - I found quite a few sleeping erro...
by vvhitevvizard
30 Jul 2020, 08:47
Forum: AutoHotkey Development
Topic: Updated to v2-a136. [list of 51 suggestions]
Replies: 90
Views: 48639

Re: Updated to v2-119. [list of 47 suggestions]

Typically, when you use a for loop you create (and destroy) an enumerator object, and back-up and restore the loop variables. You can't index a map using a_index, in general. Yeah, I have an idea how hashed indexing works for map and I try to use vanilla array over map whenever its possible, but I ...
by vvhitevvizard
30 Jul 2020, 08:24
Forum: AutoHotkey Development
Topic: Updated to v2-a136. [list of 51 suggestions]
Replies: 90
Views: 48639

Re: Updated to v2-119. [list of 45 suggestions]

Reducing an iterator to a single variable type for the sake of consistency and "Because you can get the value from the key" very much defeats the point of using an iterator in the first place. So no this suggestion will never be a thing. Performance-wise, its safe to say loop and a_index addressing...
by vvhitevvizard
30 Jul 2020, 07:30
Forum: AutoHotkey Development
Topic: Updated to v2-a136. [list of 51 suggestions]
Replies: 90
Views: 48639

Re: Updated to v2-119. [list of 47 suggestions]

OP updated. 46. Revolt! Revolt! the majority wants command syntax to be completely removed. Some ppl do like to use function calls w/o () . How about a compromise: #nocommands ( #commands off , #syntax strict , whatever) pre-processor directive to disable command syntax (forcing to use () for funct...
by vvhitevvizard
30 Jul 2020, 07:11
Forum: AutoHotkey Development
Topic: Updated to v2-a136. [list of 51 suggestions]
Replies: 90
Views: 48639

Re: Updated to v2-119. [list of 45 suggestions]

You need to use a much larger array to see the real difference between the 2 methods - e.g. 10k entries. True. It gives a basic idea. It might yield even greater delta cuz we measure c+=a[a_index] inside loops and loop initialization takes some time. I might insert perfcounter queries between this ...
by vvhitevvizard
30 Jul 2020, 06:43
Forum: AutoHotkey Development
Topic: Updated to v2-a136. [list of 51 suggestions]
Replies: 90
Views: 48639

Re: Updated to v2-119. [list of 45 suggestions]

The single advantage of an enumerator/iterator over accessing each index by its value one after another is speed. U r absolutely right here. I've just tested loop array.length {array[a_index]} vs for v in array {v} vs for k,v in array {v} using AHK V2-118. My dbg class measures average, minimum, ma...
by vvhitevvizard
30 Jul 2020, 05:31
Forum: AutoHotkey Development
Topic: Smarter dllcall()
Replies: 8
Views: 5122

Re: Smarter dllcall()

What is PY? Its definitely .py Python :) I found that PY calls DLL without specifying the parameter type. This is very convenient, using DLL becomes very simple. So can we achieve the same effect in V2? It was partially tackled in AHK_H V2 branch (by HotKeyIt ) with DllCall 's equivalent named Dyna...
by vvhitevvizard
30 Jul 2020, 05:09
Forum: AutoHotkey Development
Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Replies: 35
Views: 13511

Re: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved

the last update that introduced useful detection of unset variables is unable to process pseudoarrays correctly. Indeed, the warning is triggered at parsing (loading time) and these vars exist at runtime. Well, its the same issue as output variables (#45) - we might need some keywords (e.g. dyn and...
by vvhitevvizard
29 Jul 2020, 08:18
Forum: AutoHotkey Development
Topic: Updated to v2-a136. [list of 51 suggestions]
Replies: 90
Views: 48639

Re: Updated to v2-119. [list of 45 suggestions]

https://www.autohotkey.com/boards/viewtopic.php?f=37&t=75049 Again, tuples would be nice. Barring that, an array or an object. I use tuples ( unmodified lists) here and there in Python, the more types we could have in AHK the better! no doubt about it. But I touch the current AHK version status quo...
by vvhitevvizard
29 Jul 2020, 07:50
Forum: AutoHotkey Development
Topic: Updated to v2-a136. [list of 51 suggestions]
Replies: 90
Views: 48639

Re: Updated to v2-119. Just a bliss! Feels so good. But a [list of 42 suggestions]

There is no point in introducing new syntax when what we have getpos(x:=0, y:=0, w:=0, h:=0) works fine. My complaint concerns #warn UseUnsetLocal . So instead of assigning some value just to appease warning dialogues: ;function start: local x:=0, y:=0, w:=0, h:=0 ;... getpos(x, y, w, h) ;x1:=x, y1...
by vvhitevvizard
29 Jul 2020, 07:34
Forum: AutoHotkey Development
Topic: Updated to v2-a136. [list of 51 suggestions]
Replies: 90
Views: 48639

Re: Updated to v2-119. [list of 45 suggestions]

For some unknown reason it brings a dramatic slowdown for some scripts upto 8% compared to version V2-118! This is not very useful information if we don't know what and how you measure this. Actually I got quite a lot of real-world test files due to for every project I do have a benchmark mode. Her...
by vvhitevvizard
29 Jul 2020, 04:37
Forum: AutoHotkey Development
Topic: Updated to v2-a136. [list of 51 suggestions]
Replies: 90
Views: 48639

Re: Updated to v2-119. [list of 45 suggestions]

Thx for quick reply, Helgef ! It looks great. swagfag 40. well, what about "For map enumerator to return key is quite convenient cuz value can be obtained via KEY."? Yes, map and array enumerators don't correspond to each other's key / value preference. We just need a unified (expected) rule here. A...
by vvhitevvizard
29 Jul 2020, 04:05
Forum: AutoHotkey Development
Topic: Updated to v2-a136. [list of 51 suggestions]
Replies: 90
Views: 48639

Re: Updated to v2-119. [list of 45 suggestions]

swagfag wrote:
28 Jul 2020, 20:11
40.
BTW, I don't quite understand the meaning of this (from V2-a118):
Revised implementation of for: Increased maximum number of variables from 2 to 19
Does it mean that now I can write for i,j,k,l,m,n in customobj.enumerator?
by vvhitevvizard
29 Jul 2020, 03:36
Forum: AutoHotkey Development
Topic: Updated to v2-a136. [list of 51 suggestions]
Replies: 90
Views: 48639

Re: Updated to v2-119. [list of 45 suggestions]

swagfag 44. is broken, remnant from v1 where it sets ErrorLevel or throws if inside a try(since theres no ErrorLevel in v2 anymore, throwing is all there is) meanwhile, swallow the exception or Good morning! yeah I wrote that point after realizing wrapping it in try/catch block feels awkward: try s...
by vvhitevvizard
28 Jul 2020, 08:54
Forum: AutoHotkey Development
Topic: Updated to v2-a136. [list of 51 suggestions]
Replies: 90
Views: 48639

Re: Updated to v2-119. Just a bliss! Feels so good. But a [list of 42 suggestions]

43. Similar to #42 , a button to unconditionally exit a parsing process after the first warning dialogue at loading time. 44. To stop a file that is currently playing, use SoundPlay on a nonexistent filename as in this example: SoundPlay "Nonexistent.avi". And it throws: soundplay("-1") I believe w...

Go to advanced search