TechLifeWeb

Exploring the digital life

How to: Build your own app launcher for Windows Media Center

Recently I built and posted a little app that would let you launch Google TV Spotlight in Chrome from within Media Center and then returns to Media Center when Chrome closes. Several people have asked how I created the app so I thought it was time to do a write up. Note, this is for Windows 7.

For this project we’ll make another launcher to launch straight into Clicker.tv in Google Chrome. I’m going to assume you have already set up Windows Media Center and have installed Google Chrome.

First you need to download AutoIt here http://bit.ly/hV1xun. AutoIt is the magic that lets you create the executable. If you aren’t a programmer, don’t worry, this script is pretty basic and if you want to modify it there is really only a couple places to change.  Once you download AutoIt, go ahead and install it.

Next you need the URL you want to open in Chrome. For this example it will be http://tv.clicker.com/

I like to put the whole project in a folder  named for what I am launching.  In your documents or where ever you want create a folder called ClickerTv.

If you want to make the button in Media Center pretty you’ll need a graphic representing your app. You can often get one of these from the web page or by doing search on Google or Bing Images. If you don’t have a graphic then the name you use shows up in the box in Media Center. If you have an image call it clickertv.jpg and put it into your clickertv folder.

The first thing you need to create is the clickertv.au3 file. au3 is the special extension that AutoIt uses. You can create this file with Notepad. I’ve included clickertv.au3 in the download at the end of this tutorial but here it is to show you what is in it. It is really just 4 lines of code. The rest is just comments to help you understand what is going on. clickertv.au3 should be put into your clickertv folder.


$temp = EnvGet(“localappdata”)
Run($temp&”\Google\Chrome\Application\chrome.exe –kiosk http://tv.clicker.com/”, $temp&”\Google\Chrome\Application”, @SW_MAXIMIZE)
ProcessWaitClose(“chrome.exe”)
Run(@WindowsDir&”\ehome\ehshell.exe”,@WindowsDir&”\ehome”)

So, what is all that about?

Line 1: Get the path to local appdata. This is done this way because it is variable on different machines as
it equates to a path like C:\Users\<username>\AppData\Local and since I don’t know your user name I use this method.

Line 2: Has several parts. First we set the path to chrome.exe. A standard install of Chrome puts this in
C:\Users\<username>\AppData\Local\Google\Chrome\Application\ which is why we needed line 1.
The –kiosk switch is necessary to launch Chrome in a full screen environment. Down side is you need to do alt+f4 to close
the application because you don’t get any controls to click on.
The next bit is the URL you want to open.
After the first comma we create the path the ‘Start in’ location. In this case, where chrome.exe is.
At the end, @SW_MAXIMIZEensures the application opens maximized. I leave this in even though we used the kiosk switch.

Line 3: This is a special AutoIt wait process that monitors whether chrome.exe has been closed.

Line 4: If chrome.exe is closed then line 4 is executed. This launches ehshell.exe from inside windows\ehome.

NOTE: Detailed explanation of the Run command can be found here: https://www.autoitscript.com/autoit3/docs/functions/Run.htm

If these paths aren’t working for you then you could find the exact paths to these files are on your system and use them instead
of the variables as I have done here.

Save your clickertv.au3 file. You can the right+click on it and click Run Script. If it works right you can right+click on it again and click Compile. Compiling will automatically create clickertv.exe. This file should automatically be created in your clickertv folder if you followed along above.

Next we need to create a file called clickertv.mcl. Again, I’ve included this in the zip file below. It is essentially and xml file that provides the code behind the Media Center button that calls the launcher. clickertv.mcl is created in your clickertv folder with Notepad and it contains the following lines:


<application run=”C:\Users\Public\Documents\clickertv.exe”
Name = “Clicker TV”
bgcolor=”RGB(0,0,0)”
startimage=”C:\Users\Public\Documents\clickertv.jpg”
thumbnailImage=”"
sharedviewport=”false” />
</application>

This is fairly straight forward.

Line 1 is the path to your exe file.

Line 2 is the name of the application within Media Center

Line 4 is the path to the jpg graphic

The rest is necessary code we don’t need to mess with.

Ok, so if you’ve lasted this far, in your clickertv folder you will have: clickertv.au3, clickertv.exe, clickertv.jpg, and clickertv.mcl.

Now you need to copy the files to their appropriate places. This is done by the install.bat file I included in the download but if you created a new launcher for something else you’ll need to know what goes where:

copy clickertv.exe to C:\Users\Public\Documents

copy clickertv.jpg to C:\Users\Public\Documents

copy clickertv.mcl  to “%appdata%\Media Center Programs”  This is the only tricky one.  This folder equates to C:\Users\<username>\AppData\Roaming\Media Center Programs. You should actually be able to open it by opening up Computer and pasting in %appdata%\Media Center Programs into the address bar a the top and then pressing Enter.

That’s it! Now launch Windows Media Center and you should see a new entry for Clicker TV in your Extras Library.

Hopefully this was helpful to someone. If you create a launcher for something cool please share it with me!

Downoad clickertv.zip

RSS Auto Discovery – Help Your Readers

A little bit ago I asked my followers on Twitter the following question:

If you know me, you will know why this page is a fail…hint: nothing to do with the look of the page http://traveler.nationalgeographic.com/

Head over there and take a look. Did you find it? I really hope so. I’ve written about this before but it is time to talk about it again. Actually I am kind of appalled that things like this are still happening in this day and age. Not my intention to pick on National Geographic or any other site. Merely used as a demonstration.

What I’m referring to here is RSS Auto-discovery. Auto-discovery is the magic behind the scenes of your blog or web page that lets modern browsers like Firefox and IE discover your feed URL. If you use Firefox I am sure you have noticed the feed icon in the address bar. It looks like this:

The code needed to do that will look something like this very simplified version:

<html>
<head>
<title>This is my Blog</title>
<link rel=”alternate” type=”application/rss+xml” title=”RSS”
href=”http://www.myblog.com/feed”>
</head>
<body>

In the <head> section of your page you should have a <link> element. Written just like the one above with all the other necessary bits of ‘rel’ and ‘type’ will work the magic. Of course the link to your feed should replace the URL I have above. And be sure it is the feed you want people to use! You may have a feed that is auto generated by WordPress but if you have signed up with Feedburner, you probably will need to update the template on your blog.

One more quick thing…. that National Geographic page does have a feed. Did you find the link? It is buried at the bottom of the page. Don’t do that.

Update: Forgot to post a link to the specifications on RSS discovery: http://www.rssboard.org/rss-autodiscovery Thanks Randy!

How to Build An Information Monitor

Many people use various social services to stay in touch and to keep up with current events. One of my current favorites is Twitter. Over a year ago, Twitter turned off a service, called Track, that let you track topics. Track let you ‘follow’ a topic whether it was in your twitter stream of followers or not.

In the wake of Track, a developer created a service called TwitterSpy which let you use Google Talk to perform similar functions to that of Twitter’s Track. I’ve written about this before in my how to on setting up TwitterSpy and Google Talk.

While all this was going on, another social network called FriendFeed has joined the scene. I created an account not long after FriendFeed was brought on line and hooked it up so my tweets went from Twitter to FriendFeed but that was pretty much the end of it.

In recent weeks, limits put on the Twitter API and other discussions online have caused me to take another look a FriendFeed. I have to say, the people behind FriendFeed have done an amazing job and have created something truly unique. You just have to spend a bit of time exploring it and figure out how the pieces fit together.

In this article I am going to show you how I have used FriendFeed as the ‘glue’ to build a system to track a couple topics I am interested in, stay current with breaking news and events and also keep up with friends. While no programming is required, there are some necessary details to work through. Once this up front work is done, then adding, deleting or changing things is easy.

The main thing you will need is a FriendFeed account. It is good if you have Twitter too but it is unnecessary if all you want to do is track topics at Twitter. Actually, you don’t have to track Twitter, it is just my example. More on that later.FreindFeed Lists

Once you set up your FriendFeed account you will see lists on the left-hand column. Click ‘new list’ and call it Track (you can call it what ever you like but we’ll use Track for this tutorial).

You don’t need to add any Friends yet unless you are already following some friends on FriendFeed that you know you will want to track. Either way, you can add or remove friends later.

Now, here is were the powerful magic starts to happen. Lets say you want to track a topic people are talking about on Twitter. You could just go to Twitter Search but I have created a custom Yahoo Pipe for this purpose instead. I’ll explain why in a minute.

Go to http://pipes.yahoo.com/techlifeweb/twittersearchfeedbuilder

In this example we’ll track tweets containing the words Microsoft and Silverlight:

Instructions are at the top to help you build searches with AND OR operators. You can exclude tweets from yourself by adding your Twitter name in the second field. Click Run pipe, then click Get as RSS.

pipes1

Copy the RSS URL from your browser window. You will need this in a minute.

Ok so why the Pipe? After all, Twitter Search provides its own RSS feeds. The rub is that when you look closely at the feed generated by Twitter Search, you will see it doesn’t show you who tweeted. Here is an example of the same results as above:

search1

My Pipe figures out who tweeted and puts their twitter name at the start of the tweet. This way you can know who to respond to if you want.

Now for the next piece of magic, creating an Imaginary Friend. A cute quirky name but part of the brilliance of FriendFeed.

Go back to FriendFeed and, at the top Imagine1right of the screen, click Friends. Then click the Imaginary tab. Now click the Create Imaginary Friend button. Call it anything you like but I recommend having the name relate to what you are tracking. For this instance I would call it Silverlight_Tracker.

Now you will see your new ‘friend’. If you are creative you could create an icon for it instead of the smiley but that really isn’t necessary. Under Miscellaneous, click Custom RSS/Atom.

In the new box, paste in the RSS URL from the Yahoo pipe above.

Imagine2

Next check Display entries as messages (no link).

Click Import Custom RSS/Atom.

This will then pull in the latest results from the Pipe search.

Before you leave this screen, where it says Friend Lists under your imaginary friend’s name,  click add/edit. This will bringImagine3 up a list of all your lists. By default, your friend is in your Home feed list. You can uncheck that if you want, that is up to you. But do be sure to check the box next to Track. This lets all your friend’s posts show up in your new tracking system.

When we check the Track list we will see everything we are tracking so far. In our case now, just the Silverlight_Tracker shows up as in this screen shot:

Imagine4 

You can see that because we named it well, it gives us an idea of the subject matter of the tweet (more relevant when you add more things to track). And, because we used my Pipe, you can see who posted the tweet. Also, don’t forget, this is a search and returns all results whether you follow these people on Twitter or not.

You can use the above method for any RSS/Atom feed you may want to track. Create an imaginary friend for each one. If you are on Twitter, I recommend using the Pipe to create a track feed of your own user name. This way you don’t miss any tweets with your twitter name in the tweet. Another handy feed to track is my Ego Feed.

The Friends you track don’t have to be Imaginary.  You can track other people or services on FriendFeed itself. One of my favorites is BreakingNewsOn. Go to Friends in the upper right of FriendFeed, click the Find + Invite tab and search for BreakingNewsOn. When the results come back, subscribe to this friend then be sure to add it to the Track list.

Further, you can track someone on another service who isn’t on FriendFeed but that FriendFeed can connect directly to. This makes the service more than just an RSS reader. For example, lets say a photography buddy of yours isn’t on FriendFeed but does post her pictures on Flickr and you want to track when she puts up new photos. Follow the steps to create an imaginary friend then choose the Flickr service and enter their Flickr user name. Add this imaginary friend to the Track list and you are now tracking them.

If you want to stop tracking someone (or some topic) you can simply remove your friend from the Track list. You can also unsubscribe friends or delete imaginary ones. Its up to you and really depends on if you just want to stop tracking temporarily or more permanently.

Once you start experimenting with this method of track you will see how powerful it is. Give it a try. If you are using this in a unique way I’d love to hear about it.

But wait, there’s more! Next time, I will show you how to take this system to the next level.

DropCard: Business Cards for the 21st Century

Do you exchange business cards with people? Of course you do. Everyone goes to networking events or exchanges cards as a matter of course during the business day. The thing is people end up with a stack of cards when they get back home or to the office and a to do list item to enter those cards into their contact manager. Or, worse, your card ends up in a stack in a drawer and that valuable service you provide goes irretrievable by any useful method.

This is where DropCards come in. Go to www.mydropcard.com and set up a profile. You will need to enter your cell phone number as your account (this is how you are verified) and set up a password. You will then enter the usual information that is contained on your business card. You can even set up separate profiles for Business or Personal.

The magic comes in 2 parts. First, when someone give you their email address or business card, simply take out your mobile phone and Text drop and their email to 41411 (e.g., drop johndoe@email.com). The person will then get your all your contact information along with a vCard attachment. vCards are the second part of the magic. They are specially formatted file that will let most contact management tools import the contact data so no retyping is needed. Additionally, DropCard stores the email address you sent to so you have a record when you get home.

Hints and tips:

  • No special cell phone is needed, just one that can send sms text messages.
  • Put DropCard 41411 into your phone’s address book so you don’t have to remember these things
  • You can go into Settings on mydropcard.com and add other phone numbers to be able to send to your drop
  • You don’t need to use your phone! When you get back to your computer you can send ‘drops’ directly from mydropcard.com. Click on the ‘Contacts’ button and you’ll see an area to enter your information
  • DropCard makes a cool ‘ice breaker’ at networking events
  • GMAIL USERS: As of this writing, GMail doesn’t import vCards (lame, I know) so you need to convert them to a CSV file. Fortunately there is an online converter vCard to CSV Converter that makes it dead simple.
  • Don’t miss the shortcuts!

Pricing starts with 15 free Drops per month and increases at nominal amounts from there. Here is a chart:

Dropcard -- Dropcard Plans Summary_1226708091708

Be sure to check out DropCard and sign up before you next event!