Search found 405 matches
- 24 Aug 2020, 03:08
- Forum: AutoHotkey v2 Development
- Topic: Updated to v2-119. [list of 50 suggestions]
- Replies: 78
- Views: 28462
Re: Updated to v2-119. [list of 50 suggestions]
objrelease does return the references number. Well, one can live with it for debugging purpose by adding a new object reference and then removing it to get the function's return value. ok. Number are not supported means that it will not consider numeric input as a number and return a number We talk...
- 07 Aug 2020, 15:37
- Forum: AutoHotkey v2 Development
- Topic: Updated to v2-119. [list of 50 suggestions]
- Replies: 78
- Views: 28462
Re: Updated to v2-119. [list of 50 suggestions]
Yes but what if a reference counter is unknown and/or the culprits that increase it r unknown as well, and we need to obtain the count (for debugging purpose)? For a complex project it might be very hard to manually keep every reference in check. Having the ability to count the object's references w...
- 07 Aug 2020, 10:24
- Forum: AutoHotkey v2 Development
- Topic: Updated to v2-119. [list of 50 suggestions]
- Replies: 78
- Views: 28462
Re: Updated to v2-119. [list of 48 suggestions]
Then this documentation article needs to be updated: Any string value or variable. Numbers are not supported. -> Any string/numeric value or variable. 50. Debugging facility. To add ObjRefs(obj) returning object's reference-counting to replace this undocumented object's data use with a built-in func...
- 06 Aug 2020, 17:56
- Forum: AutoHotkey v2 Development
- Topic: Updated to v2-119. [list of 50 suggestions]
- Replies: 78
- Views: 28462
Re: Updated to v2-119. [list of 48 suggestions]
49. https://lexikos.github.io/v2/docs/commands/Trim.htm Any string value or variable. Numbers are not supported. s:=7700.4 ;type=float msgbox(s:=ltrim(s,"7")) output: 00.3999999999996 ;type=string So it silently converts a pure number (integer/float) into a string before trimming it. Either the doc...
- 04 Aug 2020, 05:25
- Forum: AutoHotkey v2 Development
- Topic: Updated to v2-119. [list of 50 suggestions]
- Replies: 78
- Views: 28462
Re: Updated to v2-119. [list of 48 suggestions]
Hmm, ur results show 3% delta (0.531 vs 0.517) with V119 being faster than v118. Is that correct? If it is then yeah that test is unreliable. What OS u use? you should measure doing the one thing 500000 times one time. That's what I do in the previous test suit test2.7z by measuring 1 relatively hug...
- 03 Aug 2020, 07:00
- Forum: AutoHotkey v2 Development
- Topic: Is it possible to keep string processing syntax consistent?
- Replies: 15
- Views: 6118
Re: Is it possible to keep string processing syntax consistent?
@vvhitevvizard If we create three different RegExMatch() regex ~= , will it confuse people? Possibility to choose would confuse some. :D But in general, having function's counterparts with slightly different in/out types and/or total params amount is common: E.g. gdiplus\GdipFillRectangle accepting...
- 03 Aug 2020, 06:02
- Forum: AutoHotkey v2 Development
- Topic: Updated to v2-119. [list of 50 suggestions]
- Replies: 78
- Views: 28462
Re: Updated to v2-119. [list of 48 suggestions]
Not on my pc. I mostly use Win 10 LTSB/LTSC (stable but reduced functionality builds). I tested on 4 different machines (2 desktops and 2 notebooks), gonna test Win7 OS sandboxed in a virtual machine. Could u please post ur output for the latest script and for the test2.7z one? Addition to #48 . In...
- 01 Aug 2020, 18:47
- Forum: AutoHotkey v2 Development
- Topic: Updated to v2-119. [list of 50 suggestions]
- Replies: 78
- Views: 28462
Re: Updated to v2-119. [list of 48 suggestions]
Concerning V119's slowdown (https://www.autohotkey.com/boards/viewtopic.php?p=344631#p344631) I found something. Run this with V2-118 and V2-119. 6% slowdown for average result (rightmost). Reproducible. Steady 6-7% (0.38mcs vs 0.41mcs) on each run. But unlike the test script in the link above, min ...
- 01 Aug 2020, 13:17
- Forum: AutoHotkey v2 Development
- Topic: Updated to v2-119. [list of 50 suggestions]
- Replies: 78
- Views: 28462
Re: Updated to v2-119. [list of 48 suggestions]
1 more inconsistency with control flow statements. if (expr)=if(expr), but return (expr) is not the same as return(expr).
Code: Select all
f:=1
if(f){ ;OK
}
if (f){ ;OK
}
e()
e(){
f:=1
return(f) ;ERROR: call to non-existent function (unexpected)
;return (f) ;OK
}
- 01 Aug 2020, 07:58
- Forum: AutoHotkey v2 Development
- Topic: Is it possible to keep string processing syntax consistent?
- Replies: 15
- Views: 6118
Re: Is it possible to keep string processing syntax consistent?
The pattern is not always so simple, thus the result is not always a simple string. To return the whole string for simple patterns (= Match.Value(0) ) or the first captured group inside () (= Match.Value(1) ) or NULL (empty string) if none found. It makes sense to have a simplified RegExMatch 's co...
- 01 Aug 2020, 06:44
- Forum: AutoHotkey v2 Development
- Topic: Is it possible to keep string processing syntax consistent?
- Replies: 15
- Views: 6118
Re: Is it possible to keep string processing syntax consistent?
RegExMatch(), we pass in is a pattern like "\d+", so the expected result is the string that matches the pattern. not a pattern in or not in the Haystack. I do support ur point. I, for one, would like all that stuff to follow the same design rule. Changing RegExMatch() to return substr or NULL (empt...
- 01 Aug 2020, 04:03
- Forum: AutoHotkey v2 Development
- Topic: Is it possible to keep string processing syntax consistent?
- Replies: 15
- Views: 6118
Re: Is it possible to keep string processing syntax consistent?
tuzi lexikos nnnik IMHO regexmatch and instr return what is naturally expected (a found index within the string) but we might have their counterparts added to return a substring, too. Or add additional output var parameter to them. It would save CPU time and reduce script's code cuz in the majority...
- 01 Aug 2020, 03:34
- Forum: AutoHotkey v2 Development
- Topic: Updated to v2-119. [list of 50 suggestions]
- Replies: 78
- Views: 28462
Re: Updated to v2-119. [list of 48 suggestions]
I tried to clean up OP again. Added #48 . BTW, what does the community think of #24 blatant issue? E.g., that bug (against expectation) swallows the whole line in here (just run it and see the parsing time error, don't mind runtime errors): (r:=dllcall("bcrypt.dll\BCryptCreateHash", 'ptr',o.p, "ptrp...
- 31 Jul 2020, 11:09
- Forum: AutoHotkey v2 Development
- Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
- Replies: 35
- Views: 9500
Re: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
thank u. Point well taken! One of the two bitmaps gets destroyed indeed.
- 31 Jul 2020, 08:50
- Forum: AutoHotkey v2 Development
- Topic: Updated to v2-119. [list of 50 suggestions]
- Replies: 78
- Views: 28462
Re: Updated to v2-119. [list of 47 suggestions]
Basically the major issue of command and function syntax co-existence is the general expectation that follows other languages (C/CPP,D,E,F, Go and so on - the majority of them) design rule: a variable/object member's name with () following it executes the function/method with that name, a name w/o (...
- 31 Jul 2020, 08:30
- Forum: AutoHotkey v2 Development
- Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
- Replies: 35
- Views: 9500
Re: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
N o Why not? Could u clarify ur point? Those r handles (essentially integers). I would keep byref for [in] parameters for potentially long strings (if performance is of most importance) and for actual pointers, passed by &var (old AHK syntax) and strptr(var) (new AHK syntax). And treat all the othe...
- 31 Jul 2020, 07:40
- Forum: AutoHotkey v2 Development
- Topic: Conflicts caused by V2
- Replies: 10
- Views: 5079
Re: Conflicts caused by V2
SOTE A good resource to get an idea of trending syntax is Rosetta Code aggregator, e.g.: https://rosettacode.org/wiki/Percentage_difference_between_images AHK V1 example out there doesn't actually use additional libraries, instead it calls GDI functions directly. So one might think AHK is a do-it-u...
- 31 Jul 2020, 06:46
- Forum: AutoHotkey v2 Development
- Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
- Replies: 35
- Views: 9500
- 31 Jul 2020, 06:25
- Forum: AutoHotkey v2 Development
- Topic: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
- Replies: 35
- Views: 9500
Re: [a119] Associative or Pseudo- Arrays and Dereferencing Numbers Topic is solved
Code: Select all
while ((i:=IsSet(i)?i:0)++ < 2)
Code: Select all
i:=0
while(i++ < 2)
- 31 Jul 2020, 00:34
- Forum: AutoHotkey v2 Development
- Topic: Updated to v2-119. [list of 50 suggestions]
- Replies: 78
- Views: 28462
Re: Updated to v2-119. [list of 47 suggestions]
48. thats faux-command syntax for u. because theres nothing to infer a get/set context, its interpreted as a feeble attempt at method/function call. Good timing to set about writing "AHK V2: 100 reasons to hate command syntax" book. :D I suppose its worth being #48 then. :evil: So if explicit expre...