ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Tutorials & Other Helpful Info (https://www.esoui.com/forums/forumdisplay.php?f=172)
-   -   Check for existance of another addon (https://www.esoui.com/forums/showthread.php?t=8166)

DunkleMaterie 12/13/18 07:41 PM

Check for existance of another addon
 
Hello,

is there an "easy" way to check whether a particular another addon is loaded in my addon? I want to implement a check to keep things save in case of both addons are loaded.

Thank you for your help and best regards

Baertram 12/14/18 12:05 PM

Each addon runs through event_addon_loaded.
Add the other addon to your addons txt file at ##OptionalDependsOn: OtherAddon

In your callback function of event_addon_loaded you'll be able to check the parameter addonName == Other Addon finally.

Or simply check the other addons code if it got a global variable defined.
Inside your code check if this var exists like this:
If otherAddonVar and otherAddonVar.functionName then
--other addon is loaded
End

Scootworks 12/14/18 01:11 PM

https://wiki.esoui.com/IsAddonRunning

DunkleMaterie 12/14/18 03:45 PM

Quote:

Originally Posted by Baertram (Post 36635)
Each addon runs through event_addon_loaded.
Add the other addon to your addons txt file at ##OptionalDependsOn: OtherAddon

In your callback function of event_addon_loaded you'll be able to check the parameter addonName == Other Addon finally.

Thank you, that solved it :-)

Provision 12/15/18 09:18 AM

Or :


If addOn_variable_GLOBAL then
//your code
end


All times are GMT -6. The time now is 01:18 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI