Pixnub Home › Forums › EZ Green Screen › EZGS Extract Image command › Reply To: EZGS Extract Image command
		April 17, 2024 at 5:13 pm
		
		#7026933
		
		
		
	
Participant
Here is what it looked like:
const ezgsExctractcommand = async () => {
    try {
        const allPlugins = pluginManager.plugins;
        const plugin = Array.from(allPlugins).find(plugin => plugin.id === "6d9103ae");
        if (plugin && plugin.enabled) {
            await plugin.invokeCommand("ezgsCommand");
    }
    } catch (e) {
        console.error(e);
    }
}
const executeHealCrop = async() => {
    ...
    await ezgsExctractcommand();
    await executeAsModal(async () => {
        // do my stuff
    }, { commandName: "Heal Crop" })
        .then(res => console.debug("saveDocumentAs:done"))
        .catch(err => {
            throw new Error("utility.saveDocumentAs:err", err)
        });
}
