Home

Main Menu

Login Form



 
Brian Dylan Web
Digsby Music Status PDF Print E-mail
Written by Brian Dylan   
Wednesday, 02 July 2008 10:39

I recently figured out to get Digsby to auto-update my status based on the currently playing song in MusikCube.  It's probably far more complicated than it should be, but I wanted to do it quietly.

 First, you need to download the excellent digsbystatus.exe from here

 This alone will do the trick.  Just map it to Tunage in Musik Cube and pass in your arguments.  However, it creates a batch window and I want it to run silently.

 Enter Cscript and a .vbs file.  To get MusikCube to run .vbs files, you need to call Cscript.  To get Cscript to run silently, you need to pass in the //B flag.

 My VBScript looks like this

 

--- UpdateDigsby.vbs ---

dim objShell
dim cmdArguments
dim strCommand

set cmdArguments = WScript.Arguments
Set objShell = CreateObject("WScript.Shell")
strCommand = chr(34) & "C:\Program Files\Digsby\DigsbyStatus.exe" & chr(34) & " " & chr(34) & cmdArguments(0) & chr(34)
objShell.Run strCommand, 0

--- End UpdateDigsby.vbs ---

 

objShell is our launcher that we'll use to call the exe

cmdArguments is the command line arguments passed into the UpdateDigsby.vbs call

strCommand holds the properly escaped path to digsby plus our status message passed in through the arguments

objShell.Run calls DigsbyStatus.exe, in hidden mode (0)

Here's a screenshot of my music cube settings

My musik cube settings to export to Digsby

Here's the full command wscript //B "c:\program files\digsby\UpdateStatus.vbs"  "Listening to $ARTIST - $TITLE"

That's it.  Musikcube calls my vbscript silently and updates it the status message.  Note the quotes (musikcube eats any errors if they are not just right)

Here's some other tags for musikcube export

$ARTIST
$PLAYLISTPOS
$ALBUM
$TITLE
$GENRE
$NAME
$DURATION
$FILENAME
$FILESIZE
$BITRATE
$TIMESPLAYED
$TRACKNUM
$RATING

 

 

Last Updated ( Wednesday, 02 July 2008 11:04 )
 
Wait a minute... What? PDF Print E-mail
Written by Brian Dylan   
Tuesday, 17 June 2008 07:53
Our potential house

Apparently, we are buying a house.  I should have told you sooner, but I just found out.  It wasn’t planned, expected or even pondered.  We were considering moving, we were investigating our potential property as a rental.  Call it serendipity, call it fate or call it the brash impertinence of the youthful wannabe bourgeoisie.  I am elated; I am surprised.  “Dear Coldwell Banker, I never thought it could happen to me…”

Pre-approved and armed with a down payment, we’ve surrounded ourselves with a veritable crew of advisors.  Land owner moguls and financial planners have grabbed the oars and we’re sailing into a sea of paperwork, realty terms and legally-binding hyper jargon.  Wish us luck.

 
Redesign in Progress PDF Print E-mail
Written by Administrator   
Tuesday, 03 June 2008 21:37
As you can see, a site rebirth is in progress.   Wordpress had been kind, but I wanted a new toy.  Please, bear with me as I get the site and my act together,
 
Death to PHP PDF Print E-mail
Written by Brian Dylan   
Wednesday, 04 June 2008 21:02

I am going to savage PHP.  I know I am running Joomla now.  I know I ran Word Press for years.  Both run exceptionally well.  I would say Facebook exemplifies what PHP can do and I would never dream of running a MYSQL server with PHPMyAdmin installed.  So, I am not going to attack what can be done with PHP; I just can’t stand the idea of programming it any more.

During my day job, I use .Net and the full line of Microsoft Tools.  Problems, prolific swears and WTFs abound.  My compiler crashes almost daily and I certainly do not view my bread and butter language as superior.  However, it’s bad when you fire up either Eclipse or Zend studios and wish they performed half as well as .Net.  There’s one simple reason – autocomplete and code look up.  I never realized how much I depend on that little box of suggestions until I tried to create a data object model in PHP.

I had a simple design.  I extended the MYSQLI library to wrap a lot of the common functionality in a single class.  I created a base case that invoked and instantiated the extended database class in the constructor.   My data objects would then share the same base object and all of it would let me get to the good old fashion ORM without the need to muck with the underlying database object. 

To be fair, it worked as intended.  PHP5’s object model allowed me to do everything I wanted.  Unfortunately, when you are dealing with three levels of objects like I had designed, it’s very easy to get lost, especially when you need to relearn the syntax after a year or two of neglect.  I wanted one thing.  I wanted the code complete to tell me all of the methods and properties of the MYSQLI connection I had forgotten.

 The problem comes down with PHP’s lack of typing which creates a whole host of issues.  In this case, it makes code complete impossible.  If I declare the objects in a local scope, it works just fine because the IDE of your choice has enough intelligence to sniff out the object’s type.  However, when you have a greater scope, like a class property, it would be impossible to predict the type.  Since PHP rides loose with its typing, there’s simply no sane way to predict what the object will be.  I could, at any time, assign a string or an integer to that database object.  If I was trying to write an IDE with code complete, I could probably get close, but you eventually run aground on the lack of typing. 

That’s the one thing .Net gets right.  You can type your variables.  Of course, you could declare things as objects, set things to nothing and use all of those terrible practices visual basic allows.  You could also program while wearing a metal strainer on your head and while soaking your feet in a bucket of cottage cheese.   You can also turn on Option Strict, avoid data grid controls and use try catch blocks properly. However, the only way to get types in PHP is to enforce your own using instanceof and comparison operators.

In short, fuck programming in PHP.  It’s a powerful language.  It can do amazing things.  However, I consider its lack of enforced typing to be an incredible drawback.     I, for one, am strongly for typed languages.

Last Updated ( Thursday, 05 June 2008 13:14 )
 
Copyright © 2008 Brian Dylan. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.
 

Polls

Joomla! is used for?
 

Who's Online

We have 2 guests online

Advertisement

Featured Links: