Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Thu Nov 21, 2024 4:40 pm

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: How to create Plugins
Thanked: 1 time(s)  Unread post Posted: Mon Apr 05, 2010 11:45 am 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4525
Been thanked: 1346 time(s)
Has thanked: 133 time(s)
Contribution Points: 33209
Outdated.

Please read below for updated info.

http://www.blueeye-macro.com/viewtopic.php?f=123&t=24&p=5256#p5256

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to create Plugins
Thanked: 0 time(s)  Unread post Posted: Wed Apr 07, 2010 2:46 pm 
Active User
Active User



Joined: Thu Feb 11, 2010 4:36 pm
Posts: 38
Been thanked: 0 time(s)
Has thanked: 3 time(s)
Contribution Points: 652
I've been watching all your videos on the website, and I must say; This plugin system seems like a very powerful feature. I have some programming skills myself so these plugins can definately come in handy.

I have not had the time to deal with making some macroes myself yet, but until then im hoping for more videos :) Good job, Gigus.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to create Plugins
Thanked: 0 time(s)  Unread post Posted: Wed Apr 07, 2010 3:26 pm 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4525
Been thanked: 1346 time(s)
Has thanked: 133 time(s)
Contribution Points: 33209
Bams wrote:
I've been watching all your videos on the website, and I must say; This plugin system seems like a very powerful feature. I have some programming skills myself so these plugins can definately come in handy.

I have not had the time to deal with making some macroes myself yet, but until then im hoping for more videos :) Good job, Gigus.


Thank you Bams.

I'm happy you find my videos useful.

And yes, the plugin functions can be very powerful, considering if (and i'm sure there is) a functions you need to complete a specific task, is not available in BE, you can with a bit of coding skills, create your own plugin, to interact with all the build in functions of BE or simply use the trigger system, to launch it.

I'll try to come up with more videos, but i'm more than open to suggestions, as to what sort of videos you would like to see...

More How To's? (and what sort of BE functions?)
More Game Cheats?
Work related scenarios?

or perhaps something completely new?

I'm hoping to receive some more feedback from you guys.

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to create Plugins
Thanked: 0 time(s)  Unread post Posted: Sat May 14, 2011 12:18 am 
Silver Contributor
Silver Contributor



Joined: Fri May 13, 2011 6:57 am
Posts: 174
Been thanked: 6 time(s)
Has thanked: 0 time(s)
Contribution Points: 3266
how do you return values into blue eye from the plugin?

_________________
A train stops at a train station, a bus stops at a bus station.
On my desk, there's a workstation...


Top
 Profile  
Reply with quote  
 Post subject: Re: How to create Plugins
Thanked: 0 time(s)  Unread post Posted: Sat May 14, 2011 8:45 am 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4525
Been thanked: 1346 time(s)
Has thanked: 133 time(s)
Contribution Points: 33209
Just raise the SetVariable event.

I am planning for some changes in the plugin system for the next version, making it a lot easier to create plugins.

Check out this plugin:
viewtopic.php?f=175&t=775

It performs a web request, and extracts some information from the html based on a regular expression, the result is saved to a variable using the SetVariable event.

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to create Plugins
Thanked: 0 time(s)  Unread post Posted: Mon Jun 27, 2011 6:04 pm 
New User
New User



Joined: Mon Jun 27, 2011 10:56 am
Posts: 13
Been thanked: 0 time(s)
Has thanked: 0 time(s)
Contribution Points: 0
Thanks a lot! Great tutorial :]


Top
 Profile  
Reply with quote  
 Post subject: Re: How to create Plugins
Thanked: 0 time(s)  Unread post Posted: Tue Jun 28, 2011 9:08 am 


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?


Top
  
Reply with quote  
 Post subject: Re: How to create Plugins
Thanked: 0 time(s)  Unread post Posted: Tue Jun 28, 2011 9:10 am 
New User
New User



Joined: Thu Apr 07, 2011 9:07 am
Posts: 7
Been thanked: 0 time(s)
Has thanked: 0 time(s)
Contribution Points: 52
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: How to create Plugins
Thanked: 1 time(s)  Unread post Posted: Tue Jun 28, 2011 9:43 am 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4525
Been thanked: 1346 time(s)
Has thanked: 133 time(s)
Contribution Points: 33209
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 :)

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to create Plugins
Thanked: 0 time(s)  Unread post Posted: Tue Jun 28, 2011 5:09 pm 
New User
New User



Joined: Thu Apr 07, 2011 9:07 am
Posts: 7
Been thanked: 0 time(s)
Has thanked: 0 time(s)
Contribution Points: 52
Thanks, selecting target framework .NET 3.5 solved the problem.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC


You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


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