Reducing redundancy in (m)IRC

28. May 2009

The old but popular IRC client mIRC is richly featured but it has a style problem, so it gets teased, and really the user interface is the application.

before image

XChat's alignment of user text inspired me to add the same feature to mIRC.

Then I realized there was no need to repeat timestamps and nicknames when nothing had changed, and my script became something more, something wonderful.

after image

After this success I had to take it a step further.

When is it ever relevant to view join/parts in IRC?

  • When a user has recently spoken.
  • When they flood indicating the onset and end of a netsplit during which parties are cut off from each other.
  • When you're a participant and would appreciate a rough estimate of the visibility of your text, considering it could have been scrolled off-screen by join/parts visible to other users.
  • When a join/part flood is occurring and it's a bit too rocky for conversation.

Essentially when it's relevant to the conversation.

These are in fact the circumstances in which the script makes them visible. It begins in read mode with clutter minimized, only reporting departures of users whose text is most recently in your buffer. If you become active in the conversation the mode changes, and the dialogue is intelligently interspersed with brief updates of join/part line counts. Floods and netsplits are always reported, and tersely.

netsplit

line counts

Other features:

  • Text is aligned, and the alignment point is easily moved.
  • Simple and customizable. The timestamp and nickname are checked independently for repetition, and look to your settings for how to format them in either of these cases. These screenshots are one very specific (and currently default) example.
  • Nicknames at the beginning of text are highlighted (formatted however you specify). There's room for improvement but it works pretty well.
  • UTF-8 Unicode support.

Download | Changelog

Installing the script is as simple as extracting the .mrc files from the zip somewhere, and loading the primary one into mIRC:

/load -rs C:\path\to\script\succinct.mrc

After which you will be greeted by lovely test output similar to this:

test output

If you've similar results, other than the color theme and the highlight line which merely allows highlighting and states your primary IRC nick, then everything should be running smoothly.

Formatting and a few settings can be adjusted from mIRC's Variables dialog, take a look at the top of succinct.mrc for details.

Akismet support for BlogEngine.NET 1.5

15. May 2009

Since I previously mentioned comment spam I've experimentally bolstered the defenses of this blog in my update to BlogEngine.NET 1.5, and... received the same spam. It's manually entered, and highly deceptive, frequently a thanks, X helped me with Y or just ever so subtly off-topic, often only the spam URL giving it away. At least this has absolved naive captcha of blame (still a little randomization in field names for playback bots might be a good idea).

So, BlogEngine.NET community, let's do something about the manual spam problem and integrate Akismet with a spam moderation queue like the WordPress plugin.

I've personally tackled it in my usual lazy better-things-to-do hackish fashion and converted BlogEngine's entire moderation queue into a spam queue (essentially moderation enabled but non-flagged spam is immediately approved). Who wants to have to moderate everything anyway?

The actual Akismet comment checking is accomplished with Joel Thom's ASP.NET API you may need to download.

Following that, here are the relevant BC comparison reports:

BlogEngine.Core 1.5 with Akismet
BlogEngine.Web 1.5 with Akismet
Joel.Net.Akismet.1.0.1 for BlogEngine.NET

Don't expect perfection, in particular my error handling is probably unduly sparse. I'm sure I'll notice it when it breaks painfully.

You will need a WordPress API key to work Akismet in the first place. Get one and specify it with your blog URL at the top of BlogEngine.Web\User controls\CommentView.ascx.cs.

Further you'll have to compile the changes to Core, update the dll in Web's bin, add a reference to Core in Joel.Net.Akismet, compile, copy dll assembly, and reference that from Web as well, but you already knew that because you're a programmer and the using references give it away anyway. Right? ;)

Or you could use this tidy package I've provided, keeping in mind to only replace files/assemblies you haven't modified from the stock download, and merge the rest. (If you've no interest in source code you may ignore the BlogEngine.Core and Joel.Net.Akismet.1.0.1 folders, the compiled assemblies are already in BlogEngine.Web.)

You must also Enable comment moderation.

Additional Details

  • Commenters are notified if their comment requires moderation immediately (the JavaScript now provides, very hackishly, an isModerated case).
  • Moderated comments have a new administrative Ham link for submitting false positives back to Akismet (this also approves the comment).
  • Approved (visible) comments have a new administrative Spam link for submitting false negatives back to Akismet (this also deletes the comment).
  • These links have been added to the corresponding admin comment notification emails as well.
  • Comment moderation has been toggled on in settings.xml (for XML data source blogs).
  • The Joel.Net.Akismet API has been modified to take the HttpRequest and BlogEngine.Core.Post directly.
  • Only labels.resx has been updated, this package is not localized (and could be a little cleaner for that), I'm but one English speaking man.

Please improve upon this, make it an extension (I don't think it can be 100%), or otherwise more directly incorporate it into an official version. I mostly just have time to blog about it. :)

Implementing a naive captcha in BlogEngine.NET

30. January 2009

A couple years ago Mad Kristensen implemented an invisible captcha into BlogEngine.NET, but as my blog has attested to, this is not enough.

Instead of inconveniencing readers with a captcha, you can use your own clever validation trick. The more unique it is, the less likely it will be automatically discovered and circumvented. When it is, you need a new trick.

A naive captcha is basically a captcha that's always the same image, and works off of the principle that you're site isn't important enough for spammers to manually specify (how cheerful!), but if it's good enough for Coding Horror it's good enough for me.

Of course being an image itself resists the automated discovery of this particular trick, and if it is discovered, manually or otherwise, it's easy to change the image (it need not even be of text).

Implementing my own naive captcha here has been quite effective so far. My next step may be Akismet for manually entered spam.

Implement your own

The patched (against vanilla BlogEngine.NET 1.4.5) files are available here. For making the change to your existing and customized blog, take a look at this comparison courtesy of Beyond Compare 3, or view the compact version below, this post needed some color.

You'll want to change the paths and formatting in CommentView.ascx to suit your liking, also the word "chicken".

Oh, and don't forget that my code sucks, sometimes intentionally even, because I'm lazy. Someone please be my guest and make this a properly coded BlogEngine.NET extension. Furthermore my first attempt was with the strictly-server-side RegularExpressionValidator control you see commented out below, which I couldn't get to work, so I used existing mechanisms instead.

Modified (mostly new, really) code is in red. New code is in blue. The rest is context.

Gaming the game: Cheat Engine, AutoHotkey, and Jedi Academy

31. December 2008

Pretending to be a Jedi can be a lot of fun; it makes you feel awesome. But what's even more fun is writing code to actually be more awesome. And that, my friend, is the most awesome thing of all.

Which brings us to Jedi Academy. If you fall, you need to get up. If you're force choked, you must retaliate or be strangled to death. It's predictable, it's repetitious, and you could be a whole lot more awesome at it. Why press a combination of buttons to execute a special move when you could use only one, with complete reliability? It's like what a programmable controller did for my Mortal Kombat prowess, with an even faster reaction time.

programmable controller

This type of botting (gamer augmentation?) is a bit more like WOWGlider than an aimbot or trainer, but they're all fairly similar. It's essentially interaction with the game's memory that makes this type of coding difficult, but with the right tools and some good examples you can be on your way.

Cheat Engine

The most important tool in your arsenal is the memory scanner (and more), Cheat Engine. Knowing the circumstances of your character, opponents, and environment means reading the game's memory, and with CE you can find the appropriate memory addresses for things such as health, position, and action/animation.

I tested a lot of memory scanners, and CE was easily the most powerful and useful, capable of many advanced features. To get your foot in the door using CE try the built-in tutorial, which is also explained on the forum. Becoming truly proficient with CE is hard work, you'll need to reason about data types and arrays of structures representing characters and items, learn to master pointer scanning and pointer integrity testing, and certainly remember to save your work. You might need to break out Hex Workshop to compare memory dumps: "Ah, this value is the same for each tauntaun, and a different value is the same for each health pack, must be entity type!".

AutoHotkey

Of course you'll need a language/program to code in. I chose AutoHotkey because it's designed for sending mouse and keyboard commands (as well as manipulating windows, controls, and plenty of other things) and I'm familiar with it. Some further information:

  • it's very lightweight (<2mB)
  • it's phenomenally well documented (in fact, the best I've seen!)
  • scripts aren't natively compiled, but should be as fast as you'll need
  • scripts can be bundled with AutoHotkey to make stand-alone executables (.exe)
  • Dll support, such as the standard Windows API, via DllCall
  • Graphical user interface (GUI) support
  • Large community

Now AutoHotkey doesn't have built-in memory management functions, but that's why I wrote my own.

Jedi Academy

Jedi kickin' ass

Here's a list of some fun things my script can currently do:

  • Allow you to execute a special move (lunge attack, flip attack, and cartwheel) with one keypress, while retaining your character's movement. (This was trickier than you'd think, and it's really cool.)
  • Allow you to hold down a button for mindtrick, and have your Jedi confuse whomever you look at, without wasting force if they're already tricked. (This is really fun and makes specifically mind trick level 1 quite powerful.) The already-tricked routine needs some work though, see code.
  • Automatically kill whomever you look at if you so desire.
  • Automatically retaliate with force pull if choked.
  • Automatically jump up if knocked down.

Some additional ideas I was only able to rough out:

  • Instantly kill an enemy with a force choke smash into the ground.
  • Perform a sideways cartwheel attack but actually fly forward, not left or right.

It's also fairly easy to add code to:

  • Make dynamic doors disappear by changing their item type, and walking on through!
  • Change item types so health packs give you grenades, etc.
  • Move certain level elements by changing their coordinates. (Unfortunately only works on already animating things, like the rather wickedly deadly vent fan at the intro of the prisoner rescue mission. I'm sure it's possible to make it work on any entity somehow.)

Some crazy ideas I hope someone attempts:

  • Perform a flip attack but spin around to actually continue facing forward.
  • Determine the most deadly attacks in the Jedi's arsenal by recording average duration of animation sequences vs. damage inflicted.
  • Automatically scan for certain nearby items, turn to face, perform an action. For example, automatically force pulling nearby health packs and grenades, without interrupting the player.
  • Automatically saber throw accurately into groups of enemies (okay, this one is another level up in complexity).

Let's have it!

View and download the code here ("View raw file", File->Save As), it's licensed under the GPL. To get it to work you'll also need to download my memory management script into the same folder, and install AutoHotkey. Then edit some configuration values at the top of the main script, and run it. After that your Jedi Academy game should be "enhanced". :)

Everything here is pretty much aimed at a programmer audience, and writing this script was just a hobby of mine I finished ages ago that I thought was worth sharing, so I'm not sure if/how it will work for others, but if you're having trouble leave me a comment and I may be able to help. It's designed for singleplayer, and changing things requires programming knowledge.

If you do anything really cool with it let me know, maybe record a video I can put up, or we'll get your code committed. I'm pretty much washing my hands clean of this now that it's public, I have newer projects to work on. :)

Group/Sort Tabs Firefox extension

19. July 2008

This extension adds group and sort support to tabs in Firefox.

8-07-08 In addition to having been approved by Mozilla (hooray!), this project has a new support/discussion/feature page on UserVoice! Please drop by and leave me a suggestion, the site is very easy to use, and no registration required.

The source code and changes are still available on Google Code. />

The earlier FF2 version of this extension is "Sort Tabs By ...".

Features

  • Optionally group your tabs by hostname. (More to come.)
  • Sort your tabs by last opened date, hostname, or last browsed date.
  • Intelligently handles the opening/restoration of multiple tabs at once, only sorting when the URL of all opened tabs is known.
  • Sorts tabs immediately upon navigating to a different URL, prior to full page load.
  • Tabs can be manually moved into other groups.

Requirements

Known Limitations

  • The entire host before the first / is matched when comparing host names, so sites with different subdomains (like addons.mozilla.org and developer.mozilla.org) will not be grouped together. This can be undesirable with certain URLs (such as img161.imageshack.us and img299.imageshack.us).
  • You can only manually move a tab into another group if you drop it somewhere in the middle of the group (no edges). I'd like an easy and intuitive method of grouping/ungrouping tabs for the future.
  • Manually rearranging tabs out of the sort order is not a feature of this version. I've worked toward supporting it, but decided to release without it. Also, I may be overestimating its importance.

Recommendations

  • Using ChromaTabs or ColorfulTabs configured to color code your tabs by URL.
  • Similarly the 'close similar tabs' or 'close other tabs from this host' features of Tab Mix Plus and Closy may be useful.

The Elder Scrolls IV: Oblivion Leveling Assistant for optimal stat gain.

1. May 2008

I've been playing Oblivion recently, and it's been fun, but I was slightly irritated with the leveling system, so I fixed it.

Here's an overview of how (power?) leveling works in Oblivion:

You select 7 "major skills" and the rest become "minor". Skills advance as you use them. Major skills are no different from minor except for an initial bonus and every 10 major skillpoints gained is a new level, at which point you must sleep in a bed to level up and continue gaining skillpoints. Leveling up has you select three of your stats to increase by respective bonuses, but here's the catch: the bonus depends on your advancement in the three skills related to the stat.

This leads to a sort of reversal of priorities. Your "major skills" are more of the opposite, as you postpone them, and thus leveling, to achieve the necessary gains in "minor" skills to maximize the stat bonus when you do finally level. Selecting your least naturally used skills as major skills is in fact to your advantage. A bit strange, but not a dampener on the fun - you can, after all, go all out in the 14 other skills without fear of accidentally leveling and botching your stat bonuses.

There is quite an annoyance with this approach though. Once you reach the maximum +5 bonus in a stat, skillgain in that area is no longer worth your time until you level up (you'd only be advancing a skill, instead of a skill and a stat) - and aside from gratuitous number keeping, there's no way to see exactly how close you are aside from leveling up, noting the advancement screen, and then restoring to an earlier saved game. Something which becomes extremely tedious considering you must advance to just prior to leveling, save, travel to a bed, use a skill to reach the level point, sleep, level up, pick 3 stats and confirm so you can get to open the main menu, and then restore to your saved game.

An annoyance until now anyways! Enter: Oblivion Leveling Assistant.

Utilizing the ever helpful and entertaining Cheat Engine, I put together a little AutoHotkey program which displays the current points you have towards a stat since your last level. It takes 2 skillpoints for a +1 stat bonus, and +5 is the maximum, so all you need to do is focus on reaching a value of 10 (or more, but don't waste too many) in the three stats you would like to apply the bonuses to before you gain that last major skillpoint, and that's it. Be sure to put those 10 required major skillpoints towards the stats you'll be selecting as well, or you'll be doing extra work!

The Elder Scrolls IV: Oblivion Leveling Assistant
The Elder Scrolls IV: Oblivion Leveling Assistant Compact Mode

This was a tricky update, so if clarification is needed ask me in the comments.

5-08-08 There's also at least a few mods for Oblivion which overhaul the system to something more acceptable, these might be a lot more useful so you should check them out. (Especially if you play fullscreen and/or use a single display.) Take a look at other mods as well, there's sure to be some you'll consider essential.

I also only just discovered the UESPWiki and its wealth of Oblivion and Elder Scrolls information (including much more in-depth leveling guides), so hopefully I've learned GameFAQs is no longer the one-stop-shop in this new wiki world. />

General productivity enhancements for Vista (and XP): Taskbar

17. November 2007

This is the first installment of my own personal list of general productivity enhancements for XP/Vista, many of which involve small, resource friendly 3rd-party tools. My general criteria for OS supplementation tools is as follows: They should be simplistic, small, and speedy. It's not much use if it doesn't feel as if it's a part of the operating system itself.

Unfortunately problems and incompatibilities can arise, and there will be a section at the end to address these.

The Taskbar

If you're like me you would prefer to have all of your notification area icons visible. However you may find yourself with less than sufficient room on the taskbar for the tasks themselves. This is especially true if you have a rather wide quick launch area - which can be very valuable, as you'll see in a moment. Some attempt to alleviate this issue by expanding their taskbar to two separate rows, but the additional bulk at the edge of your screen isn't very pleasing, nor will your pointer movement be as precise now that you've introduced a soft edge instead of the single hard edge of your monitor.

Likewise XP/Vista's similar task grouping feature has always struck me as a rather primitive and ineffective solution since you lose quick access to all of your tasks.

A very neat way of opening up space on your taskbar is to move minimized windows to an auto-hidden dock using RocketDock: a minimally intrusive, adequately configurable, speedy little Apple-esque application dock.

Configuring RocketDock version 1.3.5 as a Minimized Window Dock

RocketDock in action as a minimized window dock.

Although RocketDock is primarily an application launcher, it can be configured to only display minimized windows, as well as be out of your way. Windows minimized to the dock are not displayed on the main taskbar.

I went to the trouble of exporting my RocketDock registry settings and comparing them to the defaults. What remains is a Windows Registry file of only the relevant settings for the particular transformation you see pictured above. I have annotated each of the settings in the file, and you may download it here: RocketDock v1.3.5 minimized window configuration.reg (3.07 kb).

I strongly advise that registry files from every source be previewed in a text-editor before being imported to the registry, due to the awesome and unchecked power that registry modifications can have on your system. Previewing the above file you should be able to note that the only registry key affected is RocketDock's current user settings at HKEY_CURRENT_USER\Software\RocketDock.

Be advised: Holding the Ctrl key when minimizing a window is designed to bypass minimizing to the dock. Holding Ctrl+Alt+Shift will toggle whether or not to minimize that window to the dock normally (these are stored in the registry as the process and window class names I believe).

2-16-08 On Windows Vista systems RocketDock utilizes Desktop Window Manager (DWM)'s public API for reliable live window thumbnails. However, rather unfortunately, in this mode the application's icon is no longer overlayed on the thumbnail. If you can stomach semi-frequent inaccurate thumbnails, then adjust RocketDock.exe's properties and enable Windows XP compatibility for the old (and in my opinion, more useful) behavior seen in the updated screenshot. Or, as I will be doing, you could register with RocketDock's bugtracker and gently persuade PolyVector to add the icon overlay to Vista DWM thumbnails as well.

Your taskbar is on the wrong edge

Taskbar at top of screen, near application menus.

This may be a subject of contention, and you should of course use whatever you prefer, but in my opinion the taskbar is on the wrong side of the screen. It should be on the top, not the bottom. Although perhaps jaded from all of the separate versions of Windows happily placing the taskbar at the bottom, I had a moment of clarity in which I questioned the traditional, and I moved beyond. Why is the top edge the better edge? The reason is fairly simple: that's where everything else is. Application menus and buttons have a long history of residence near the top, as well as address bars. I find it preferable that my eyes and pointer need no longer unnecessarily traverse back and forth between edges.

Now it's true that this will place a buffer between the top edge and maximized windows - potentially slowing down the time it takes to target the titlebar (for double-click restoring) or the window buttons, but I find those too slow anyways, and don't use them (subject of a future post). (Also, maximized windows aren't quite as useful as they once were.)

Use a persistent stand-alone OS toolbar for mouse application launching

A persistent stand-alone OS toolbar.

The Quick Launch toolbar is underrated. What appears to be a small space for launching a few specific applications in an unorganized manner need not be any of these things. It is rather apparent that the quickest application launching possible with the mouse alone would require the least input and thought from the user. The start menu is not in the least suitable, requiring far too much scrolling, clicking, and searching for company branded folders, all with the same generic folder icon. Quick Launch is always immediatly present and visible (unless you use autohide) and it's a one click solution. Once we've learned to associate an icon with its respective purpose they are much faster to process and far more compact than text.

Unlock your taskkbar if it's locked (context menu). On XP you could simply grab the Quick Launch toolbar by its border and drag it anywhere you would like - leaving it as a floating toolbar, docking it against an edge, or adding it to an existing toolbar. On Vista you can't drag around toolbars like this - but you can drag the folder itself to an edge to create a toolbar, and then as in XP, add additional folders to this toolbar with Toolbars in the context menu.

So to give Quick Launch its own stand-alone toolbar in Vista it may be fastest to right click the current Quick Launch toolbar, select Open Folder, navigate up to its parent, and then go ahead and drag "Quick Launch" to an absolute edge of your desktop. Be careful not to drop the folder on your desktop itself. Note that there is no cursor change or other indication for this, which is a bit bizarre.

On my 22" widescreen monitor at 1680 x 1050 resolution I can fit a maximum of about 70 icons across the bottom (the natural place for the toolbar, since my taskbar is at the top).

"Now wait a minute Chris. 70? You said organized."

70 maximum. Use as many program shortcuts as you find agreeable, and would like to launch in a single click. For everything else there's a two click solution:

Never navigate your start menu again: Quick Launch pop up menus

My menuApp configuration as an example. You can view a little video of my full configuration for organizational ideas.

I know of two beautiful universal pop-up menu applications. ShortPopUp and menuApp. They both operate the same: they show a pop-up menu of the contents of the folder in which they are run. Therefore creating a shortcut to either of these programs and specifying a folder full of shortcuts (or files) as the folder to "Start in" yields a fantastic menu for your toolbar. There are essential differences between the two.

menuApp v1.04

Pros: very fast with a background server and cache (but server crashes under Vista)

still faster than ShortPopUp under Vista with server disabled

easily use separate configurations in one ini file

very little configuration, would "just work" if not for the Vista problem

support for special folders, like a task list

never displays shortcut arrow overlay on menu items

sorting always works

Cons: context menu problems for menu items (untested on XP): Properties doesn't work, Delete doesn't give a confirmation, etc.

non-shortcut file extension text is always visible ".txt" etc. (if bothersome you can always create shortcuts to work around this in small instances)

ShortPopUp v4.1

Pros: highly configurable: display, sorting, etc.

easily use separate ini configurations

invalid shortcuts display disabled

can access Properties, etc. of menu items through context menu

easily hide any or all file extension suffixes

little bits of humor in the documentation (okay, this doesn't count)

Cons: context menu problems for menu items (untested on XP): they can't be escaped/dismissed without a selection, and selections click through to the underlying menu

can't hide every shortcut arrow overlay

slower than MenuApp

requires configuration (default is very bare bones, no icons, etc.)

sorting seems to fail in several cases, I have yet to understand why, different sorting configurations don't seem to fix it

When I made my decision between the two some time ago, I believe I chose ShortPopUp, configured to be quite similar to menuApp, because it was more stable. I seem to recall that menuApp would not work at all in some common cases unless I used Vista's compatibility mode - but this slowed it down. However, while compiling this list I deleted menuApp's configuration file and allowed it to be recreated (there was at least one peculiar entry in there), and I also have Windows Aero enabled (having it disabled has given me compatibility problems before). I compared each of my menus with each program, and menuApp's speed is just too appreciated; it is my tool of choice.

Middle click close and rearrange tasks with Taskbar Shuffle

Repositioning my 'Downloads' folder task with Taskbar Shuffle.

Taskbar Shuffle is a fantastic lightweight tool which enables you to rearrange tasks with drag and drop, and most importantly, middle click close. (If you don't already use the middle mouse button to open and close tabs in your web browser, you may want to start.) Taskbar Shuffle also provides the means to rearrange notification area icons via holding down Ctrl.

A small issue or two, which may or may not apply to you

Unfortunately there are some minor problems with these recommendations.

  1. Upper edge taskbar: Many programs attempt to be helpful by positioning themselves at the very top of your screen in an unintelligent manner. If your taskkbar is at the top edge then these windows will be obscured and you'll have to resort to using the keyboard to reposition them (or temporarily repositioning the taskbar). Right click their task in the taskbar, select Move, and press a directional arrow key on your keyboard. The window will now be attached to your mouse and free to reposition. (As Alt+Spacebar opens the same menu for the focused window, I tend to use Alt+Spacebar+M+directional arrow.)

    I'm sure this can in fact be automatically worked around with an AutoHotkey script for instance. Since I have a bit of a love affair with AutoHotkey I don't find this too inconvenient of a solution, and will likely whip up a script when I have time.

  2. RocketDock and UltraMon: Unfortunately the extremely helpful Move window to next monitor hotkey feature of UltraMon (which isn't discussed in this entry) has a very annoying issue with RocketDock, where windows, while technically moved, are minimized to the dock. Neither program is really to blame for this problem.

    I indeed crafted an AutoHotkey script to fix this, but then realized a much simpler solution was to include Ctrl (but not Ctrl+Alt+Shift, see above) in the hotkey, since minimizing a window with Ctrl bypasses RocketDock. So that's an easy fix. However, since this means Ctrl must be held down until the window is minimized, you can't make a mouse binding (or some other automation) which rapidly sends the hotkey and expect it to work. Since I use a mouse binding I may be resurrecting an extremely simplified AutoHotkey script which merely waits for the minimization before releasing Ctrl.

    3-25-08 Fix available here. Requires AutoHotkey. Modify the opening lines for your (true) hotkey and UltraMon's, respectfully. It even refocuses window controls beyond UltraMon's ability.

Investigating Vista's broken file type indexing dialog à la Mark Russinovich

8. October 2007

So the Thursday before last I set out to configure Vista's file indexing to only index file extensions of type lnk and exe, as I already had it configured to only index the locations on my computer which contained program shortcuts, but I wanted to extend these locations to include a folder of standalone executables and launch them from my start menu as well.

But lo, I encountered this:

truncated Vista File Indexing Advanced Options dialog

Just where exactly did all of my file types go? You can see from the screenshot that the list stopped at .ado.

Well, like any good Windows troubleshooter, I turned to Sysinternal's essential Process Monitor. I re-opened the file type dialog, this time with monitoring enabled, and performed a search for the last file type on the list, .ado.

Process Monitor log with .ado and .adobebridge highlighted; .adobebridge 'Access Denied'

As you can see from the lines I highlighted in the screenshot above, Vista was failing to read the next file extension in the list, .adobebridge, and presenting an Access Denied error.

Using Process Monitor's oh so useful Jump To... context menu feature, I jumped straight to the registry key having difficulty, and sure enough:

Error Opening Key: .adobebridge cannot be opened.  An error is preventing this key from being opened.  Details: Access is denied.

How interesting. Using the key's context menu to view and modify its permissions presented me with this amusing (but accurate, I suppose) little message box before presenting the actual Permissions dialog.

Windows Security: You do not have permission to view the current permission settings for .ado, but you can make permission changes.

Using the Ownership tab under Advanced to take ownership of the key allowed me to see the permission settings:

Permissions for .adobebridge: No groups or users have permission to access this object.  However, the owner of this object can assign permissions.

As you can see, there are no permissions set at all. Adding the Users group and granting them Read privileges was enough to fix the dialog, but it takes write privileges to be able to actually toggle indexing on and off for the file type, so I made sure to add the Administrators group and grant them Full Control. (UAC prompts you to allow the Advanced settings dialog to be launched with administrative rights when you first enter it, as denoted by the icon on the button: 'Advanced' button with UAC shield) As it turned out that there were a dozen or so other keys the dialog choked on which required the same modification. They didn't all have blank permissions, but none of them had read access for my account.

I'm not sure what's broken here, perhaps the software or installers which added these file extensions did so improperly, or maybe it was intentional and they didn't realize the entire file type indexing dialog would break when it was denied access. Either way I would gander that the dialog behavior is most certainly a bug.

Unfortunately I'm not an expert when it comes to Windows Permissions setting, as I've never interacted with them on more than a casual basis, and I've done very little in the way of inheriting and propogating permissions, so I'm curious about the most appropriate and efficient solution to a scenario like this. Include inheritable permissions from this object's parent was enabled for the registry keys with the problem, and other working keys claimed to be inheriting permissions from their parent, but I looked at the permissions on HKEY_CLASSES_ROOT and there appeared to be none to propogate. So perhaps that is not their parent? Any revealing information would be welcome.

(Note: Mark Russinovich of Sysinternals does an ever enlightening job of educating us on Windows internals, making copious use of Process Monitor in the process.)

"Sort Tabs By ..." Firefox extension

31. August 2007

7-19-08 A newer Firefox 3 compatible version of this extension has been released. Take a look at my new version, as well as the Tab Kit extension, and see if you can find what you need. ;)

2-16-08 Before I began developing this extension (my first) I did an extensive search to be sure one didn't already exist with similar functionality. Not until I was ready to upload it to Mozilla did I learn of the add-on sandbox. After registering I searched the sandbox for a similar extension, and one did indeed exist: Tab Kit. I tried it but it didn't seem to work so I felt better and made this original post. Not long after, however, I tried it again without Tab Mix Plus and it worked beautifully. I have this to say: Tab Kit is fantastic. It is amazing, and it has every feature I had planned for my own extension and beyond. I would be lost without it; I love it. Do yourself a favor, and download Tab Kit instead. If you'd like something simpler but less featured, use mine described below.

screenshot: "Sort Tabs By ..." and ChromaTabs

See this nifty screencast for a demonstration.

Features

  • Sorts your tabs by domain/host name, or last browsed date. (More to come.)
  • Optionally space out groups of tabs. (You can color the spacers too, but it's not very pretty. ;)
  • Intelligently handles tab restoration, only sorting when all tabs have been restored.
  • Intelligently handles the opening of multiple tabs at once, only sorting when the URL of all opened tabs is known.
  • Sorts tabs immediately upon navigating to a different URL, prior to full page load.
  • You can freely drag and drop tabs to other groups.

Requirements

  • Firefox 2.0 (I may lower this to 1.5, I haven't decided yet.)

Known Limitations

  • Currently the entire host before the first / is matched when comparing host names, so sites with different subdomains (like addons.mozilla.org and developer.mozilla.org) will not be grouped together. This can be undesirable with certain URLs (such as img161.imageshack.us and img299.imageshack.us). The ability to customize this behavior will be in the next version.

Combine this extension with Justin Dolske's ChromaTabs for the elegant tab coloring seen in the screenshot and screencast.

Also, combine this extension with the 'Close Similar Tabs' feature of Tab Mix Plus (and some others) to close all of the tabs from one site at once via the tab context menu.

Install "Sort Tabs By ..." v1.0

.. and unto the public I emerge!

31. August 2007

I recently wrote a Firefox extension of such usefulness that it has finally forced me to break my habit of never getting around to releasing any of my projects publically. So I purchased some ASP.NET hosting, installed BlogEngine.NET, configured the default theme to be less annoying, spent many hours pulling the Slug feature from the latest in-development verison of BlogEngine and adding it to the 1.1 release, and here we finally are. Slugs and all. Why didn't I just run the development version? Well, I tried, but had issues. I might still, or I could just wait until 1.2's official release planned for sometime in September.

It will be some time before the rest of my projects can showcase themselves, but at least now they will have a home.

And it will also be some time before this blog is precisely how I'd like it, but at least I have the power to shape it, and having already delved into BlogEngine's source code once, I should be in good shape myself.

Now let's look forward to the coming attractions. ;)

Powered by BlogEngine.NET. Content © 2009 Christopher S. Galpin