topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 6:13 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - joshuawood [ switch to compact view ]

Pages: [1]
1
Find And Run Robot / Re: Stop FARR From Searching Further?
« on: May 06, 2009, 01:14 AM »
I like the idea of a beep and allow the user to key again, rather than guessing. Unless it could always guess correctly ;)

2
Find And Run Robot / Re: Stop FARR From Searching Further?
« on: May 04, 2009, 02:29 AM »
Or just simply stop on pressing one of the F-keys. That's what I use to launch programs on my laptop (no discrete numpad). I have accidently launched the wrong program due to this behaviour on a few occassions also. The problem however lies in the event process. When you press say an F key, that event might be behind the update list event and redraw event, so in this case the wrong program will still get launched, even though at the time of the F key press it appears to be correct. I doubt there is much you can do to solve this. It's simply how things work.

3
FARR Plugins and Aliases / Re: System Tray plugin
« on: April 07, 2009, 05:47 AM »
Hi mouser,

Does this version work for you regarding the click events? The only thing I've done differently is compile this for x64 only. Worth a short, it maybe some data types were not getting converted correctly from 32 to 64bit, such as ints. But my understanding is that 32bit code should run fine in a compatibility mode under x64. Give it a shot anyways.

4
Find And Run Robot / Re: Moving from Launchy
« on: February 20, 2009, 09:53 PM »
skajfes, I don't see what time and effort is required to setup FARR. You just install, launch it and start typing what you want. Couldn't be simpler. I agree that if you want alias and such it takes more time, but you don't need to use all this. For simple searching, it's as quick and easy to set up as any other launcher. I will never go back to any other launcher.

And if you want the whole drive, use Everything as you suggested. You can even get a FARR plugin for it :) Instant searches ala launchy, but still with no indexing or performance hit. Perfect.

5
FARR Plugins and Aliases / Re: System Tray plugin
« on: February 20, 2009, 09:47 PM »
Hi, joshuawood,

I tested PS Tray Factory recently but it didn't quite work for me, so I was very interested to discover your plugin.

A few things that are not quite working yet (on my system - XP Home) that I hope will help you :

* FARR itself appears as a folder icon in the list instead of the default white F in the blue circle which is how it appears in the tray

This is by design. Currently I have issues retrieving the icon of FARR, so I ignore it. This defaults to a folder icon instead.

* I have three hidden XP icons right now - two appear in the plugin's list, the other doesn't
* ZoneAlarm which is not hidden doesn't appear in the plugin's list

By "hidden" do you mean they are visible in the tray, but are hidden the by << icon? Or are you using a program to totally hide them?

* FARR doesn't disappear once I have picked an entry

This is by design. It's easy enough for me to change. Otherwise, if you go into FARR options, settings, Window mode/focus and select the option to hide FARR when it loses focus, it will also then work as you desire.

* I do see Volume, even though you said that you didn't know how to get system icons such as this

The volume and other system icons are only an issue on Vista, not XP.

* trying to select an entry with no tooltip and therefore no title causes an Access Violation - I won't do it again but maybe you could hide them in the first place

This is interesting. It shouldn't, but there are several funny things with this plugin. What software or such does not display a tooltip? I don't have anything to test here, so let me know so I can perhaps try.

I would like to continue work on this, unfortunately most of the code is not mine, and it's far beyond my ability to debug, even though I can follow the basic gist of what it's doing. I've just pieced things together.

Mouser has suggested an alternative method to obtaining the icons, so I'll try and get that going. Icons are really a last issue for me though, working functionality for all is the main goal before beauty.

Thanks for trying. I will post the source in the next few days for anyone interested, like I said I would.

6
FARR Plugins and Aliases / Re: System Tray plugin
« on: February 19, 2009, 03:23 AM »
What OS and what version (32 or 64) is on your desktop?

I've noticed the plugin doesn't load under Win 7. I havent looked at this plugin for ages, been too busy. I would like to try and get 64 bit working for Mouser at least ;)

7
Find And Run Robot / Re: Moving from Launchy
« on: February 19, 2009, 03:21 AM »
FARR isn't much slower than lanuchy, plus it doesn't need to reply on indexing like launchy, so it's always 100% up-to-date. Indexers are only as current as their last index, and take CPU/disk hits to do so.

Everyone goes on about launchy. It's a shame, but I just don't think many people even know about FARR.

8
FARR Plugins and Aliases / Re: System Tray plugin
« on: January 18, 2009, 02:17 PM »
Does FARR "beep" once you finish typing "tray"? I have found that the beep does indicate some error in the plugin occuring. You get the menu listing left/right/double click once you execute a result right? But just nothing happens after that?


9
FARR Plugins and Aliases / System Tray plugin
« on: January 16, 2009, 08:37 PM »
Hi all,

Here's an alpha of a plugin I'm tried to put together. It lists the system tray apps you have running, and allows you to simulate mouse clicking them. Extract the zip to your plugins directory. You can activate it by typing "tray". Once an item is launched, it will bring up a menu asking which mouse button you wish to simulate. Under Vista, the menu hotkeys do not appear to be highlighted. You can press l for left click, r for right click, d for double click for a shortcut. The menu will appear where the mouse cursor is. I can make my menu appear wherever I like (I had it at the top of FARR at one stage), but the systray menu can only appear where the mouse is due to the way it works. I could however move the mouse to somewhere like the top of FARR, but some people might not like this, so I've opted to make my menu appear where the mouse is, as does the systray menu.

This is incomplete. There will surely be issues and bugs. Some that are known:

Under XP:
-Icons do not have transparency (they are in BMP format since Visual Studio has no ICO encoder, if anyone can help pls do).
-Network icons don't get their text sometimes. Eg LAN or Wireless. Retrying once or several more times will get it ok. So if you see something with no text, it will probably be a network icon. You can still access the functions are normal however.

Under Vista:
-Icons have transparency! Same format as above, so Vista must render something differently. And proper ICO format would still be best however.
-System icons such as volume, network, battery indicator are found in a different area of the tray. I'm not sure how to get these apps yet, if possible.

Under Se7en:
-Since the tray has changed a bit, those icons that are "hidden" in the up arrow section are not displayed by this plugin. However unlike Vista, the battery, volume, network indicators are correctly found (MS must have recombined the "split" tray sections Vista used).
-The mouse simulation doesn't work for all icons. Eg, left click on volume doesn't work, but does on battery.

Under all:
-Dunno how to get the clock, if possible.
-FARR tray app itself has issues with the icon for some reason. First time the plugin will get it ok, then other times fail. With my test app sometimes it will always fail, other times it will always get it; I haven't been able to reproduce the get once then not again issue. However, I'm sure it's to do with why I can sometimes never get it (exception is thrown). Currently I ignore the FARR icon to avoid this issue.
-You can't append search terms. Eg, you can't type "tray win" to find only tray apps with "win" in their name. This will come later, the SDK needs to be updated first I think.
-Some tray names will be funny, or possibly missing. I can't do anything about this, I can only relay the tooltip text of the tray app (no tooltip = no name).

Note: If you hear a "beep" once you type "tray", it indicates an error has occurred. I'm not sure why this sometimes happens. If it does, try the "no icon" build attached, and let me know if the "beep" goes away with that version.

Tested on XP Pro 32bit, Vista Home Premium 32bit with UAC off/on, Se7en Pro 32bit with UAC off. With UAC on it will not currently work if you load FARR normally. You need to run FARR "as administrator" for it to work.

This plugin has been tested on FARR 2.80.02 under Se7en only, but should work under other OSs ok. 64 bit OSs probably won't work, I couldn't figure out why.

Important credits:
// Hacked together by Joshua Wood, Jan 2009, from the following parts:
// Big thanks to vitalyb for his FARR C# SDK: https://www.donation...ex.php?topic=10992.0
// System Tray enumeration code (slightly modified) from Karl Wagner: http://www.aeroxp.or...ystem-tray-from-net/
// Big thanks to skajfes and mouser on donationcoder.com forums for their help
// Additional extras\coding by Joshua Wood

10
Ok I've got it working. Something else if a different place prevented the plugin from working correctly. Not sure why, but it's fixed.

Is there a way to register a Keyword rather than a RegEx to activate the plugin? I want FARR to use terms after my plugin word to filter results.

Eg, "tray" will list all items. "tray win" will list only tray  items containing "win". Mouser said that FARR will do this itself if tray is a keyword, but if it's a RegEx then I need to code it.

11
Still no luck. I understand what you're saying, it makes sense to have the results on the this Object, but I don't see why I should also need to populate SourceList. Anyways, whether I do or don't, it still doesn't work; again, this.Count returns the correct number of items, so it is populated correctly (I had a msgbox in there):

        public override int GetActionsCount(string KeyKeywords)
        {           
            string[] Files = Directory.GetFiles(m_TempPath);     // remove temp icon files       
            foreach (string FileName in Files)                       
                File.Delete(FileName);           

            SourceList.Clear();
            EnumTray.GetTrayData(out buttonData);       // populate tray data
            if (buttonData != null)
            {
                foreach (TrayIconData trayData in buttonData)   // fill SourceList
                {

                    if (trayData.button.fsState != 8)   // only add if button is not invisible
                        SourceList.Add(new Actions.FARRTrayAction(trayData, m_TempPath));
                    if (SourceList.Count > 10)
                        break;
                }
                this.ClearTemporaryItems();
                foreach (Actions.FARRTrayAction item in SourceList)     // Copy SourceList to thisList
                    this.Add(item);               
                return this.Count;
            }
            else return 0;           
        }

It seems the same as your code, except I do nothing with the search keywords as I don't need to (I think). I also need to reset the SL using SourceList.Clear()

12
Ok, still don't get why it doesn't work for me. Here is what I have:
    class FARRTrayList : ActionsList
    {
        private TrayIconData[] buttonData = null;
        static string m_TempPath = null;

        public FARRTrayList(FARRCSharpPluginBase pluginBase)
            : base(pluginBase, "^tray")
        {
            m_TempPath = Path.Combine(System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Temp");
            Directory.CreateDirectory(m_TempPath);

            //SourceList.Add(new Actions.FARRTrayAction(null, m_TempPath));
            //SourceList.Add(new Actions.FARRTrayAction(this.PluginBase));
        }

        public override int GetActionsCount(string KeyKeywords)
        {
            MessageBox.Show("In GAC, m_TempPath = " + m_TempPath);
            string[] Files = Directory.GetFiles(m_TempPath);
            MessageBox.Show(Files.Length.ToString());
            foreach (string FileName in Files)
            {
                MessageBox.Show("Deleting file: " + FileName.ToString());
                File.Delete(FileName);
            }

            EnumTray.GetTrayData(out buttonData);       // populate tray data

            if (buttonData != null)
            {
                foreach (TrayIconData trayData in buttonData)
                {
                    if (trayData.button.fsState != 8)
                    {    // only add if button is not invisible
                        MessageBox.Show("Found tray app: " + trayData.Text);
                        SourceList.Add(new Actions.FARRTrayAction(trayData, m_TempPath));
                    }
                    if (SourceList.Count > 10)
                        break;
                }
                MessageBox.Show("IN GAC, with data count: " + SourceList.Count);
                return SourceList.Count;
            }

            else
            {
                MessageBox.Show("IN GAC, with no data count");
                return 0;
            }
        }
    }

It appears to work ok, but something is still not quite right. The msgboxes get called correctly. Each time the msgbox will display each tray icon's name, and count them correctly (ie, they've been added to the SourceList). If I re-execute my plugin again after loading a new tray app, it is correctly enumerated, so it is now dynamic as desired. However, still no results show, even though it is getting the data correctly. It correctly deletes any existing icons.

Edit: I should mention that this section of code:
            EnumTray.GetTrayData(out buttonData);       // populate tray data

            if (buttonData != null)
            {
                foreach (TrayIconData trayData in buttonData)
                {
                    if (trayData.button.fsState != 8)
                    {    // only add if button is not invisible
                        MessageBox.Show("Found tray app: " + trayData.Text);
                        SourceList.Add(new Actions.FARRTrayAction(trayData, m_TempPath));
                    }
                    if (SourceList.Count > 10)
                        break;
                }
                MessageBox.Show("IN GAC, with data count: " + SourceList.Count);
                return SourceList.Count;
            }
without the msgboxes of course, does work as expect when placed in the constructor, except then it is not dynamic. The results will show however, unlike when in GAC. Hopefully I'm just missing something very simple.

13
That's what I think GetActionsCount does also - gets called everytime; but it doesn't appear to work for me. I will investigate further.

14
Thanks skajfes, you're right about the PathItem needing to be set. It also appears that it needs to be unique. I just it to the same fixed string for each result, and it would only display 1 result. Change it to a result unique string and it lists all results.

Could you please explain what GetActionsCount does more? Do I need to use it? I currently do nothing with it, and don't appear to need to.

Further, I'm trying to remove all files in a set folder when my plugin is called. I have this code in a few places, but it only appears to be called when FARR is first loaded (and hence the plugin). I would have thought having it in the ActionList constructor would mean it got called everytime to the plugin got called, but doesn't appear to do so:

static string m_TempPath = null;

        public FARRTrayList(FARRCSharpPluginBase pluginBase)
            : base(pluginBase, "^tray")
        {
            m_TempPath = Path.Combine(System.IO.Path.GetDirectoryName(Assembly.GetCallingAssembly().Location), "Temp");
            Directory.CreateDirectory(m_TempPath);
            string[] Files = Directory.GetFiles(m_TempPath);
            foreach (string FileName in Files)
            {
                File.Delete(FileName);
            }
           
            EnumTray.GetTrayData(out buttonData);       // populate tray data

            foreach (TrayIconData trayData in buttonData)
            {
                if (trayData.button.fsState != 8)     // only add if button is not invisible
                    SourceList.Add(new Actions.FARRTrayAction(trayData, m_TempPath));
                //if (this.Count > 10)
                //  break;
            }
        }

Edit: On further testing, it appears that FARR creates an instance of this plugin at runtime only. So using the above code, it is only called once, and hence my results list is not dynamic. How do I make the results list update each time the plugin is executed by it's regex? Is that what I need to use GetActionsCount for?

Edit again: I'm not sure if the above edit comment is actually correct. In some strange cases my first plugin call will not pickup the FARR tray icon, but sometimes after a while it does. But not another program loaded after FARR has started. It's a bit strange.

What I want to do is call
EnumTray.GetTrayData(out buttonData);

            foreach (TrayIconData trayData in buttonData)
            {
                if (trayData.button.fsState != 8)     // only add if button is not invisible
                    SourceList.Add(new Actions.FARRTrayAction(trayData, m_TempPath));
                //if (this.Count > 10)
                //  break;
            }
each time I execute the plugin by typing in it's regex.

15
Thanks for the help skajfes. I've got a better idea now after look at the iTunes code some more.

I seem to need to put my code in the constructor:

public FARRTrayList(FARRCSharpPluginBase pluginBase)
            : base(pluginBase, "^tray")
        {            EnumTray.GetTrayData(out buttonData);       // populate tray data

            foreach (TrayIconData trayData in buttonData)
            {
                if (trayData.button.fsState != 8)     // only add if button is not invisible
                    SourceList.Add(new Actions.FARRTrayAction(trayData, m_TempPath));
                //if (this.Count > 10)
                //  break;
            }
}

If I put it in GetActionsCount it doesn't work. That's ok though. However, on executing a result, it does nothing except hide FARR. I have a simple MessageBox.Show() string printed at the moment (in Execute()), but the MessageBox doesn't show?

16
Ok, I'm still confused. FARRTunes still uses SetSearchParameters and SetFeatureParamaters, and won't compile for me as it stands. Can anyone help?

17
skajfes, any chance I could pls look at your source so I can figure it out?

Edt: I didn't see you post about the missing/changed SetSearchParameters method; Perhaps I need to examine the iTunes plugin more; I'm new to all of this.

18
I'm having troubles compiling, using VS2005 and the latest SDK. I've copied parts from FARRAltTab, but I get "no suitable method found to override" for SetSearchParameters and SetFeatureParamers. I loaded the template, changed the class to my name, but left the namespace alone. Then just copied some bits from FARRAltTab. It compiled when I initially opened the template ok.

I note all the examples inherit from FARRPluginBase, not FARRCSharpPluginBase, but I get more issues if I change it to the former base, suggesting the template and SDK has changed since the example code was written.

19
Find And Run Robot / Re: Feature request: Access system tray icons
« on: January 01, 2009, 03:00 PM »
I don't see why it's not. I've seen programs that can "merge" all the tray icons in to 1, and clicking on that 1 produces a drop list to select each icon, which you can right/left click on as normal. So there must be some way to enumerate the icons, prob with the win32 api. Alternatively, UI automation might be able to be used, as was suggested in my quick googling on system tray coding: http://msdn.microsof...#UI_Elements_compare

But from the above software, called systrayx http://www.xdesksoft...re.com/systrayx.html it is most certainly possible.

Edit: Bit more searching turned up this code:
http://www.codeproje...s/ShellTrayInfo.aspx

Looks very similar to what I was suggesting. It seems a bit buggy, eg the right click menus remain, but it's essentially everything that should be needed to do the job. I would suggest reading the comments also.

20
Find And Run Robot / Feature request: Access system tray icons
« on: December 31, 2008, 12:43 AM »
Hi,

Since FARR has done away with my start menu, I figured it would be nice to do away with the system tray also, be it natively in FARR or via plugin.

Here's how I'm thinking it would work:

Some alias, say "tray", would enumerate the tray icons and list them in the FARR results window. 2 user-definable hotkeys, one for left mouse click one for right, would trigger the assocaited tray menus, if available (ie, not all tray icons have left/right click options, some have both). Alternatively, you could simply left or right mouse click on the item, but that's somewhat defeating the use of FARR :)

So, you'd get your list and then press for eg, ctrl-fx for left click where fx is the function key corresponding to the desired tray icon in the results window. Or alt-fx for right click. It would then display the appropriate menu as it corresponds to that mouse click for that icon.

You could further refine the search results by for eg "tray <search term>" for those with more than 10 tray icons, where search term works like FARR's current search ability, including non-contiguous results.

This way you could hide most (all, if possible) tray icons but still easily and quickly access them, saving valuable taskbar real estate, esp for those of us on laptops with only 1280x800 screens.

Oh, and happy new year to all.

Regards,
Josh

21
Find And Run Robot / Re: suggestion for keyword searching
« on: July 15, 2008, 10:30 PM »
Nice, I'll be on the look out for it.

Thanks.

22
Find And Run Robot / suggestion for keyword searching
« on: July 15, 2008, 06:23 PM »
Hi, I was wondering if there is any intention to implement searches like Launchy or other similar apps do. Best understood with an example as I'm not sure what search logic you'd call it:

If I want to search for "Mozilla Firefox" under FARR I need to type "fox". I could also find it with "f fox" or "m fox". With Launchy I can find it with "ffox" or "mfox" so it's searching over all the words in the title and is not fussed on spaces (although I note that "f fox" doesn't work).

It's just a little quicker and simplier than having to put spaces in... esp when, for eg with FARR, "m fox" makes sense but "f fox" doesn't, since "firefox" doesn't have a space in it.

This would be a great addition.

Edit: Good example here, they call it Fuzzy Text matching:
http://trydash.com/home/

Cheers,
Josh

Pages: [1]