In my distro as I also launch ModExplorer from script, now I've added some more lines to it:
Code:
Version >NIL: uaehf.device 1
IF NOT WARN
; uaehf.device found
AHI FROM Sys:Utilities/ModExplorer/AHI.UAE USE
EndIF
WBRun Sys:Utilities/ModExplorer/ModExplorer SYNC
AHI FROM Sys:Prefs/Env-Archive/Sys/ahi.prefs USE
So I've saved first an AHI UAE configuration as AHI.UAE and if the script detects that you are using WinUAE, it will use that configuration. Using WBRun with SYNC will keep it awaiting till you close ModExplorer and then it will use the AHI config you've got in the usual place for the AHI prefs.
But this has to be checked, I find problems when switching from AGA to RTG and then returning to AGA, so some more tryings have to be done. I mean the icon dissapearing with AGA too even using UAE AHI settings.