Code: Select all
MsgBox % A_MyCustomBIV
basically like a function, but without the parens
Code: Select all
MsgBox % A_MyCustomBIV
Hello, if you don't mind putting a dot ("."), you can use classes (object-oriented, although I personally don't like) and put then in your library:swagfag wrote: ↑27 Dec 2018, 08:01i was wondering if there was a way to achieve the following:whereby the variable actually does some computations in the background, so its not just a plain old var defined somewhereCode: Select all
MsgBox % A_MyCustomBIV
basically like a function, but without the parens
Code: Select all
Msgbox % A_.MyCustomBIV
Class A_ {
Static MyCustomBIV:=(A_Hour ":" A_Min ":" A_Sec)
}
Code: Select all
Msgbox % EXAMPLE.VAR1
Msgbox % EXAMPLE.VAR2
Msgbox % EXAMPLE.VAR3
Class EXAMPLE {
Static VAR1:=(A_Hour ":" A_Min ":" A_Sec), VAR2:=(A_YYYY "/" A_MM "/" A_DD), VAR3:=FUNCTION()
} FUNCTION() {
Return, "Just a function example, you can do complex stuff."
}
Users browsing this forum: ArkuS and 129 guests