Sorry for the late reply and thank you all for the tips.
RomanR's solution is the one that is working. In case you are wondering what I'm trying to do - I'm using Oscuro's Oblivion Overhaul and Maskar's Oblivion Overhaul. OOO has something called "Harvest Containers" (animates containers opening/closing) and MOO does not have this implemented yet. I don't like inconsistencies in my game, so I implemented harvest containers in MOO and wanted to make it dependent to the setting in OOO, if OOO is loaded.
In order to get the "OOOHC" value, I could have:
1. made OOO a master to MOO, so I could access the global value directly, but I didn't want that, because it forces the use of OOO.
2. used the "GetFormFromMod" command and this is what I did.
The code part from "MOOGetGameLoadedModLoadedFunctionScript" now looks like this and does what it should:
if ( IsModLoaded "Oscuro's_Oblivion_Overhaul.esm" )
set MOO.OOOloaded to 1
set tempref to GetFormFromMod "Oscuro's_Oblivion_Overhaul.esm" "04FC1B"
Let found := GetGlobalValue tempref
if found == 1
set MOO.OOOHCactive to 1
else
set MOO.OOOHCactive to 0
endif
endif
It checks the OOOHC global value via form ID and stores it in a MOO variable for use in MOO. There is just one tiny problem with it. The OOO update routine runs after the MOO update routine (no, not depending on load order), so it takes two game starts for MOO to recognize a change in OOOHC, at least in my setup. But that doesn't bother me much.