Code: Select all
O_ListLines := A_ListLines
; code
ListLines, % O_ListLines
Code: Select all
O_ListLines := ( A_ListLines ? "On" : "Off" )
; code
ListLines, % O_ListLines
Code: Select all
O_ListLines := A_ListLines
; code
ListLines, % O_ListLines
Code: Select all
O_ListLines := ( A_ListLines ? "On" : "Off" )
; code
ListLines, % O_ListLines
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.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 agreeVismundCygnus 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.
Users browsing this forum: No registered users and 45 guests