AHK-v2-script-converter icon indicating copy to clipboard operation
AHK-v2-script-converter copied to clipboard

AutoTrim

Open mmikeww opened this issue 8 years ago • 7 comments

; v1
var = %var2%

; should be
var := Trim(var2)

this below doesn't AutoTrim. Only the explicit double %%

; v1
var = % var2

^^nope

mmikeww avatar Dec 01 '16 14:12 mmikeww

But if AutoTrim, off was used then this wouldn't want to be changed. Seems like a pain in the ass because of the pseudo-threading aspect

https://autohotkey.com/docs/commands/AutoTrim.htm

Every newly launched thread (such as a hotkey, custom menu item, or timed subroutine) starts off fresh with the default setting for this command. That default may be changed by using this command in the auto-execute section (top part of the script).

mmikeww avatar Dec 01 '16 18:12 mmikeww

we could've used A_AutoTrim if it was still available, like we used A_StringCaseSense for InStr.
unfortunately with AutoTrim removed, the BIV is gone too

probably for all of these pseudothread based options, we can use the Built In Variable if it wasn't removed

mmikeww avatar Dec 03 '16 15:12 mmikeww