Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Thu May 25, 2017 9:53 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Read from registry plugin
Thanked: 2 time(s)  Unread post Posted: Sat Aug 06, 2011 1:25 am 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4520
Been thanked: 1145 time(s)
Has thanked: 131 time(s)
Contribution Points: 32728
Ownage once posted a plugin in this section to read from registry.

This is the same plugin, just updated to work with the new plugin system introduced with BE version 2.5.

To compile the following C# code, make sure to reference Plugin.dll (by default: C:\Program Files (x86)\Blue Eye Macro\Plugin.dll)
Also make sure to mark your project as a .NET 3.5 project.

To download the compiled version, scroll to the bottom of this post.

Code:
using System;
using Microsoft.Win32;
using Plugin.BaseClasses;
using Plugin.Classes;

namespace ReadFromRegistry
{
   [Serializable]
   public class ReadFromRegistry : BaseInstruction
   {
      public override void InitArguments()
      {
         Arguments.Add(new PluginArgument(PluginArgument.ArgumentType.Text, 250, "Registry Path", @"The path of the registry key, Example: SOFTWARE\Microsoft\Internet Explorer\MAIN"));
         Arguments.Add(new PluginArgument(PluginArgument.ArgumentType.Text, 150, "Registry Key", "The key to read, Example: \"Start Page\""));
         Arguments.Add(new PluginArgument(PluginArgument.ArgumentType.Text, 100, "Variable", "The variable to save the read value to"));
      }

      public override void Execute()
      {
         string path = Arguments[0].Value.ToString();
         string key = Arguments[1].Value.ToString();
         string var = Arguments[2].Value.ToString();

         RegistryKey myKey = Registry.CurrentUser.OpenSubKey(path, true);
         string finalval = myKey.GetValue(key) as string;

         SetVariable(var, finalval);
      }

      public override string Name
      {
         get { return "Read from registry"; }
      }
   }
}


Download here: (Save in your Plugins folder, by default this is: C:\Program Files (x86)\Blue Eye Macro\Plugins)
Attachment:
ReadFromRegistry.dll [5 KiB]
Downloaded 273 times



To test the plugin try the following macro:
Code:
 begin
     Plugins.Read from registry("SOFTWARE\Microsoft\Internet Explorer\MAIN", "Start Page", "value")
     Window.Display message box("{value}", "yes")
 end


It will retrieve and display the URL of the current start page in Internet Explorer.

_________________
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: Read from registry plugin
Thanked: 0 time(s)  Unread post Posted: Mon May 19, 2014 2:45 pm 
Silver Contributor
Silver Contributor
User avatar



Joined: Thu Apr 10, 2014 12:18 am
Posts: 114
Been thanked: 12 time(s)
Has thanked: 219 time(s)
Contribution Points: 51
thx you to help

_________________
me like Blue Eye Macro thx all


plz take thank you ^_^


Top
 Profile  
Reply with quote  
 Post subject: Re: Read from registry plugin
Thanked: 0 time(s)  Unread post Posted: Mon May 19, 2014 2:48 pm 
VIP Contributor
VIP Contributor
User avatar



Joined: Mon May 12, 2014 11:46 pm
Posts: 573
Been thanked: 51 time(s)
Has thanked: 16 time(s)
Contribution Points: 739
sory just ask what this plugin work for???

_________________
Dont Forget to click
"Thank You"
if this post was help you>>>>>>>>>>>>>>>>>there

NeW Update GDMO (Att+Element) 27 january 2015


Top
 Profile  
Reply with quote  
 Post subject: Re: Read from registry plugin
Thanked: 0 time(s)  Unread post Posted: Thu Aug 14, 2014 8:50 pm 
New User
New User



Joined: Thu Aug 14, 2014 8:00 pm
Posts: 15
Been thanked: 1 time(s)
Has thanked: 1 time(s)
Contribution Points: 32
thx 4 help


Top
 Profile  
Reply with quote  
 Post subject: Re: Read from registry plugin
Thanked: 0 time(s)  Unread post Posted: Sun Nov 16, 2014 7:00 am 
New User
New User



Joined: Sun Nov 16, 2014 4:42 am
Posts: 4
Been thanked: 0 time(s)
Has thanked: 0 time(s)
Contribution Points: 19
thx for this


Top
 Profile  
Reply with quote  
 Post subject: Re: Read from registry plugin
Thanked: 0 time(s)  Unread post Posted: Fri Feb 13, 2015 1:16 pm 
New User
New User



Joined: Fri Feb 13, 2015 1:13 pm
Posts: 1
Been thanked: 0 time(s)
Has thanked: 1 time(s)
Contribution Points: 10
thank you


Top
 Profile  
Reply with quote  
 Post subject: Re: Read from registry plugin
Thanked: 0 time(s)  Unread post Posted: Fri Feb 13, 2015 3:47 pm 
VIP Contributor
VIP Contributor
User avatar



Joined: Fri Dec 05, 2014 2:04 pm
Posts: 647
Been thanked: 41 time(s)
Has thanked: 2 time(s)
Contribution Points: 5
sir whats this plugin is about thanks


Top
 Profile  
Reply with quote  
 Post subject: Re: Read from registry plugin
Thanked: 2 time(s)  Unread post Posted: Thu Mar 05, 2015 11:49 am 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4520
Been thanked: 1145 time(s)
Has thanked: 131 time(s)
Contribution Points: 32728
Its used to read information from the windows registry database.
Generally not something needed except for very specific tasks, like reading the current start page of your internet browser, or reading the resolution inside a certain game etc (Not all games store this in registry, but many does).

If your not sure what the windows registry is, don't worry about it, you probably wont need to.

To manually view the registry, open "regedit" using the run-command in your start menu - Warning: changing anything inside the registry may cause severe problems for your windows installation and installed apps.

_________________
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  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

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:  


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