Search found 47 matches

by coffee
27 Apr 2018, 05:12
Forum: AutoHotkey v2 Development
Topic: Functions | &ByRef • ByVal
Replies: 22
Views: 805

Re: Functions | &ByRef • ByVal

Similarily, passing an object to a function, byref or not, allows the function to modify the object, I do not see too much confusion about it No, not similarly. Byref also allows you to wipe out the external object reference by blanking the internal variable and then you have no object outside of t...
by coffee
18 Mar 2018, 04:50
Forum: AutoHotkey v2 Development
Topic: possible issue: MsgBox: omit first parameter Topic is solved
Replies: 19
Views: 632

Re: possible issue: MsgBox: omit first parameter Topic is solved

I think the problem is with Msgbox(,,) Since that is supposedly omitting all parameters, or at least should be equivalent to Msgbox() Msgbox(,,"") is not omitting all parameters. The default value for omitting the text parameter is empty string when you are using the other parameters. It s...
by coffee
01 Feb 2018, 00:58
Forum: AutoHotkey v2 Development
Topic: if var in/contains comma-separated list/array
Replies: 18
Views: 920

Re: if var in/contains comma-separated list/array

see also: StrSplit -> Delimiters He posted This would be less inconvenient to type, but still a bit bulky: if var contains StrSplit("Mon,Tue,Wed,Thu,Fri,Sat,Sun", ",") So "StrSplit" is bulky apparently, a function that already exists, is implemented and "s...
by coffee
24 Jan 2018, 14:33
Forum: AutoHotkey v2 Development
Topic: blanks in ternary operator Topic is solved
Replies: 21
Views: 1140

Re: blanks in ternary operator Topic is solved

MsgBox(RegExReplace("aaaa", "a", "", "", 2)) ;doesn't work in AHK v2 Bug or not, this change just seems clearer to me (works in 2a083 and not in 2a086). When you do a byref, you want the name of a variable unquoted (the variable itself). An empty value, or a ...
by coffee
19 Jan 2018, 22:25
Forum: AutoHotkey v2 Development
Topic: a_iscompiled v2a082+ Topic is solved
Replies: 4
Views: 289

a_iscompiled v2a082+ Topic is solved

I'm gonna risk the bite and post this here. Can't find any changes relating to this, not sure if it extends to other a_ variables. For an uncompiled script containing if (a_iscompiled) msgbox("is compiled") else msgbox("not compiled") and A_IsCompiled — Contains 1 if the script i...
by coffee
17 Jan 2018, 15:33
Forum: Ask For Help
Topic: ahk v2+ahk_h COMPILER issue Topic is solved
Replies: 11
Views: 528

Re: ahk v2+ahk_h COMPILER issue Topic is solved

From here it looks like you are using lexikos' autohotkey's ahk2exe to compile an autohotkey_h script. Take from your quote Ahk2Exe.exe /in "C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.ahk" /out "C:\Program Files\AutoHotkey\Compiler\Ahk2ExeH.exe" /bin "C:\Program Files\Auto...
by coffee
17 Jan 2018, 12:24
Forum: Ask For Help
Topic: ahk v2+ahk_h COMPILER issue Topic is solved
Replies: 11
Views: 528

Re: ahk v2+ahk_h COMPILER issue Topic is solved

/bin "C:\Program Files\AutoHotkey\Compiler\Unicode 32-bit.bin" Not sure what's up with your installation/download steps but that /bin path can't be used with autohotkey_h. Lexikos branch (main) is not compatible with autohotkey_h compilation mode. They use a different way to retrieve the ...
by coffee
09 Jan 2018, 22:24
Forum: AutoHotkey v2 Development
Topic: conversion logic, v1 = -> v1 := -> v2, two-way compatibility
Replies: 131
Views: 24487

Re: conversion logic, v1 = -> v1 := -> v2, two-way compatibility

What I want is something like this: ;libraries shared by multiple exe files: ;note: there is no A_AhkDir variable at present ;note: using A_AhkDir may not be necessary since you can do: ;path-to-the-currently-running-AutoHotkey.exe\Lib\ ; Standard library. #Include %A_AhkDir%\Lib\Lib1.ahk #Include ...
by coffee
09 Jan 2018, 21:29
Forum: AutoHotkey v2 Development
Topic: conversion logic, v1 = -> v1 := -> v2, two-way compatibility
Replies: 131
Views: 24487

Re: conversion logic, v1 = -> v1 := -> v2, two-way compatibility

- [EDIT:] I'm reminded of a fundamental problem with #Include, it is optimised to specify files relative to the path of the *script*, and not to the path of the *AHK exe*. There is this: Functions https://autohotkey.com/docs/Functions.htm#lib path-to-the-currently-running-AutoHotkey.exe\Lib\ ; Stan...
by coffee
02 Jan 2018, 01:18
Forum: AutoHotkey v2 Development
Topic: why was LoopParse (no space) removed?
Replies: 63
Views: 2731

Re: why was LoopParse (no space) removed?

Ah I see, none of these should have even been called that in the first place *from my perspective*, using the loop keyword. They all do different things, calling a different function. For and while could have also been handled by that block, and checked only when the users type loop in a line, savin...
by coffee
01 Jan 2018, 19:23
Forum: AutoHotkey v2 Development
Topic: why was LoopParse (no space) removed?
Replies: 63
Views: 2731

Re: why was LoopParse (no space) removed?

Well i did a quick untested mockup and reverted the commit that removed loopfiles into the latest alpha version, I karate chopped the loop subtype block loopfiles a_scriptdir "\*", "df" msgbox(a_loopfilename) loopfiles(a_scriptdir "\*", "df") msgbox(a_loopfile...
by coffee
01 Jan 2018, 17:55
Forum: AutoHotkey v2 Development
Topic: why was LoopParse (no space) removed?
Replies: 63
Views: 2731

Re: why was LoopParse (no space) removed?

Yes I understand. If Parse is not an expression why don`t be reserved word concatenated to loop. In this case loop family will become with clear syntax: loop(count) { } loopParse(string, delimiters, omitchars) { } loopFiles(filepattern, mode) { } ... loop<Name>(param*) { ; Name:= ["", &qu...
by coffee
01 Jan 2018, 15:14
Forum: AutoHotkey v2 Development
Topic: why was LoopParse (no space) removed?
Replies: 63
Views: 2731

Re: why was LoopParse (no space) removed?

loopParse vs loop "Parse" There 2 main syntaxes for loop: loop [count] { ;loop "Count," } [until [expression]] loop "loopCase" [param*] { ;loop "<Parse|Files|Read|Reg>," } [until [expression]] in other words: loop "<Count|Parse|Files|Read|Reg>," [pa...
by coffee
30 Dec 2017, 21:30
Forum: AutoHotkey v2 Development
Topic: A_ variables
Replies: 24
Views: 1503

Re: A_ variables

My initial plan was this: - I want to share some AHK v1 code on the forum, but I want that code to be more forwards compatible, and therefore I would like InStr/SubStr/RegExMatch(/RegExReplace) to work like they do in AHK v2. Apply SetAhkV2Mode at the start of the subroutine, turn it off at the end...
by coffee
29 Dec 2017, 00:36
Forum: Ask For Help
Topic: cycle through windows with explanations PLEASE
Replies: 9
Views: 298

Re: cycle through windows with explanations PLEASE

thank you for taking the time to respond. I decided yesterday that I wouldn't sleep it off and come on fresh today but reading your response is putting me back into the same mood. I dont understand why some of your script has a percent sign once instead of on both sides of the variable. I dont know...
by coffee
27 Dec 2017, 19:16
Forum: AutoHotkey v2 Development
Topic: A_ variables
Replies: 24
Views: 1503

Re: A_ variables

- A_ScriptPID. Good point about ProcessExist(), although that's not currently in AHK v1. A_ScriptPID looks good, and is consistent with A_ScriptHwnd. How so? process, exist behaves the same way. If you don't specify a process, it sets errorlevel to the script's pid, you can just return errorlevel w...
by coffee
26 Dec 2017, 13:38
Forum: AutoHotkey v2 Development
Topic: why was LoopParse (no space) removed?
Replies: 63
Views: 2731

Re: why was LoopParse (no space) removed?

Comma sucks, in rulz Loop Files in path Loop Files in path, "df" Loop Files in "c:\folder\folder", "dfr" Loop Files in "c:\folder\folder\file.ext" Loop Parse in var, delims Loop Parse in var, "|" Loop Parse in "a,b,c,d,e", "," Loo...
by coffee
20 Dec 2017, 12:56
Forum: AutoHotkey v2 Development
Topic: blanks in ternary operator Topic is solved
Replies: 21
Views: 1140

Re: blanks in ternary operator Topic is solved

- This reminded me of 2 things re. functions and blank parameters: - It seems that AHK v2 lets you use blank trailing parameters in custom functions, whereas AHK v1 doesn't. Please point to any documentation on this. ;MyFunc(111,,) ;AHK v1: doesn't work ;Error: Blank parameter ;MyFunc(,222,) ;AHK v...
by coffee
20 Dec 2017, 11:01
Forum: AutoHotkey v2 Development
Topic: blanks in ternary operator Topic is solved
Replies: 21
Views: 1140

Re: blanks in ternary operator Topic is solved

Note: depending on the function, and the parameter, AHK does allow blanks in functions. The reason it allows "blanks"/"nothing" in function parameters is because the value has already been preset, in the function definition. function(param1:="bop", param2:="hello&...
by coffee
19 Dec 2017, 14:41
Forum: AutoHotkey v2 Development
Topic: blanks in ternary operator Topic is solved
Replies: 21
Views: 1140

Re: blanks in ternary operator Topic is solved

I'm not sure why this would evaluate to anything because it's not a function call? var := (var = 1) ? 2 : (0,) ;doesn't work var := (var = 1) ? 2 : (,0) ;doesn't work It should be var := (var = 1) ? 2 : (0,"") ; for false, in v1 result is 0, in v2 result is "" var := (var = 1) ? ...

Go to advanced search