Archive for October, 2005

HOWTO: Create a Perl Shortcut That Acts Like a Drop Target In Windows

27 October 2005

UPDATE: I recently installed ActivePerl 5.6.1.638 on a new Windows XP system, and I did not need to take any special actions to make perl scripts into drop targets. YMMV.

If you use perl on Windows, you've probably got at least one script that you'd like to be able to put on your Desktop and drag-and-drop files onto to perform some function on the dropped files. There are at least two ways to accomplish this.

  1. If you've installed Active State Perl, every perl script with the ".pl" file extension on your system is associated with perl. You can make every one of these perl scripts a drop target by creating a Drop Handler as follows: Create a new registry key "shellex" under the "HKEY_CLASSES_ROOT -> Perl" key with a default value of {86C86720-42A0-1069-A2E8-08002B30309D}. You can do this manually, or save and run this .REG file to modify your registry automatically.
  2. Alternatively (or in addition), you could create a shortcut to Perl and add the path to the perl script as an argument, e.g., in the "Target" field of the shortcut properties, type "C:\Perl\bin\perl.exe" "\PATH_TO_YOURSCRIPT\YOURSCRIPT.pl". The shortcut will automatically be a drop target whether or not you implemented the registry change above. (You could also create a shortcut to wperl.exe, rather than perl.exe, and eliminate the DOS box.)

Translating XBEL to OPML with XSL

19 October 2005

I've been playing with Dave Winer's OPML Editor, and it's starting to grow on me. (Here's a link to my OPML blog.)

One of the coolest things about the OPML Editor is the Map A Domain feature, through which the community server that Dave set up (running on the Frontier kernel) can translate an OPML file to a tree based web site. For an example, see my mapped domain: opml.yabfog.com.

But this is just a prelude to the exciting part: I wrote an XSL stylesheet that translates an XBEL bookmark file (such as that produced by the Firefox web browser*) into OPML. I initially tried to do this (and succeeded) with PHP, but that was a royal pain (and trouble-prone because I was treating the XML as a text format). I had seen Joshua Allen's solution for applying XSL Transformations to OPML, but it worked in the wrong direction. So I taught myself how to use XSL.

I am really pleased with the results.

This XSL stylesheet transforms XBEL to OPML.

And this XSL stylesheet transforms XBEL to XHTML.

Here is the resulting OPML output.

* I've been using it for so long I forgot it was an extension! The Bookmarks Synchronizer is a must have extension for Firefox, especially if you want to keep your bookmarks in sync among multiple computers. Basically, it uploads/downloads your bookmarks to/from an FTP server in XBEL format. In my case, the FTP server is my webhost, so I wanted a way to not only keep my bookmarks in sync but also make them available over the Web no matter where I am or on whose computer (or on which operating system, for that matter) I am working.

Fax Spam

13 October 2005

Unsolicited fax spam is illegal under the Telephone Consumer Protection Act of 1991 (TCPA), as amended by the Junk Fax Prevention Act of 1995. Unfortunately, that hasn't saved me from getting in some fax spammers' databases -- even though my phone number is in the National Do Not Call Registry!

Luckily (?), I have a fax machine on my line, so at least when the fax spammers call at 2:00 a.m., the fax machine answers and receives the fax so that they don't keep redialing every five minutes all damn night.

The Unlawful Call Center helps you deal with unsolicited faxes by informing the fax spammers that you do not want to be disturbed (and that what they are doing is illegal). However, if the fax spammers don't stop, your only recourse is legal action (through a private lawsuit or complaint to the FCC or your state attorney general).

For the Unlawful Call Center to help, you must secure a "call trace" on the unsolicited fax spammer. If your local phone provider is Verizon, let the phone ring at least twice, then after you pick up the call and realize that it's an unsolicited fax call you can hang up (or let your fax machine answer so the fax spammer doesn't redial) and dial *57. This activates the call trace feature, which logs the true originating phone number in Verizon's phone records (you are not provided that number). After a successful trace, call the Unlawful Call Center at 800-518-5507, and tell them that you activated a call trace on an unsolicited fax spammer. The Unlawful Call Center will obtain the originating phone number and call and/or send a fax notice to the originating phone number informing the sender that what they are doing is against the law and requesting that the sender stop sending you faxes.

Again, the telephone number for the Unlawful Call Center is: 800-518-5507.

Links:

Junkbusters Guide to Reducing Junk

Junkfaxes.org

Disable Balloon Tips

7 October 2005

HOWTO: Disable Notification Area Balloon Tips in Windows XP

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

  1. Click Start, click Run, type regedit, and then press ENTER.
  2. Navigate to the following subkey:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
  3. Right-click the right pane, create a new DWORD value, and then name it EnableBalloonTips.
  4. Double-click this new entry, and then give it a hexadecimal value of 0.
  5. Quit Registry Editor. Log off Windows, and then log back on.

These steps disable all Notification Area balloon tips for this user.

There is no way to disable balloon tips for specific programs only.

Source:
HOW TO: Disable Notification Area Balloon Tips in Windows XP

Scheduled Tasks - Running Tasks Without A Password

6 October 2005

For XP Pro: Go to Start/Administrative Tools/Local Security Policy/Security Settings/Local Policies/Security Options
Accounts: Limit local account use of blank passwords to console logon only. This is enabled by default, disable it.

For XP Home: (Keith Miller) Go to Start/Run/Regedit and navigate to this key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa

Value name: limitblankpassworduse, Type: REG_DWORD, Data: 0 (disabled) 1 (enabled)

For Home: Run Scheduled Task without a Password (Line 67)
http://www.kellys-korner-xp.com/xp_tweaks.htm

Source:
Windows XP FAQ