PowerShell Remoting Project Home

Friday, November 30, 2007

PowerShell Script: Amazon WII Watch

I just wanted a WII for Christmas gift and didn't want to spend $500 on ebay.

A Small powershell script will do!


# Begin of script
# =============================================================
# This code is for test purposes only. Use it at your own risk.
# =============================================================
param([string] $query= "B0009VXBAQ", [string] $button = "btn-atc._V46858960_.gif")

#Submit query sequence
"================================================================="
"ASIN: " + $query
"Button: " + $button
""
"Submit query ..."
$uri="http://www.amazon.com/gp/product/" + $query
$AmazonClient = new-object System.Net.WebClient

#checking for results
While ($true)
{
$pagecontent = $AmazonClient.DownloadString($uri);
"================================================================="
# Get Availability
if ($pagecontent -match $button)
{
write-host "In Stock`a`a`a" -foregroundcolor Red
}
else
{
write-host "out of Stock" -foregroundcolor yellow
}
[datetime]::Now.tostring()
"Wait..."
Start-sleep 60
}

#End of script





=================================================================
out of Stock
2007-11-30 13:07:52
Wait...
=================================================================
In Stock

2007-11-30 13:08:58
Wait...
=================================================================
out of Stock
2007-11-30 13:10:01
Wait...
=================================================================
In Stock

2007-11-30 13:11:05
Wait...

Tags:       


Comments:
I like this blog is fantastic, is really good written. Congratulation. Do you want to see something more? Read it...: Costa Rica is a country with a extremely sense of freedom. The landscapes are for much the most green in whole center america.The chances of investement are way to high, the average of Americans, European and people of the entire planet who is buying here is up in the sky !!!
Great investment opportunity in Costa Rica: condos, costa rica real estate, costa rica property. Visit us for more info at: http://www.jaco-bay.com/
 
Oes Tsetnoc one of the ways in which we can learn seo besides Mengembalikan Jati Diri Bangsa. By participating in the Oes Tsetnoc or Mengembalikan Jati Diri Bangsa we can improve our seo skills. To find more information about Oest Tsetnoc please visit my Oes Tsetnoc pages. And to find more information about Mengembalikan Jati Diri Bangsa please visit my Mengembalikan Jati Diri Bangsa pages. Thank you So much.
Oes Tsetnoc | Semangat Mengembalikan Jati Diri Bangsa
 
Thanks for sharing such an interesting information. I think this is really a very nice post. Thanks for the great content!
 

Post a Comment



Links to this post:

Create a Link



<< Home