Here is what I tried:
Code: Select all
obj := new timecode(2) ;Default to using 12 frames per second
print(obj) ;prints ---> {"frameCount": 24, "framerate": 12}
obj := new timecode(2, 24) ;Use the provided frame rate
print(obj) ;prints ---> {"frameCount": 48, "framerate": 24}
class timecode
{
__New(frames)
{
this.frameCount := frames * 12
this.framerate := 12
}
__New(frames, framerate)
{
this.frameCount := frames * framerate
this.framerate := framerate
}
}
Code: Select all
==> Duplicate declaration.
Specifically: __New
AutoHotkey closed for the following exit code: 2
Any help would be greatly appreciated!