Search found 4709 matches
- 14 Oct 2022, 11:54
- Forum: Ask for Help (v2)
- Topic: _wcsrev problem Topic is solved
- Replies: 9
- Views: 816
Re: _wcsrev problem Topic is solved
I thought it acts directly on value directed to by the pointer, and since AHK owns the value and knows about it then it doesn't need to be freed. This is correct. DllCall("msvcrt\_wcsrev", "str", str, "CDecl str") It is not necessary to specify str for the return value, [ edit: see lexikos' correct...
- 08 Oct 2022, 13:26
- Forum: General Discussion
- Topic: Code Puzzle Thread
- Replies: 145
- Views: 82809
Re: Code Puzzle Thread
This post is a follow up to Puzzle 11 In this puzzle we tried to recreate the numput/get functions. The accepted solution was made by lexikos, but before that jeeswg attemped a different approach which ultimately contained some errors. Jeeswg was given one point for a good effort and partial solutio...
- 08 Oct 2022, 12:07
- Forum: Bug Reports
- Topic: WinTitle - ahk_id ... vs {hwnd:var} and others (Ahk v2 beta.9 and beta.11) Topic is solved
- Replies: 4
- Views: 929
Re: WinTitle - ahk_id ... vs {hwnd:var} and others (Ahk v2 beta.9 and beta.11) Topic is solved
The docs for WinTitle ahk_id seem to indicate that using an integer, "ahk_id " hwnd, or {hwnd:var} are all the same. It does not, in particular, DetectHiddenWindows affects whether the ahk_id criterion detects hidden top-level windows, but hidden controls are always detected. Hidden windows are alw...
- 08 Oct 2022, 03:03
- Forum: Ask for Help (v2)
- Topic: v2 Associative Array Syntax vs v1
- Replies: 3
- Views: 1045
- 07 Oct 2022, 11:49
- Forum: General Discussion
- Topic: Code Puzzle Thread
- Replies: 145
- Views: 82809
Re: Code Puzzle Thread
Regarding Puzzle 16. Emile HasKey has provided an excellent recursive solution and will be awarded one point for this. For two points the solution should be non-recursive. Working around the you may not call _unset from within _unset. rule by defining a method or other function which is then called ...
- 01 Oct 2022, 08:08
- Forum: General Discussion
- Topic: Code Puzzle Thread
- Replies: 145
- Views: 82809
Re: Code Puzzle Thread
Send in your solution as a private message to me, so that everyone gets a chance to consider the problem before solutions are posted. Edit: This puzzle must not use changes made in beta 12 since these makes the unsetting part of the puzzle trivial :thumbup: Puzzle 16 - The unliner [/size] Puzzle de...
- 10 Sep 2022, 13:24
- Forum: Wish List
- Topic: [v1/v2] Additional special character built-in variables
- Replies: 25
- Views: 4586
Re: [v1/v2] Additional special character built-in variables
Why F? You need something since just enabling %% in qouted strings would be a breaking change now. I just thought of python f-strings, hence the f. surprising that _ seems uncommon as standalone syntax character _ is a valid variable name in AHK, you are free to do _ := '"' if you like. Cheers.
- 10 Sep 2022, 06:44
- Forum: Wish List
- Topic: [v1/v2] Additional special character built-in variables
- Replies: 25
- Views: 4586
Re: [v1/v2] Additional special character built-in variables
Still, there might be better solutions, eg, run F'notepad "%FilePath%"'.neogna2 wrote:For example in v2 I might use Run('notepad ' A_Q FilePath A_Q) instead of Run('notepad "' FilePath '"')
- 10 Sep 2022, 04:50
- Forum: Wish List
- Topic: [v1/v2] Additional special character built-in variables
- Replies: 25
- Views: 4586
Re: [v1/v2] Additional special character built-in variables
I would never use any of these in v2. I think q := "'" , and similar, is much more convenient and readable. I have used this occasionally. Does anyone have thoughts about A_Quote vs. A_DQ/A_SQ or alternatives? As a non-english native speaker, I can contribute with the perspective that the word "qout...
- 05 Sep 2022, 11:06
- Forum: Ask for Help (v2)
- Topic: __Delete() Error Topic is solved
- Replies: 7
- Views: 1628
Re: __Delete() Error Topic is solved
It is allowed, as your first example shows. Your code erroneously assumes that o will be freed before bar . But the order in which these are freed when the script exits is not documented, and shouln't be because there are better ways to handle it. You can either use another reference to the class ob...
- 05 Sep 2022, 04:21
- Forum: Ask for Help (v2)
- Topic: __Delete() Error Topic is solved
- Replies: 7
- Views: 1628
Re: __Delete() Error Topic is solved
The class variable bar, has been freed the second time __delete is called, consequently it has no reference to the class object. Instead of hard coding the class name in your methods, I'd recommend you use a class property.
Cheers.
Cheers.
- 03 Sep 2022, 03:52
- Forum: Ask for Help (v2)
- Topic: Issue with var inside a closure repeating value
- Replies: 10
- Views: 2114
Re: Issue with var inside a closure repeating value
Cheers.for loop wrote: Closures which reference the variable (if local) are also unaffected and will see only the value it had outside the loop.
- 03 Sep 2022, 00:54
- Forum: Ask for Help (v2)
- Topic: Issue with var inside a closure repeating value
- Replies: 10
- Views: 2114
Re: Issue with var inside a closure repeating value
In your code, (*)=>_v isn't a closure, but a func , which has a reference to the global variable _v . At any given time, it can only hold one value. You can either bind the value, eg, for v in [...] l.push (v=>v).bind(v) or get an actual closure, for v in [...] l.push (v=>()=>v)(v) I tried with "v_"...
- 02 Sep 2022, 06:31
- Forum: AutoHotkey Development
- Topic: Will v2 ever hit the stable state?
- Replies: 61
- Views: 14950
Re: Will v2 ever hit the stable state?
No, v2 isn't backwards compatible.
@SOTE, I genuinely just wonder why @submeg wants to covert 30000 lines of v1 code to v2.
Cheers.
@SOTE, I genuinely just wonder why @submeg wants to covert 30000 lines of v1 code to v2.
Cheers.
- 31 Aug 2022, 13:04
- Forum: Ask for Help (v2)
- Topic: Issue with var inside a closure repeating value
- Replies: 10
- Views: 2114
Re: Issue with var inside a closure repeating value
behaviors by themselves still feel weird. 1) It is simlilar to, x:=1 msgbox x + (x:=2) ; 4 2) If the open-bracket is not preceded by a value (or a sub-expression which yields a value), it is interpreted as the beginning of an array literal. Consequently, if it is preceded by a value it is not an ar...
- 31 Aug 2022, 09:32
- Forum: Ask for Help (v2)
- Topic: Issue with var inside a closure repeating value
- Replies: 10
- Views: 2114
Re: Issue with var inside a closure repeating value
The following types of sub-expressions override precedence/order of evaluation: Function call The function call is evaluated before the value of next in the lhs of the concatenation. Also there's a different issue with removing the parenthesis from the msgbox's array this is because there is no req...
- 28 Aug 2022, 10:43
- Forum: AutoHotkey Development
- Topic: Should auto concat work with new lines?
- Replies: 6
- Views: 1875
Re: Should auto concat work with new lines?
iseahound , I think this is the most sensible behaviour for line continuation . It is not clear what you expect, or wish should happen. I made an assumption that the first open parenthesis was for the MsgBox but apparently due to the space it is not. There must be no space between the function name...
- 28 Aug 2022, 03:24
- Forum: AutoHotkey Development
- Topic: Will v2 ever hit the stable state?
- Replies: 61
- Views: 14950
Re: Will v2 ever hit the stable state?
@boiler, I do not think we are in a disagreement .
Cheers.
Cheers.
- 27 Aug 2022, 12:51
- Forum: AutoHotkey Development
- Topic: Will v2 ever hit the stable state?
- Replies: 61
- Views: 14950
Re: Will v2 ever hit the stable state?
Excellent .i still use AHK Basic 1.0 for my main project
I will never convert my working v1/c/python/whatever programs to v2.
Cheers.
Spoiler
- 27 Aug 2022, 06:40
- Forum: Ask for Help (v2)
- Topic: RegEx Auto-Callouts not triggering Topic is solved
- Replies: 2
- Views: 813
Re: RegEx Auto-Callouts not triggering Topic is solved
Perhaps consider,
Cheers.regex callout remarks wrote: PCRE is optimized to abort early in some cases if it can determine that a match is not possible. For all RegEx callouts to be called in such cases, it may be necessary to disable these optimizations by specifying (*NO_START_OPT) at the start of the pattern.