/****************************************************************************************************** * * FILE: RemoteTest.java * AUTHOR: David Miller http://www.sqlmagic.com/d/ * ABOUT: A demonstration of how to use com.fivevoltlogic.mytunes.Remote * DATE: September 1, 2003 * ******************************************************************************************************/ import com.fivevoltlogic.mytunes.Remote; public class RemoteTest { public static void main(String[] args) { try { Remote r = new Remote(); // we need two arguments to for this method: // (1) the playlist index, and // (2) the track number if (args.length != 2) { System.out.println("Usage: PlaylistTrack [playlist index] [track number]"); System.exit(0); } if (! r.playPlaylistTrack(Integer.parseInt(args[0]), Integer.parseInt(args[1]))) { System.out.println("Unable to play track"); } // if we aren't able to instantiate a Remote object // a basic exception will be thrown } catch (java.lang.Exception e) { System.out.println("Error: " + e.getMessage()); } } }