Global Settings Class

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
murataygun
Posts: 104
Joined: 07 Aug 2015, 15:53

Global Settings Class

Post by murataygun » 25 Sep 2022, 11:27

Is it ok to create a class and keep variables in it and use everywhere?

for example;

Code: Select all


Global Settings := new Settings_class()

class Settings_class {

	width := 500
	height := 400

}


class bla{
   createGui() {
       gui, w % Settings.width%,
    ;---
}

class bla2{
   createGui() {
      gui, w % Settings.width, 
    ;---
}

}

Return to “Ask for Help (v1)”