Tuesday, November 2, 2010

Automating Outlook 2011 with Applescript

I am continuing my automation work with folder actions and applescript and had a desire to be able to email from the new Mac Office 2011 using Outlook. There are several examples for how to do it with Entourage but the syntax has changed regarding mail to recipients. Without further delay, here is a working script:

tell application "Microsoft Outlook"
 set newMessage to make new outgoing message with properties {subject:"Hooray for automation"}
 make new recipient at newMessage with properties {email address:{name:"Jim Shank", address:"jim.shank@example.com"}}
 open newMessage
end tell

After hours of searching, I finally came across this fantastic example from Bobby Kansara at Microsoft. Thanks to the early adopters and beta testers.

Tuesday, October 5, 2010

OS X Folder Sync with Google Docs

Here is a little script that I adapted that allows you to assign a Folder Action that uploads anything you add to that folder to Google Docs. Here's how:

  1. Download google-docs-upload

  2. Create the script below in /Library/Scripts/Folder Action Scripts/transfer - Google Docs.scrp

  3. Right-click on a folder in finder and select Folder Actions Setup...

  4. Select the script and you are good to go!

  5. Now anything you put in that folder will be uploaded to Google docs!

on adding folder items to this_folder after receiving added_items
 repeat with aFile in added_items
  do shell script "java -jar /Users/OSX_USERNAME/Library/Scripts/google-docs-upload-1.3.2.jar " & quoted form of POSIX path of aFile & " --skip-all -u EMAIL_ADDRESS_FOR_GOOGLE_DOCS -p PASSWORD >> /Users/OSX_USERNAME/Library/Scripts/GDocs-upload-log.txt"
  end repeat
end adding folder items to

The script as-is will upload to your root folder in Google Docs, however, by adding the --remote-folder switch, you can specify where you want it to be. You could create a number of different scripts for different destinations.

Happy Birthday Angel!

Friday, May 7, 2010

VMWare Fusion 3.1 RC is out

I just upgrade to 3.1 RC and it is awesome, everything is quicker and I haven't seen any Unity artifacts. Looking very good.

Go get it - http://communities.vmware.com/community/beta/fusion

Saturday, May 1, 2010

Playing Magic the Gathering (MTG) with OCTGN



I recently started playing Magic: The Gathering after discovering a wonderful little coffee and game shop in the area. The only problem is that I can only play once a week (Friday Night Magic) which doesn't leave me a lot of time to practice and get better at it. I was very excited to find out that Wizards of the Coast also makes a Magic: The Gathering online game. What killed my excitement was that you actually have to buy virtual cards to play with. I couldn't believe it, not only does it cost $10 to get started, there is no discount for the virtual cards compared to their real versions. I call foul on this. I went on a search to find a better way.

There are a few alternatives to Magic: The Gathering Online (MTGO) including Magic Workstation (MWS) and OCTGN. The difference is that MWS is heavily advertisement supported (or you can pay a hefty price for it) and seems to be quite a bit more popular. There are plenty of MWS walkthroughs and how-to's but little to nothing on OCTGN.
OCTGN is a freeware Microsoft.NET application and a newcomer to the arena. It is more of a framework for multiple kinds of card games but has a truly beautiful interface and great design. It can be downloaded for free from http://www.octgn.net/ but I suggest getting the whole MTG package with it by searching for the torrent "OCTGN 2 with MTG v0.0.2.8". This includes the MTG game definition as well as all the card images up to Zendikar. It weighs in at a hefty 1.3GB which is why bittorrent is the only sustainable way to get it. I played with it for a few hours last night and want to share how to play MTG with it.

Getting Started

  1. Launch the executable and click on Manage Installed Games.
  2. Click Install a new game
  3. In the root of the folder you downloaded, select Magic-v0.0.2.8.o8g
  4. Click Install new cards
  5. Browse to 3. T2 Sets - Updated for SealedCore Set and select Magic_2010.v0.0.2.6.1.[GO].o8s
  6. Repeat the same process for 3. T2 Sets - Updated for SealedZendikarZendikar.v.0.0.2.6.1.[GO].o8s
  7. Click Close
  8. Go to Edit your decks
  9. Go to Deck - New - Magic the gathering
  10. Pick 20 creatures, 20 lands and 20 spells for starters. Google Build MTG Deck for more advice.
  11. Click Deck - Save
  12. Close the window
Now you have a deck. Most of the above is for demonstration purposes but is a good starting point. You can build and store as many decks as you want. There are some premade decks. If you want to use them, load 2. Extended Sets - Updated for SealedCore SetsTenth_Edition.v0.0.2.6.[GO].o8s. Then go to Edit Decks - Deck - Load and pick one.

Game time. One of the nice things is that you can load two copies of OCTGN and play both sides of the table. Go to Start a new game then Start. On the 2nd instance of OCTGN, click on Join an existing game and click Join. I like to use the two-sided table but it's up to you. Just click the checkmark next to Use a two-sided table. You can also change who is on what side by clicking the A or B. Once you are ready, click Start.

Playing a hand


You now have a blank table. Now, let's get some cards to play with
Go to File - Load a deck and select the deck you created before. I created a simple mono-black deck with a few of my favorites from Zendikar. I will be loading the same deck for both players.

Once the deck is loaded, the cards are in the exact same order as you added them to the deck. We must shuffle the deck. You can either right-click on the deck and select shuffle or use the keyboard shortcut, ctrl-s. Both players must do this and it will be indicated in the chat window on the lower right.

Who goes first? Typically you roll a 20-sided die to find out, no different here, just right click in the middle of the table and select roll a 20-sided. In the chat window you will see the result. You can also use the keyboard shortcut, ctrl-shift-r. You will start to notice there are keyboard shortcuts for almost all of the actions in the game. This allows you to play very quickly and naturally. In my demo game, Jim rolled a 20 and Jeff a 9.

Looks like Jim get's to choose and he chooses to play first. Time to draw the hand. Right click on the library (deck of magic cards) and choose Draw many..., keyboard shortcut ctrl-alt-d. A window will pop-up asking how many and default to 7 (the standard hand side). Click ok. Jeff will do the same. Jim only drew 2 swamps and can choose to mulligan down to 6 cards at this point if he wants. Simply right-click on the drawn hand and select mulligan or ctrl-M while over your hand. OCTGN will ask you if you want to mulligan down to 6 (then 5, 4, 3...). I decide to try my luck and skip the mulligan, which I will most likely regret later. Time to start. I click on the green play button next to my Name/Life/Hand-size tab. The chat interface announces Turn 1:Jim.

Turn 1: Jim


I want to get into the untap, upkeep, draw order. You can right-click in the middle of the table and select Go to beginning phase or press F1. If I had any cards already on the table and tapped, it would untap them for me and announce Beginning of UPKEEP PHASE in the chat window. Check your cards and see if there is anything you need to do as part of upkeep.

Since it's the first turn, I will skip the draw phase (ctrl-d or double-click on my library) and move on to my first main phase. I press F2 to announce that in chat.

This is a good time to make a clarification, especially for those who come from MTGO. OCTGN will not enforce rules, it has no concept of the actual game play. It is simply a virtual environment to play card games in.

Ok, with that cleared up, it's time to play a card. Double-clicking on a card will move it to the board so I double click on one of my swamps. I have nothing more exciting to do. I can now press F3 to announce Combat, then F4 to announce Second Main Phase then F5 to announce End Step but I think I will just announce I am done by hitting F5 and then clicking the green play arrow next to Jeff's name.

Turn 2: Jeff


Jeff hits F1 to untap (nothing there yet but a good habit) and then double-clicks on his library to draw a card. He then hits F2 for his main phase. Jeff also plays a swamp but he has a 1 black mana creature, the Guul Draz Vampire. He double-clicks on the swamp to tap it and then double-clicks on the vampire. Note that there seems to be a bug in this version that it plays both cards on the wrong side of the table. Simple drag them back to your side to play. The cards are a little small so he rolls his mouse wheel to zoom in. Then he holds down the space bar and left-click-drags the window around to his liking. Nothing much more to do, can't really attack due to summoning sickness. To be polite, Jeff hits the Tab key to pass priority to Jim in case he wants to respond to the summoning of a creature. Jim has no response so he hits Tab to pass it back. This doesn't do anything other than put a message in the chat window. Jeff is finished with his turn and hits F5 to announce the end phase and then clicks on the Play button next to Jim's name.

Turn 3: Jim


Jim hits F1 as good habit and ctrl-d to draw a card (Jim likes the keyboard shortcuts), then F2 to begin the first main phase. Jim double-clicks on a swamp to play it. Now a choice, I can use disfigure to try to remove Jeff's vamp or I can bring out a creature of my own. I use the mouse to draw a sqaure around both swamps (left-click and drag) and then double click on one, they will both tap. I play a Surrakar Marauder and press Tab to allow Jeff a chance to respond. Jeff has no response and presses Tab to hand priority back to me. Nothing fancy left for me to do so an F5 announces the end phase, I click on the play button to hand the turn back to Jeff.

Turn 4: Jeff


F1 untaps Jeff's swamp from the last turn. Jeff draws a card, ahh, disfigure. Jeff hits F2 to move to first main phase. He plays a swamp by double-clicking on it. He wants to get my Marauder out of the way and now is a really good time. He hovers over each of his swamps and hits ctrl-g to tap them and then double-clicks on his Disfigure. Jim can assume that it's meant for the only creature he has but there is a great way in OCTGN to do this. Holding down the shift key, left click on the Disfigure and drag up to the Marauder. He then hits tab to allow Jim a response. Jim has none and drags the Marauder to the graveyard, so sad. Jim presses tab to return priority to Jeff. Jeff hovers over the Disfigure and taps the delete key, off his spell goes into the graveyard (you guys getting there are multiple ways to do things? He could also right-click and select Destroy Card, pick one you like).

Now that the defenses are clear, Jeff is going to hit F3 to start the combat phase. Jeff hovers over the Vampire and clicks ctrl-A to signify the attack, this is a little different than tapping as it creates a red glow around the card and says "Jeff attacks with 'Guul Draz Vampire'." in the chat window. Jeff Tabs over to Jim for a chance to respond. Jim clicks the minus next to the life counter to indicate he is taking one damage to his player. The chat window also indicates that Jim has lost a life. Jim hits tab to pass it back to Jeff. Jeff right clicks in the middle of the table and selects Clean-up targets and combat which will remove the red glow and any arrows that were left over. Jeff now indicated the end phase by hitting F5 and passes the turn to Jim by clicking the play button next to his name.

Turn 5: Jim


F1 (untap and upkeep), ctrl-d (draw), F2 (begin main phase), play swamp, tap two swamps, play Vampire Hexmage. F5, pass the turn by hitting Play next to Jeff. Hopefully you are getting the hang of this.

Turn 6: Jeff


F1 (untap and upkeep), ctrl-d (draw), F2 (begin main phase), play swamp, tap two swamps, play Vampire Hexmage. Now Jeff hits F3, Jeff attacks with Guul Draz Vampire and tabs to indicate Jim is up for blocking phase. Jim right-clicks his Vampire Hexmage and selects block, then shift-left-drags and arrow over to the Guul Draz Vampire. The chat reads "Jim targets 'Guul Draz Vampire' with 'Vampire Hexmage'". Jeff taps one more swamp and uses the Hideous End against Jim's Vampire Hexmage. He indicates this by drawing another arrow from the Hideous End to the Vampire Hexmage. The table is looking pretty interesting now. We officially have a stack to address. Starting from the last chat message up, we need to resolve it. Hideous End resolves first causing -2/-2 to Jim's Vampire Hexmage. The Hexmage is only a 2/1 and therefore drops below 1 toughness sending her to the graveyard. Since Jim has no response and has priority, he drags her off to the graveyard. Jim passes it back to Jeff. Jeff then discards his Hideous End now that it has done its work. The block is still valid even though the Hexmage has moved on to darker places do no damage is assigned. It looks like Jeff has cleared the way for victory in the next few turns but you never know what will come up in the library next for Jim.

Finding Other Players
Honestly I haven't explored this all that much yet. The one thing you will need to do is poke a hole in your firewall to let another player connect to you. OCTGN uses a peer-to-peer system so there is no central server (yet?) to arrange matches. Much like the actual card game, this is left up to the organizers and players. If you are the one Starting a new game instead of joining, you will need to open the port or forward it from your firewall to the computer running OCTGN. This port number can be found on the Start a new game screen next to Port number to use. Opening and forwarding ports are ouside the purview of this howto but Google is your friend and it depends on your cable/dsl router/modem and OS firewall. You may want to ask in the OCTGN chat for either help on this or finding other players to play against. You will need to provide the other player the internet IP address if they aren't on the same school/work/home network as you are along with the port number. If you are lucky enough to be on the same network, don't worry about the router part of the above statement and provide them the local (LAN) IP address. Both of these are on the Start a new game screen.

You can also use Hamachi to provide a small, free, private VPN to play in. This would also remove the need to modify the firewall or router. Check it out at http://en.wikipedia.org/wiki/Hamachi.

Links to Additional Information


Draft support - http://www.octgn.net/forum/index.php?topic=258.0

OCTGN Home - http://www.octgn.net

OCTGN Blog (with lots of hints and tricks) - http://octgndev.wordpress.com/

MTGSalvation OCTGN Thread - http://forums.mtgsalvation.com/showthread.php?t=184889

Summary


While the best MTG client out there is MTGO, I feel that OCTGN will quickly become the de factor standard in what a MTG PC client should be. There is a ton of potential and .NET is a great platform. It's been a long time coming but I am hoping with guides like this one, people will start using and innovating to create unique solutions to allow a wide variety of gameplay. I think the next big challenge is to create a server based matching system and method to validate other peoples decks. Once this hurdle is overcome, it will be a truly great client for anonymous online play.

Wednesday, March 24, 2010

Working for a start-up finally pays off


After years of dedicated hard work for Rhythms Netconnections and the more than $10,000 of hard-earned money invested in the company, it finally paid off. I got my check today in the mail!

Sunday, March 7, 2010

Cisco Unified Communication Manager 7 (CUCM7) on VMWare Fusion 3.0 for Mac

I know, catchy title isn't it. Last week I finished Administering Cisco Unified Communication Manager 7 & Unity Connection class in order to help with my overall understanding of our telecom infrastructure at the school district. It was a great class and really filled in the fundamentals I was missing. More importantly, on one of the labs, I noticed a message that CUCM was running under VM. I did some more research and Cisco actually allows this!

When I got home on Friday evening, freshly excited about the class, I grabbed the CUCM 7 media and fired up a new fusion VM. Settings are as follows:

Sunday, February 14, 2010

MythTV Lives On

About a week ago I took the plunge to upgrade my MythTV system to .22 using Mythbuntu. My original backed and bedroom front end were getting on in years and it was time to take advantage of the new package. In order to preserve as much as possible and provide quick back out in-case things went south, I purchased a new 500GB HD to put the OS on. It's overkill but space is cheap and I got a great deal on it.

The other big feature of MythTV .22 is support for hardware acceleration on certain NVidia cards. I looked up VDPAU and selected the least expensive card that supported all of the features. I found a great deal on a  PNY VCG8600GXXB GeForce 8600 GT on NewEgg for a mere $25 after MIR.

When everything arrived, I set aside a full day for the upgrade. I moved the whole MythBuntu install onto a USB flash disk using Unetbootin, backed up the old database and the etc folder, disconnected the old HD and installed the new HD. Booting from the flash disk worked fine and I was quickly into the setup. Installation was a snap and recognized all of the hardware immediately, a task that has taken many weeks before. I followed the steps from MythPVR.com to migrate existing recordings to a new server. There is a comment at the end of the article that if the database is different enough, you should add a -f option to the import which did the trick for me.

I pointed the storage groups for videos at my already installed media drive (640GB) and then hot plugged in the old 500GB HD (love SATA), mounted it and then copied the recordings to the new recordings path. I launched the frontend and recordings were up and running. I was a little bummed that the video metadata didn't come through but instead of going back to the original database, I used the included jamu script to gather metadata for all of my movies. It looked a lot nicer and the information was much more accurate and detailed than before.

I went into the Playback settings and set it for VDPAU+. The difference is amazing between the old video card and this one. It's not just the VDPAU but having a dedicated card that seems to make the difference. The one major problem I did run into was pixelation of anything that was in MPEG2 format (recordings). I finally tracked down a thread that this is a known bug on certain motherboards and they are working on a fix. In the mean-time I have reverted to CPU Slim.

Overall I am very pleased with the new software and distribution.

Wednesday, January 6, 2010

Easier Dialing to Webex/GoToMeeting Conferences from iPhone

There are few things in this world I detest more than having to write something down from an electronic device just to have to type it back to same said device. After several miserable incidents of trying to copy the access number down for a conference (or even worse, memorize it!) I decided to go hunting for a better way. What I really wanted was a way to copy and paste the conference code into the dialer, what I found was better.

Thanks to a wonderful poster going by the name of droptopMBP in the Apple forums, dialing those pesky numbers is now easy with a small amount of up front work. In the notes field for your conference call event in your calendar, simply add a tel URL in the following format:
tel://+15551212p123456789

Note the p for a pause. The only shortcoming of this little shortcut is the inability to add a # at the end, but hey, one button instead of memorizing 9, I like it. The only problem I had is the need to wait a few seconds (like 5-10) for it to finish dialing the access code before I hit the # key. If you listen very carefully, you can hear it mashing the DTMF tones long and slow.

Here is a copy of the exact post with links to details on formatting the string properly:
1) Place the phone string in the "Notes" field (doesn't work in event title or location fields)
2) Prepend the phonestring with the HTML telephone URL "tel://" (ref: https://developer.apple.com/iphone/library/featuredarticles/iPhoneURLScheme_Reference/Articles/PhoneLinks.html )
3) Follow the remaining rules for embedding telephone URLS which you can read here: ( http://www.ietf.org/rfc/rfc2806.txt )
4) Use "p" in place of "," for Pause
5) Don't include "#" (haven't identified a substitute yet

Example: The following works to dial the number 555-555-6543, pause 1 second, then dial the passcode string 123456. You would need to press # on your phone keypad to end the passcode unless the conference service you're using automatically accepts the code after a timeout...

tel://+1-555-555-6543p12345

Now, go forth and conference without driving off the road.