The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    script to track the laptop status

    Discussion in 'Dell' started by richardsugg, Oct 7, 2008.

  1. richardsugg

    richardsugg Newbie

    Reputations:
    0
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    5
    I know this is lame, but I'm dying for my laptop to ship and tired of refreshing the order status page. If you have Perl installed ( www.activestate.com), you can run this to check the order status (i.e., In Production) and the estimated ship date.

    Copy the code below to a text file named "getStatus.pl". Change the customer_number and order_number to those for your order and run it.

    Code:
    use HTML::TreeBuilder;
    use LWP::Simple;
    $|= 1;
    
    $sleep_minutes = 10;
    $order_number		= "999999999";
    $customer_number	= "999999999";
    
    my $url = 'http://support.dell.com/support/order/details.aspx?c=us&l=en&s=gen&order_number=' . $order_number . '&validate=' . $customer_number;
    
    sub check_status {
    	print "\n\n";
    	print "Check the status of your laptop every $sleep_minutes minutes\n";
    	$time = localtime();
    	$content = get($url);
    
    	my $root = HTML::TreeBuilder->new_from_content($content);
    	@elements = $root->find('a', 'span');
    
    	$status = "UNKNOWN";
    	$date = "UNKNOWN";
    	$status = $elements[39]->{_content}[0] || "UNKNOWN";
    	$date = $elements[45]->{_content}[0] || "UNKNOWN";
    
    	$root->delete();
    	undef $root;
    	undef $content;
    	print "******************************************\n";
    	if($status ne 'In Production') {
    		print "\n\n++++ IT SHIPPED! ++++\n\n";
    	}
    	print "Status:     $status\n";
    	print "Ship Date:  $date\n";
    	print "Checked at: $time\n";
    	print "******************************************\n";
    	print "\n\n";
    }
    
    $minutes_till_check = 0;
    print "Checking the status of your laptop\n";
    while(1) {
    	&check_status();
    	sleep 60 * $sleep_minutes;
    }
     
  2. cmarcho

    cmarcho Notebook Consultant

    Reputations:
    72
    Messages:
    213
    Likes Received:
    0
    Trophy Points:
    30


    Very cool. Somebody has too much time and is very anxious!
     
  3. TheDirtyFresh

    TheDirtyFresh Notebook Enthusiast

    Reputations:
    0
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    5
    With the amount of time a person would have waiting on dell they could code a new OS