A_ListLines not compatible with ListLines.

Propose new features and changes
User avatar
CerpinTaxt
Posts: 13
Joined: 23 Dec 2017, 12:16

A_ListLines not compatible with ListLines.

27 Jul 2018, 15:24

A_ListLines contains a boolean but ListLines doesn't accept a boolean. So that means when somebody wants to save and later restore the settings, they can't use something like this:

Code: Select all

O_ListLines := A_ListLines

; code

ListLines, % O_ListLines
But instead they have to do something like this:

Code: Select all

O_ListLines := ( A_ListLines ? "On" : "Off" )

; code

ListLines, % O_ListLines
My first example is what works with A_DetectHiddenWindows, A_AutoTrim etc. So whether it's changing ListLines to accept a boolean or changing A_ListLines to contain "On"/"Off" instead of a bool, I feel like consistency would be good.
Image
and with just one faint glance back into the sea
the mollusk lingers with its wandering eye
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: A_ListLines not compatible with ListLines.

27 Jul 2018, 16:34

Boolean is generally more useful, so AutoHotkey v2-alpha accepts boolean in every case where On/Off is allowed. A_ListLines was added more recently than the other settings, so it uses boolean. However, there are some variables that haven't been changed yet, and I may remove On/Off entirely.

Even if we wanted A_ListLines to return On/Off, it's too late for v1; changing it now would break scripts. However, changing all commands to accept boolean where On/Off is allowed would be fine.
User avatar
CerpinTaxt
Posts: 13
Joined: 23 Dec 2017, 12:16

Re: A_ListLines not compatible with ListLines.

27 Jul 2018, 19:12

lexikos wrote:Boolean is generally more useful, so AutoHotkey v2-alpha accepts boolean in every case where On/Off is allowed. A_ListLines was added more recently than the other settings, so it uses boolean. However, there are some variables that haven't been changed yet, and I may remove On/Off entirely.

Even if we wanted A_ListLines to return On/Off, it's too late for v1; changing it now would break scripts. However, changing all commands to accept boolean where On/Off is allowed would be fine.
I think booleans are the better option as well, and I think changing commands which accept On/Off to also accept booleans would be perfect. I just happened to be using the code I listed in my first example and was baffled as to why ListLines kept appearing when all I wanted to do was set it back to its previous value.
Image
and with just one faint glance back into the sea
the mollusk lingers with its wandering eye
geek
Posts: 1052
Joined: 02 Oct 2013, 22:13
Location: GeekDude
Contact:

Re: A_ListLines not compatible with ListLines.

04 Aug 2018, 22:21

VismundCygnus wrote:I think booleans are the better option as well, and I think changing commands which accept On/Off to also accept booleans would be perfect.
I agree :thumbup:

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 40 guests