Universal variables and ability to change built in ones

Propose new features and changes
EntropicBlackhole
Posts: 40
Joined: 12 Jun 2021, 15:28

Universal variables and ability to change built in ones

Post by EntropicBlackhole » 24 Jun 2021, 15:35

so what if you could do something like

Code: Select all

@var := 15
where using "@" as a prefix would make this a universal variable, which would make %var% (or maybe %@var%) be 15 in any ahk script across your computer essentially making it like a constant in physics, you could have @lightspeed := 299792458 or @gravity := 9.81, and if a script is compiled to .exe from .ahk, then inside it would be var := 15, probably at the top, since its separating from the rest of ahk scripts, and changing %var% in an .ahk script would not change %var% on the compiled .exe one,
basically using @ as a prefix for assigning a variable (@var := 15) will make it a universal variable, where any .ahk script will display var as 15, as long as var is universal though, once a script is compiled it will write (universal variable) := (value) at the top, but will remain unchanged if var is changed in any .ahk script
not just that but also having a .txt file or ini file in the ahk directory folder, where you can open it and all the built-in variables will appear with their values, where you can change the values and add new variables, @var would basically be shorthand for this, because after assigning a universal variable, it would write it to the txt/ini file
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Universal variables and ability to change built in ones

Post by swagfag » 24 Jun 2021, 22:43

and people thought using globals was bad enough as it is....
now, ure proposing super-mEGA-GIGA-GLOBALs with additional disk IO penalties to boot! :lol:
nobody codes that way
User avatar
Delta Pythagorean
Posts: 627
Joined: 13 Feb 2017, 13:44
Location: Somewhere in the US
Contact:

Re: Universal variables and ability to change built in ones

Post by Delta Pythagorean » 26 Jun 2021, 19:12

Are you suggesting to use Environment variables?

[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat

Post Reply

Return to “Wish List”