Archive for December, 2005

flickr API – How to get URL of a photo

Wednesday, December 28th, 2005

This task is not at all obvious from the documentation. However this documentation page will get you started.

As an example, here’s a Python function I wrote that works with the Photo object returned by flickr.py (a nice flickr API library for Python):

def getPhotoURL(photo,size='o'):
    """
    Create Photo URL as:

http://static.flickr.com/{server-id}/{id}_{secret}_[mstb].jpg

    Size Suffixes
    The letter suffixes are as follows:
    s   small square 75x75
    t   thumbnail, 100 on longest side
    m   small, 240 on longest side
    -   medium, 500 on longest side
    b   large, 1024 on longest side (only exists for very large original images)
    o   original image, either a jpg, gif or png, depending on source format
    """
    return r"""http://static.flickr.com/%s/%s_%s_%s.jpg""" % (str(photo.server),str(photo.id),str(photo.secret),size)

Thanks to J Wynia for the help.

How to turn off printing notification dialog/bubble in Windows XP

Monday, December 26th, 2005


That little bubble that pops up from my system tray to tell me “the document was sent to the printer” was really annoying me.

    Here’s what I searched for:

  1. “the document was sent to the printer” turn off

Here’s the answer:

1. Click Start, and then click Printers and Faxes.
2. On the File menu, click Server Properties.
3. On the Advanced click the options you want to apply:
• Show informational notifications for local printers. This option notifies users when a job is printed on a printer that is attached to this computer.
• Show informational notifications for network printers. This option notifies users of this computer when a job is printed on a remote computer.

I found this answer here, and there is also more information there for other types of printer setups.

Update:
I also found these registry changes for Windows XP on this Troubleshooting Windows XP Site which you may want to try if the above advice isn’t working:

This one is for balloon tips disable:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"EnableBalloonTips"=dword:00000000

And this one is for disabling all balloon tips?

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"EnableBalloonTips"=dword:00000000

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"FolderContentsInfoTip"=dword:00000000

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\tips]
"Show"=dword:00000000

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"StartButtonBalloonTip"=dword:00000000

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"ShowInfoTip"=dword:00000000

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoSMBalloonTip"=dword:00000000

Fixing – AutoIt stops running/hangs under terminal services

Thursday, December 22nd, 2005


I wrote a nice AutoIt script to automate Omnipage14 because it offered no way whatsoever for a Python script to control it. Anyway everything worked except that I was running it under terminal services on another computer and whenever the terminal services window lost focus or I logged off, AutoIt just stopped running. So I spent quite a while searching and found these solutions:

The short answer is:
Give up! .. don’t run it under terminal services, try VNC instead.

The long answer is:
I searched for too many terms to even recall. I came across a lot of websites and a lot of advice for this problem. The basic problem is that when you’re not actively using terminal services, the desktop and everything GUI goes away somehow. That’s why Autoit stopped working. I tried setting up the AutoIt script to run as a service but nothing happened when I launched the service and it seemed like an overly-complex solution to research any further. The second solution I had come across (using VNC) seemed like a reasonable idea so I went that route and everything is now working fine.

Here are the discussions I found on this issue:
http://www.autoitscript.com/forum/lofiversion/index.php?t4026.html
http://tinyurl.com/8yh3w
http://tinyurl.com/7wmvy

RealVNC – How to login (send ctrl-alt-delete) to remote computer

Thursday, December 22nd, 2005

I tried these search queries:

  1. RealVNC login
  2. RealVNC ctrl-alt-delete

And the answer is…

Just send it “Shift-Ctrl-Alt-Delete” which worked for me.

Alternativelly you can right-click on the RealVNC title bar for your session and select “send Ctrl-Alt-Del”

Hello world!

Tuesday, December 20th, 2005

This is a testing post. Real posts coming soon. Do stayed tuned.

if a=='5':
    print 'hi'
sys.exit(0)

if a=='5':
    print 'hi'
sys.exit(0)

if a=='5':
    print 'hi'
sys.exit(0)

if a=='5':
    print 'hi'
sys.exit(0)