Code: Select all
#NoEnv
#SingleInstance Force
Class SomeClass
{
SomeMethod() {
/*
Msgbox, % this.__Class ; "SomeClass"
Msgbox, % Clipboard:=&this ; 50077280
Msgbox, % A_ThisFunc ; "SomeClass.SomeMethod"
*/
Msgbox, % how_to_get_derived_object_name ; <-- I want to get "ClassA", "ClassB" and "ClassC"
}
}
Class_A:=new SomeClass
Class_B:=new SomeClass
Class_C:=new SomeClass
Class_A.SomeMethod()
Class_B.SomeMethod()
Class_C.SomeMethod()
ExitApp
This is my first question on this forum, and my English isn't good. I ask for your understanding...
I wonder how to get the name of the derived object from its method. I don't even know which search word to search for.
Is this possible? Please help me!