Search found 405 matches

by vvhitevvizard
30 Jul 2020, 21:37
Forum: AutoHotkey v2 Development
Topic: Updated to v2-119. [list of 50 suggestions]
Replies: 78
Views: 27718

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

swagfag I wasn't aware ur reply is on the 4th page so I kept adding stuff to my prev. post. Great explanation :thumbup: That killer-picture and ur explanation should be put into the documentation. to resume: For now, for json.dump I just add an additional loop calling .base.ownmethods . U defeated ...
by vvhitevvizard
30 Jul 2020, 20:37
Forum: AutoHotkey v2 Development
Topic: Updated to v2-119. [list of 50 suggestions]
Replies: 78
Views: 27718

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

34. well, its not a bug. u might argue its unexpected(although if uve read about how the object hierarchy is structured, it really shouldnt be) inst_ybt:=ybt.new() ;inst_ybt.definemethod("i_say_init", ()=>msgbox("3")) ;uncomment this to get an enumerable method msgbox(a_clipboard:=json.dump(inst_yb...
by vvhitevvizard
30 Jul 2020, 20:10
Forum: AutoHotkey v2 Development
Topic: Conflicts caused by V2
Replies: 10
Views: 4927

Re: Conflicts caused by V2

I see AHK V2 becoming a general purpose scripting language, too. Clean and lightweight. With as few irregularities and quirks as possible. I would like it to use javascript and python notation and data types, the best of the two worlds. I don't expect AHK to become a huge set of built-in functions/l...
by vvhitevvizard
30 Jul 2020, 18:35
Forum: AutoHotkey v2 Development
Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Replies: 35
Views: 9256

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

Objects don't make sense here, as forming a collection of Stride Width or Height individually do not make sense. What would be the point of an array with stride1, stride2, stride3, disconnected from the bitmaps that own them? Well, u definitely have candidates for 3 arrays (one for bitmapdata point...
by vvhitevvizard
30 Jul 2020, 18:11
Forum: AutoHotkey v2 Development
Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Replies: 35
Views: 9256

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

but i think lexikos said(although i cant find the exact quote now) he wanted to differentiate [ ] as purely an indexing operator, and have another operator do the property accessing. I see. Well, that operator better have mirroring opening&closing brackets. :D I, for one, prefer AHK to completely c...
by vvhitevvizard
30 Jul 2020, 17:39
Forum: AutoHotkey v2 Development
Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Replies: 35
Views: 9256

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

it mimics accessing properties - obj := {keyN: ...} unquoted; obj.keyN := ... unquoted it mimics accessing properties dynamically - obj := {%keyN%: ...} percents; obj.%keyN% := ... percents Agree on that. I explained it to myself that time it mimics javascript's object initializer (especially new 2...
by vvhitevvizard
30 Jul 2020, 16:08
Forum: AutoHotkey v2 Development
Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Replies: 35
Views: 9256

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

swagfag now, u can only do obj:={keyN:"valueN"} to define a property with the literal name obj.keyN; or obj:={%keyN%:"valueN"} to define a property with the value of the variable keyN (before) {"keyN":"valueN"} : I was able to copy-paste JSON's syntax as is into AHK obj's {} initialization body. {(...
by vvhitevvizard
30 Jul 2020, 15:45
Forum: AutoHotkey v2 Development
Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Replies: 35
Views: 9256

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

@swagfag
2. except %fn%() and fn.Call() do different things
Could u elaborate please? The current documentation even puts both syntax variations together:
Func.Call(Param1, Param2, ...)
%Func%(Param1, Param2, ...)
https://lexikos.github.io/v2/docs/objects/Func.htm#Call
by vvhitevvizard
30 Jul 2020, 15:32
Forum: AutoHotkey v2 Development
Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Replies: 35
Views: 9256

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

3. isnt {%nameVar%: valueVar} "populating a property programatically"? By populate programmatically I meant loop with obj.keyN:=valueN over obj:={"keyN":"valueN"} JSON-like syntax. BTW, I don't understand what was the reason to replace non-literal key names (vars containing property names) like obj...
by vvhitevvizard
30 Jul 2020, 15:04
Forum: AutoHotkey v2 Development
Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Replies: 35
Views: 9256

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

Windows Batch Scripting is still a thing among IT people. It is. IT companies might keep legacy code for compatibility reasons mainly. for /d %%i in ("%PROGRAMFILES%") do ( set PROGRAMFILESSHORT=%%~si ) for /f "eol=# delims== tokens=1,2" %%i in (%SETTINGSFILE%) do ( set %%i=%%j ) if %1 == 1 ( exit ...
by vvhitevvizard
30 Jul 2020, 14:51
Forum: AutoHotkey v2 Development
Topic: Updated to v2-119. [list of 50 suggestions]
Replies: 78
Views: 27718

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

I'm tired but I guess I either bumped into something again or miss something. Candidate for #48 ? g:=gui.new(), f:=g.add("edit"), g.show() msgbox(f.type) try f.type ;Error: the value of type "Gui.Edit" has no method named "type". OH, REALLY? catch e msgbox(e.message) Error: the value of type "Gui.Ed...
by vvhitevvizard
30 Jul 2020, 14:06
Forum: AutoHotkey v2 Development
Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Replies: 35
Views: 9256

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 v2 Development
Topic: Remove Gui.Add("Ctrl", ...) or Gui.AddCtrl(...)?
Replies: 16
Views: 4180

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 v2 Development
Topic: Remove Gui.Add("Ctrl", ...) or Gui.AddCtrl(...)?
Replies: 16
Views: 4180

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 v2 Development
Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Replies: 35
Views: 9256

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 v2 Development
Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Replies: 35
Views: 9256

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 v2 Development
Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Replies: 35
Views: 9256

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 v2 Development
Topic: Updated to v2-119. [list of 50 suggestions]
Replies: 78
Views: 27718

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 v2 Development
Topic: Updated to v2-119. [list of 50 suggestions]
Replies: 78
Views: 27718

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 v2 Development
Topic: Updated to v2-119. [list of 50 suggestions]
Replies: 78
Views: 27718

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...

Go to advanced search