Thread Tools Display Modes
12/13/18, 07:41 PM   #1
DunkleMaterie
AddOn Author - Click to view addons
Join Date: Aug 2018
Posts: 5
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
  Reply With Quote
12/14/18, 12:05 PM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
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
  Reply With Quote
12/14/18, 01:11 PM   #3
Scootworks
 
Scootworks's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2014
Posts: 312
https://wiki.esoui.com/IsAddonRunning
  Reply With Quote
12/14/18, 03:45 PM   #4
DunkleMaterie
AddOn Author - Click to view addons
Join Date: Aug 2018
Posts: 5
Originally Posted by Baertram View Post
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 :-)
  Reply With Quote
12/15/18, 09:18 AM   #5
Provision
 
Provision's Avatar
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 43
Or :


If addOn_variable_GLOBAL then
//your code
end
  Reply With Quote

ESOUI » Developer Discussions » Tutorials & Other Helpful Info » Check for existance of another addon

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off