<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Automating Internet Explorer with Powershell</title>
	<atom:link href="http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467/feed" rel="self" type="application/rss+xml" />
	<link>http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467</link>
	<description>making DBAs everywhere curse!</description>
	<lastBuildDate>Fri, 10 Feb 2012 10:13:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Rhys</title>
		<link>http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467/comment-page-1#comment-242</link>
		<dc:creator>Rhys</dc:creator>
		<pubDate>Wed, 27 Oct 2010 19:10:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467#comment-242</guid>
		<description>Hi Bill,

Doesn&#039;t look like a quick fix. I&#039;ll try and have a look this weekend.

Cheers,

Rhys</description>
		<content:encoded><![CDATA[<p>Hi Bill,</p>
<p>Doesn&#8217;t look like a quick fix. I&#8217;ll try and have a look this weekend.</p>
<p>Cheers,</p>
<p>Rhys</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill</title>
		<link>http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467/comment-page-1#comment-240</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Tue, 26 Oct 2010 20:15:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467#comment-240</guid>
		<description>This no longer works with the new twitter. Any chance you could post an updated version of this code?

It logs in and stuff but it won&#039;t tweet from the notepad.

Would love if you could update this. Thanks</description>
		<content:encoded><![CDATA[<p>This no longer works with the new twitter. Any chance you could post an updated version of this code?</p>
<p>It logs in and stuff but it won&#8217;t tweet from the notepad.</p>
<p>Would love if you could update this. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: superGLUEforYOU (Super Glue)</title>
		<link>http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467/comment-page-1#comment-241</link>
		<dc:creator>superGLUEforYOU (Super Glue)</dc:creator>
		<pubDate>Tue, 26 Oct 2010 18:46:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467#comment-241</guid>
		<description>&lt;a rel=&quot;nofollow&quot; href=&quot;http://twitter.com/ScriptingGuys&quot;&gt;@ScriptingGuys&lt;/a&gt; http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467 - it had your twitter link on it yesterday</description>
		<content:encoded><![CDATA[<p><a rel="nofollow" href="http://twitter.com/ScriptingGuys">@ScriptingGuys</a> <a href="http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467" rel="nofollow">http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467</a> &#8211; it had your twitter link on it yesterday</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rhys</title>
		<link>http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467/comment-page-1#comment-211</link>
		<dc:creator>Rhys</dc:creator>
		<pubDate>Sun, 25 Jul 2010 15:15:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467#comment-211</guid>
		<description>That&#039;s neat, thanks for sharing.

Rhys</description>
		<content:encoded><![CDATA[<p>That&#8217;s neat, thanks for sharing.</p>
<p>Rhys</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TREY</title>
		<link>http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467/comment-page-1#comment-209</link>
		<dc:creator>TREY</dc:creator>
		<pubDate>Sun, 25 Jul 2010 00:10:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467#comment-209</guid>
		<description>Here is the same for Facebook...

# Author: Rhys Campbell modified by +---&gt;TREY.
# Date: 7/24/2010
# Powershell script to automate Internet Explorer
# to post status updates to your Facebook account
 
# Facebook login name or email
$username_or_email = &quot;XXX&quot;;
# Your Facebook password
$password = &quot;XXX&quot;;
#I used the mobile URL because it loads faster...
$url = &quot;http://m.facebook.com/login.php&quot;;
 
# txt file containing 1 tweet per line
$posts = Get-Content &quot;$env:USERPROFILE\posts.txt&quot;;
#Interval between posts
$sleep = 60; 
 
# This is just an attempt to handle the situation where you are already logged into Facebook
trap [Exception]
{
	# This will happen if you&#039;re already logged in
	if($_.Exception.Message -eq &quot;Property &#039;value&#039; cannot be found on this object; make sure it exists and is settable.&quot; -Or $_.Exception.Message -eq &quot;You cannot call a method on a null-valued expression.&quot;)
	{
		# Try and skip this error
		continue;
	}
	else
	{
		# Fail for other Exceptions
		Write-Host -ForegroundColor Red $_.Exception.Message;
	}
}
 
# Create an ie com object
$ie = New-Object -com internetexplorer.application;
$ie.visible = $true;
$ie.navigate($url);
# Wait for the page to load
while ($ie.Busy -eq $true)
{
	Start-Sleep -Milliseconds 1000;
}
 
# Login to Facebook
Write-Host -ForegroundColor Green &quot;Attempting to login to Facebook.&quot;;
# Add login details
$ie.Document.getElementById(&quot;email&quot;).value = $username_or_email;
$ie.Document.getElementById(&quot;pass&quot;).value = $password;
# Click the submit button
$ie.Document.getElementById(&quot;login&quot;).Click();
# Wait for the page to load
while ($ie.Busy -eq $true)
{
	Start-Sleep -Milliseconds 1000;
}
 
# Loop through each post in the txt file
foreach($post in $posts)
{
	$ie.Document.getElementById(&quot;status&quot;).value = $post;
	$ie.Document.getElementById(&quot;update&quot;).Click();
	Write-Host -ForegroundColor Green &quot;Posted; $post.&quot;;
	Start-Sleep -Seconds $sleep;
	# Check to see if ie is still busy and sleep if so
	while ($ie.Busy -eq $true)
	{
		Start-Sleep -Milliseconds 1000;
	}
}</description>
		<content:encoded><![CDATA[<p>Here is the same for Facebook&#8230;</p>
<p># Author: Rhys Campbell modified by +&#8212;&gt;TREY.<br />
# Date: 7/24/2010<br />
# Powershell script to automate Internet Explorer<br />
# to post status updates to your Facebook account</p>
<p># Facebook login name or email<br />
$username_or_email = &#8220;XXX&#8221;;<br />
# Your Facebook password<br />
$password = &#8220;XXX&#8221;;<br />
#I used the mobile URL because it loads faster&#8230;<br />
$url = &#8220;http://m.facebook.com/login.php&#8221;;</p>
<p># txt file containing 1 tweet per line<br />
$posts = Get-Content &#8220;$env:USERPROFILE\posts.txt&#8221;;<br />
#Interval between posts<br />
$sleep = 60; </p>
<p># This is just an attempt to handle the situation where you are already logged into Facebook<br />
trap [Exception]<br />
{<br />
	# This will happen if you&#8217;re already logged in<br />
	if($_.Exception.Message -eq &#8220;Property &#8216;value&#8217; cannot be found on this object; make sure it exists and is settable.&#8221; -Or $_.Exception.Message -eq &#8220;You cannot call a method on a null-valued expression.&#8221;)<br />
	{<br />
		# Try and skip this error<br />
		continue;<br />
	}<br />
	else<br />
	{<br />
		# Fail for other Exceptions<br />
		Write-Host -ForegroundColor Red $_.Exception.Message;<br />
	}<br />
}</p>
<p># Create an ie com object<br />
$ie = New-Object -com internetexplorer.application;<br />
$ie.visible = $true;<br />
$ie.navigate($url);<br />
# Wait for the page to load<br />
while ($ie.Busy -eq $true)<br />
{<br />
	Start-Sleep -Milliseconds 1000;<br />
}</p>
<p># Login to Facebook<br />
Write-Host -ForegroundColor Green &#8220;Attempting to login to Facebook.&#8221;;<br />
# Add login details<br />
$ie.Document.getElementById(&#8220;email&#8221;).value = $username_or_email;<br />
$ie.Document.getElementById(&#8220;pass&#8221;).value = $password;<br />
# Click the submit button<br />
$ie.Document.getElementById(&#8220;login&#8221;).Click();<br />
# Wait for the page to load<br />
while ($ie.Busy -eq $true)<br />
{<br />
	Start-Sleep -Milliseconds 1000;<br />
}</p>
<p># Loop through each post in the txt file<br />
foreach($post in $posts)<br />
{<br />
	$ie.Document.getElementById(&#8220;status&#8221;).value = $post;<br />
	$ie.Document.getElementById(&#8220;update&#8221;).Click();<br />
	Write-Host -ForegroundColor Green &#8220;Posted; $post.&#8221;;<br />
	Start-Sleep -Seconds $sleep;<br />
	# Check to see if ie is still busy and sleep if so<br />
	while ($ie.Busy -eq $true)<br />
	{<br />
		Start-Sleep -Milliseconds 1000;<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ankit Kashyap</title>
		<link>http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467/comment-page-1#comment-118</link>
		<dc:creator>Ankit Kashyap</dc:creator>
		<pubDate>Fri, 18 Dec 2009 17:41:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/automating-internet-explorer-with-powershell/467#comment-118</guid>
		<description>Good one..... will try to develop few more scripts... I m now totally in love with PS</description>
		<content:encoded><![CDATA[<p>Good one&#8230;.. will try to develop few more scripts&#8230; I m now totally in love with PS</p>
]]></content:encoded>
	</item>
</channel>
</rss>

