Messages - vitalyb [ switch to compact view ]

Pages: prev1 ... 21 22 23 24 25 [26] 27 28 29next
126
Download link

http://vitalyb.dcmembers.com/CSharpSDK.zip

Installation
1) Unpack the attached zip to: \My Documents\Visual Studio 2005\Projects\FARR Plugins
2) Copy FARR C# plugin.zip from \My Documents\Visual Studio 2005\Projects\FARR Plugins to \My Documents\Visual Studio 2005\Templates\ProjectTemplates.

Tutorial
Developing C# plugins for FARR is now easier than ever. To create your first plugin follow these steps:
1) Run Visual Studio 2005
2) File -> New Project -> Visual C# ->  FARR C# plugin (if you don't see it here, make sure you did step 2 in the installation).
3) Set the location of the project to: \My Documents\Visual Studio 2005\Projects\FARR Plugins\ (make sure "Create directory for solution" is checked).
4) Enter a name for your plugin and press OK. For the sake of the example we'll call it SamplePlugin.
5) Compile it. It should automatically be copied to FARR plugin folder and then restart FARR.
6) When FARR comes up you can trigger your plugin by writing "SamplePlugin" (case sensitive!).

If all worked well, you should have your very own first plugin! Go ahead and customize for your own needs.

If something is broken, don't panic, it is rather easy to mess the whole plugin simply by deleting one line too much in the main FARR functions. Just go back step by step until you find which part you removed.

Enjoy!

Simplified SDK

As you can see from the generated template there are 3 main classes that you will need to use:

  • FARRCSharpPluginBase - The base class of all the plugins. Contains the metadata that describes the plugin and accepts in its constructor the main ActionList of the plugin.
  • ActionList - Represents a list of actions. Your plugin must have at least one ActionList. ActionList is called with a certain string that causes its ActionItems to be displayed.
  • ActionItem - Represents a single action on the list, part of the representation is the text that is displayed on the item but also the kind of action that happens when the user executes an item.

For further understanding I suggest to play with the various functions of the classes. You can find better examples of use in these plugins (ordered by complexity):
  • FARREnviormentVariables
  • FARRGoogleCalendar
  • FARRTunes

News
  • 19/10/2008 The simplified layer of that allows a more simple and object oriented design of plugins also there is a new template that simplifies the creation of new plugins.
  • 12/02/2008 I've uploaded a new version of SDK and all my C# plugins (FARRTunes, FARRAltTab and FARREnviormentVariables). It should resolve the following issues:
    • The problem with "FARR won't close after program launch" as described here: http://www.donationcoder.com/forum/index.php?topic=12210.0
    • The error of "Unable to retreieve types" as described in the message-box picture below.
    • Now whenever there is an exception or an error you should see WHICH plugin was causing it.
    Make sure you update ALL 3 plugins (GCUpdater should help you out here). Besides that anyone that used SDK to create a plugin should get latest version and recompile (specifically, FARRGoogleSuggest).

What's in the package

  • InstallPlugin.exe - That's the part that is for all developers. If you put this little script to the "Post Build Event" (It exists most compilers) it will auto copy your plugin to FARR directory, close FARR and reopen it. This way, whenever you build your plugin, FARR is ready to test the latest version. For those who want to fiddle with the script I also included the source in InstallPlugin.ahk. For example, in my FARRAltTab plugin the PostBuild event looks like this:

    "$(SolutionDir)..\InstallPlugin.exe" "$(TargetDir)\" "C:\Program Files\FindAndRunRobot\Plugins\FARRAltTab\\"
  • FARR CSharp SDK.chm - I compiled using NDoc a pretty referece file, some was copied was Mouser documentation and some I wrote myself. It isn't complete but it is better than nothing :)
  • FARR CSharp SDK - The main solution that holds two projects. The first one is FARRPluginRCW which is written in CLI/C++ (managed C++) and holds the actual base class for all your C# plugins. The second project is the source of FARRAltTab. Use it as your main example as you develop your plugins
  • FARRAltTab source code - The source of the FARRAltTab plugin: http://www.donationcoder.com/forum/index.php?topic=10988.0
  • FARRTunes source code - The source of the FARRTunes plugin: http://www.donationcoder.com/forum/index.php?topic=11545.0

And more!

Known issues

  • If you don't see the C# plugin in the FARR plugin list after the installation then download the following update from Microsoft.
  • If you get the following messagebox:
            System.Exception: Unable to load the plugin C# assembly
            at FARRPluginRCW.LoadPlugin()
    It is probably because you got an old version of FARRAltTab. It is suggested to DELETE the folder of FARRAltTab and download the latest one.
  • Some people get the following error using some of plugins, it can be sometimes resolved by getting the latest version. This issue should be RESOLVED if it isn't, let me know: image.jpg
  • Currently there is a bug that limits the amount of active C# plugins to 1. If you are interested in developing a plugin, remove the FARRAltTab first from FARR plugin directory (See more info here).

Stay in touch

I will post all the updates/fixes for now to the SDK in this thread until it is deemed stable and can be merged with the main SDK.

Enjoy!

127
Find And Run Robot / Re: plugin problems
« on: November 23, 2007, 08:23 PM »
What could be the reason that on one of my XP machines FarrFox doesn't work?
I have the latest FARR and FarrFox v. 1.03.01.

I am pretty sure it is the problem Mouser mentioned. FarrFox is the only plugin that uses regular expressions for matching and it also has a keyword, it matches exactly the problem I was having.

128
FARR Plugins and Aliases / Re: New C# FARR Plugin: FARRAltTab
« on: November 23, 2007, 08:20 PM »
Interesting, as AutoHotKey works with #Tab as a hotkey...  which is what I was using, to invoke iswitchw.ahk (which I found on the forms here I beleive).  I think now I'll setup a macro to invoke FARR with #Tab,  sending "tab\s" as you suggest.

How would you go on invoking FARR from Autohotkey?

no need - FARR now has it's own hotkey system.. you can add the hotkey from farr to launch with tab\s
-Mouser

Yeah you can... But specifically on Winkey+Tab it says that this combination is unavailable.

so wait, now I dont have to hit ALT+TAB, I have to hit another hotkey
-Josh

Ugh. I got all hot and ready to a lengthy explanation.
Whew. Anyway, everybody thanks for the compliments and you're all most welcome :)

129
FARR Plugins and Aliases / Re: New C# FARR Plugin: FARRAltTab
« on: November 23, 2007, 04:12 PM »
great plugin vitalyb !

small bug, let say you have a window called "Desktop"...

you type : des and everything is ok "Desktop" climbs to the top of the list but now if you type x (or z or any other "wrong letter")
Desktop still show in the list, but when you press enter, it does not work


You're right. Able to reproduce it too. Will fix.

Btw, suggested key combination for invoking: Alt+CapsLock with the output tab\s

I tried to take over WinKey + Tab but it doesn't let me :(

130
FARR Plugins and Aliases / Re: New C# FARR Plugin: FARRAltTab
« on: November 23, 2007, 04:09 PM »
A config window to tell the plugin to ignore certain windows or to show some windows that don't appear on task bar.

this would be very nice.

can i also request:
option to ignore (not show in list) any windows that are not minimized.


Sure! Added to todo.
Oh and almost forgot. Thanks a lot to Mouser for a very active support during development! :Thmbsup:

Pages: prev1 ... 21 22 23 24 25 [26] 27 28 29next
Go to full version