# usage: lala.ps1 -PlayPause -Status
param([switch]$PlayPause, [switch]$Previous, [switch]$Next, [switch]$Show, [switch]$Hide, [switch]$Status)
$app = New-Object -ComObject shell.application
$ie = $app.Windows() | ?{ $_.LocationURL -match "www.lala.com" }
$doc = $ie.Document
if ($Show) { $ie.Visible = $true }
if ($Hide) { $ie.Visible = $false }
if ($Previous) { $doc.getElementById("headerPrevButton").Click() }
if ($PlayPause) { $doc.getElementById("headerPauseButton").Click() }
if ($Next) { $doc.getElementById("headerNextButton").Click() }
if ($Status) {
$doc.getElementById("headerTrackTitle").InnerText
$doc.getElementById("headerTrackArtist").InnerText
}
This version expects a lala window to already exist and have music queued up. Future versions will handle this more robustly.
No comments:
Post a Comment