You can use the "{PROFILE}" token, which will return the name of the currently loaded profile(I.E. the top profile that loads all others below it); If that name isn't the name of your profile, it must logically mean your profile is running as an included profile.
E.G.
Begin Text Compare : [{PROFILE}] Does Not Equal 'The name of the profile you're checking'
Write '[Blue] This profile is loaded as an included profile' to log
Else
Write '[Blue] This profile is loaded as the active profile' to log
End Condition
If this is for a plugin(as you've posted in the plugin section), you can use the "GetProfileName()" function directly and do basically the same thing:
if (vaProxy.GetProfileName() != "The name of the profile you're checking")
{
vaProxy.WriteToLog("This profile is loaded as an included profile", "blue");
}
else
{
vaProxy.WriteToLog("This profile is loaded as the active profile", "blue");
}
Assuming you're using C#