Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Mon Nov 25, 2024 12:55 am

All times are UTC




Post a reply
Username:
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
Font size:
Font colour
Options:
BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Please click and drag the 2 correct statements to the right hand side.
Please click and drag the 2 correct statements to the right hand side.
Please select the options below to the correct list to avoid automated registrations.
Statements
2 correct statements
Dogs have 4 legs
Fish can swim
Chickens can talk
Elephants can fly
   

Topic review - How to create Plugins
Author Message
  Post subject:  Re: How to create Plugins  Reply with quote
Than you for this! really helped greatly!
Post Posted: Thu May 28, 2015 5:40 pm
  Post subject:  Re: How to create Plugins  Reply with quote
thx for you!!!!!!!!!!!!!!!!!!!!!
Post Posted: Mon Oct 01, 2012 11:30 pm
  Post subject:  Re: How to create Plugins  Reply with quote
nice tutorial.
very helpful
Post Posted: Mon Jul 23, 2012 6:43 am
  Post subject:  Re: How to create Plugins  Reply with quote
Thats right - BE is running 3.5 still.

I will upgrade it to 4.0 eventually, I just decided to hold back on the upgrade a little while longer to not force everyone to upgrade to .NET 4.0 just yet.
Post Posted: Sat Dec 10, 2011 4:33 pm
  Post subject:  Re: How to create Plugins  Reply with quote
Aha.. .NET 3.5
Post Posted: Sat Dec 10, 2011 7:45 am
  Post subject:  Re: How to create Plugins  Reply with quote
i compiled a dll, but when i put in the Plugins folder and restart BEM, the editor doesn't show my argument
Post Posted: Sat Dec 10, 2011 7:19 am
  Post subject:  Re: How to create Plugins  Reply with quote
Great, glad you got it working.
Post Posted: Tue Jun 28, 2011 6:59 pm
  Post subject:  Re: How to create Plugins  Reply with quote
Thanks, selecting target framework .NET 3.5 solved the problem.
Post Posted: Tue Jun 28, 2011 5:09 pm
  Post subject:  Re: How to create Plugins  Reply with quote
IPluginArgument is no longer used, simply use "PluginArgument" instead.
In BE version 2.5 the plugin system has been changed, to make it easier creating plugins.

To create a plugin in BE version 2.5 and later, follow these simple steps:

First of all, make sure to create a new project of type Class Library - select target framework to be .NET 3.5.

Add a reference to: C:\Program Files (x86)\Blue Eye Macro\Plugin.dll

Mark your class as Serializable.


Create your plugin inheriting from BaseInstruction / BaseCriterion.

Here is an example of two plugins, an instruction which which will simply save a variable and a criterion which will always return true.

C# Plugin
Code:
using System;
using Plugin.BaseClasses;
using Plugin.Classes;

namespace MyFirstCoupleOfPlugins
{
   [Serializable]
   public class MyPluginInstruction : BaseInstruction
   {
      public override void InitArguments()
      {
         AddArguments(
            new PluginArgument(PluginArgument.ArgumentType.Text, 100, "Variable Name", "The variable to set"),
            new PluginArgument(PluginArgument.ArgumentType.Text, 100, "Text", "The text to save"));
      }

      public override void Execute()
      {
         SetVariable(Arguments[0].Value.ToString(), Arguments[1].Value.ToString());
      }

      public override string Name
      {
         get { return "Set variable"; }
      }
   }

   [Serializable]
   public class MyPluginCriterion: BaseCriterion
   {
      public override void InitArguments(){}

      public override bool IsSatisfied()
      {
         return true;
      }

      public override string Name
      {
         get { return "Always true"; }
      }
   }
}


Compile it, and copy your new dll to the "C:\Program Files (x86)\Blue Eye Macro\Plugins" folder.

Compiled dll:
Attachment:
MyFirstCoupleOfPlugins.dll [5 KiB]
Downloaded 1063 times


Launch BE, and your all set.

Now you can use your new instruction and criterion like this inside BE:
Code:
 begin
     Plugins.Set variable("var", "It works!")
     if  Plugins.Always true()
          begin
               Window.Display message box("{var}", "yes")
          end
 end


I hope that helps, have fun creating your own building blocks :)
Post Posted: Tue Jun 28, 2011 9:43 am
  Post subject:  Re: How to create Plugins  Reply with quote
I am using visual studio 2010 it gives an error
"The type or namespace name 'IPluginArgument' could not be found (are you missing a using directive or an assembly reference?)"
What am I doing wrong?
Post Posted: Tue Jun 28, 2011 9:10 am

All times are UTC


Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group