<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hassan Maynard &#124; www.hassanmaynard.com &#187; Script</title>
	<atom:link href="http://www.hassanmaynard.com/tag/script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hassanmaynard.com</link>
	<description></description>
	<lastBuildDate>Wed, 12 Oct 2011 22:30:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>VBS Script &#8211; Embedding Images</title>
		<link>http://www.hassanmaynard.com/2009/12/vbs-script-embedding-images/</link>
		<comments>http://www.hassanmaynard.com/2009/12/vbs-script-embedding-images/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 15:49:38 +0000</pubDate>
		<dc:creator>Hassan Maynard</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[VBS]]></category>

		<guid isPermaLink="false">http://hassanmaynard.com/?p=259</guid>
		<description><![CDATA[Disclaimer: I am not responsible for the misuse of this script. Description I wanted to easily access some low res proofs via web page where I was able to scroll down and view all images rather than view them in a sideshow presentation. Script &#8216;************************************************************************************************ &#8216; File:    Copy img! &#8216; Author:  Hassan Maynard &#8216; &#8216; [...]]]></description>
			<content:encoded><![CDATA[<p>Disclaimer: I am not responsible for the misuse of this script.</p>
<h4>Description</h4>
<p>I wanted to easily access some low res proofs via web page where I was able to scroll down and view all images rather than view them in a sideshow presentation.</p>
<h4>Script</h4>
<p><span style="color: #999999;">&#8216;************************************************************************************************<br />
&#8216; File:    Copy img!<br />
&#8216; Author:  Hassan Maynard<br />
&#8216;<br />
&#8216;<br />
&#8216;<br />
&#8216;************************************************************************************************</span></p>
<p>Title = &#8220;Copyimg!&#8221;<br />
Version = &#8220;v1.0&#8243;</p>
<p>Dim strDirectory, strFile, num</p>
<p>num1 = 0<br />
num2 = 0<br />
num3 = 1</p>
<p>Set objFSO = CreateObject(&#8220;Scripting.FileSystemObject&#8221;)<br />
Const ForAppending = 8</p>
<p>Do</p>
<p>URL = &#8220;WEBSITE URL&#8221; &amp; num1 &amp; num2 &amp; num3 &amp; &#8220;.JPG&#8221;</p>
<p>strDirectory = &#8220;C:\&#8221;<br />
strFile = &#8220;\Copy_img.html&#8221;</p>
<p>Link = URL</p>
<p>sDate = Date<br />
sTime = Time</p>
<p>If objFSO.FileExists(strDirectory &amp; strFile) then</p>
<p>Else</p>
<p>Set objTextFile = objFSO.OpenTextFile _<br />
(strDirectory &amp; strFile, ForAppending, True)</p>
<p>objTextFile.WriteLine(&#8220;&lt;head&gt;&lt;title&gt;Copy img! &#8211; Created by Hassan Maynard&lt;/title&gt;&lt;/head&gt; &lt;Body BGCOLOR=&#8221; &amp; chr(34) &amp; &#8220;#FFFFFF&#8221; &amp; chr(34) &amp; &#8221; TEXT =&#8221; &amp; chr(34) &amp; &#8220;#000000&#8243; &amp; chr(34) &amp; &#8221; LINK =&#8221; &amp; chr(34) &amp; &#8220;#39bbe5&#8243; &amp; chr(34) &amp; &#8221; VLINK =&#8221; &amp; chr(34) &amp; &#8220;#e539aa&#8221; &amp; chr(34) &amp; &#8221; ALINK =&#8221; &amp; chr(34) &amp; &#8220;#6139e5&#8243; &amp; chr(34) &amp; &#8220;&gt;&lt;/Body&gt;&lt;H1&gt;Rip&#8217;em!&lt;/H1&gt; &lt;b&gt;&lt;i&gt;Created by Hassan Maynard&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;br&gt;&lt;br&gt;&#8221;)</p>
<p>objTextFile.Close</p>
<p>End If</p>
<p>If num3 &gt; 9 Then<br />
num2 = &#8220;&#8221;<br />
Else<br />
End If</p>
<p>If num3 &gt; 99 Then<br />
num1 = &#8220;&#8221;</p>
<p>counter = num1 &amp; num2 &amp; num3</p>
<p>Else<br />
End If</p>
<p>Set objTextFile = objFSO.OpenTextFile _<br />
(strDirectory &amp; strFile, ForAppending, True)</p>
<p>objTextFile.WriteLine(&#8220;Picture &#8221; &amp; num1 &amp; num2 &amp; num3 &amp; &#8221; added on &#8221; &amp; sDate &amp; &#8221; at &#8221; &amp; sTime &amp; &#8220;&lt;br&gt;&lt;br&gt; &lt;img src=&#8221; &amp; LINK &amp; &#8220;&gt; &lt;br&gt;&lt;br&gt;&#8221;)</p>
<p>objTextFile.Close</p>
<p>num3 = num3 +1</p>
<p>Loop Until counter = 500</p>
<p>Set objExplorer = CreateObject(&#8220;InternetExplorer.Application&#8221;)</p>
<p>with objExplorer<br />
.Navigate &#8220;file:///C:/Copy_img.html&#8221;<br />
.ToolBar = 0<br />
.StatusBar = 0<br />
.Visible = 1<br />
End with</p>
<p>do while objExplorer.readystate&lt;&gt;4 : wscript.sleep 50 : loop</p>
<h4>Task</h4>
<p>This script records the image link on a specified website and current/system date &amp; time. It then looks for a local html file named copy_img.html on the local “C” drive. If the file exists the document will open to be edited, if not the file will be created. The script then starts creating entries for each image. Example: Picture 063 added on 12/27/2009 at 12:00PM. This continues until the counter has reached the last number specified. After this is complete Internet Explorer opens up with the images.</p>
<p><a href="http://hassanmaynard.com/wp-content/uploads/2009/12/rip_em_example.jpg"><img class="alignnone size-medium wp-image-260" title="rip_em_example" src="http://hassanmaynard.com/wp-content/uploads/2009/12/rip_em_example-300x260.jpg" alt="rip_em_example" width="300" height="260" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hassanmaynard.com/2009/12/vbs-script-embedding-images/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

