<?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>Dwarfsoft [GPA] &#187; Initiative</title>
	<atom:link href="http://www.dwarfsoft.com/blog/tag/initiative/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dwarfsoft.com/blog</link>
	<description>Great Programming Artistry</description>
	<lastBuildDate>Tue, 22 Jun 2010 21:01:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>More GTD-PHP Work</title>
		<link>http://www.dwarfsoft.com/blog/2009/08/20/more-gtd-php-work/</link>
		<comments>http://www.dwarfsoft.com/blog/2009/08/20/more-gtd-php-work/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 05:53:44 +0000</pubDate>
		<dc:creator>dwarfsoft</dc:creator>
				<category><![CDATA[Authoring]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Tweet]]></category>
		<category><![CDATA[Addon]]></category>
		<category><![CDATA[GTD]]></category>
		<category><![CDATA[Initiative]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Theory]]></category>

		<guid isPermaLink="false">http://www.dwarfsoft.com/blog/?p=282</guid>
		<description><![CDATA[I have updated my GTD-PHP Email Import Addon so that it now integrates with the current Subversion revision of the code. There is one bug left in it, in that it will not check that there is a mail server set before it tries to connect. I find that this error occurs the first time [...]]]></description>
			<content:encoded><![CDATA[<p>I have updated my GTD-PHP Email Import Addon so that it now integrates with the current Subversion revision of the code. There is one bug left in it, in that it will not check that there is a mail server set before it tries to connect. I find that this error occurs the first time the session is established with the server, and from then on it works fine. By performing an error check against $server = &#8220;&#8221; I should be able to remove that bug as well. </p>
<p>The updated <a href="http://www.gtd-php.com/Developers/EmailImport">EmailImport</a> Addon is now available for download from the <a href="https://www.hosted-projects.com/trac/toae/gtdphp/ticket/569">GTD-PHP Trac wiki</A>.</p>
<p><span id="more-282"></span></p>
<p>I have since moved on to the next most important feature on my personal list of Enhancements (yes, before I fix my known bug in the previous one). I want to be able to have a scheduled email sent every morning with a report on what Actions are overdue, what actions are due today and a rundown on the coming actions in the next week. Additionally this report should contain information on Project deadlines of note (overdue, due and coming). Another report I want is to be able to have the weekly review report emailed weekly to myself (at my work and home email addresses).</p>
<p>To achieve this I have been looking in to using php scripts to create cron jobs on the host system (or schtasks jobs if on a WAMP server for example). I have most of the information required to achieve this now. Once I have implemented a scheduled tasks manager from within GTD-PHP I will then build a custom report builder, which will then be enhanced by the emailer. In all, three addons become interlocked for completing this next feature.</p>
<p>If I didn&#8217;t have GTD-PHP (and therefore wasn&#8217;t following the GTD methodology) to manage all my projects I probably would not be in the position of even being capable of extending any project (I am busier now than ever, but I have more control over my time than ever before). By completing the Addons in my list I will have so much better control over my time and be in a perfect position to achieve some Zen in my life <img src='http://www.dwarfsoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Just so you get some perspective, when I first set up GTD-PHP I added a lot of actions, and immediately closed them. Those statistics had me max at about 30 items in a week. Currently this week I have closed 75 items, and the week isn&#8217;t over. Most of these items have been self imposed actions for me to develop, research, repair, investigate, or whatever. I have given myself more work than at the start, and I have more time off now to blog about it (yet another action) than I have ever had previously.</p>
<p>I thoroughly encourage everybody to look into David Allens Getting Things Done. Worked wonders for me <img src='http://www.dwarfsoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Cheers, Chris.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dwarfsoft.com/blog/2009/08/20/more-gtd-php-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ini File Handler for VBScript</title>
		<link>http://www.dwarfsoft.com/blog/2009/02/27/ini-file-handler-for-vbscript/</link>
		<comments>http://www.dwarfsoft.com/blog/2009/02/27/ini-file-handler-for-vbscript/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 23:16:02 +0000</pubDate>
		<dc:creator>dwarfsoft</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Chris]]></category>
		<category><![CDATA[Concept]]></category>
		<category><![CDATA[INI]]></category>
		<category><![CDATA[Initiative]]></category>
		<category><![CDATA[VBScript]]></category>

		<guid isPermaLink="false">http://www.dwarfsoft.com/blog/?p=175</guid>
		<description><![CDATA[I was recently working on an issue to do with managing .ini files in VBScript. I know what you are all going to say now: Why would you use an INI file when the registry is available for use?! Well, there is one instance that you may wish to use another form of configuration or [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently working on an issue to do with managing .ini files in VBScript. I know what you are all going to say now: Why would you use an INI file when the registry is available for use?! Well, there is one instance that you may wish to use another form of configuration or information passing. In this instance we have an initiation of the Ghost Store method for the System Volume. To achieve a store on the system volume we require the PC to be rebooted and it then boots up into a BartPE environment to run the Ghost Store, and perform a few custom tasks. Therefore, the System Volumes Registry is not present (or requires mounting then reading, which has proven somewhat unreliable for me in the past).</p>
<p>So, the reason it came to developing the Ini file handler class is due to the need to provide some more controlled smarts into the store/restore system. Clusters, such as the one I work within, can be more proactive in their maintenance, and therefore require more advanced features than the corporate stock-standard release is likely to contain. As such the area in which I work is constantly involved in working towards a very automated maintenance process. My skills, lying within scripting, programming, and automation in particular, come in handy in this regard. I regularly disassemble the corporate releases to ensure that they will not break when released out into the wild of our corporate machines.</p>
<p><span id="more-175"></span></p>
<p>The store/restore process was one that I had previously tackled and modified due to the limitations of the corporate model. Unfortunately this modification was temporary, as the updated software that was released from corporate changed the model under which the store/restore process was to operate, and caused the modifications we had made locally to break.</p>
<p>The easiest way of reading Ini files in Windows is to use the Word.Application Object (as gathered quickly for demonstration from <a href="http://www.developersdex.com/asp/message.asp?p=1825&#038;ID=%3C3844526a-169c-4bea-8a18-19595e475487%40n1g2000prb.googlegroups.com%3E">here</a>):</p>
<p>
<div class="wp_syntax"><div class="code"><pre class="vbnet" style="font-family:monospace;"><span style="color: #FF8000;">Set</span> objWord <span style="color: #008000;">=</span> <span style="color: #0600FF;">CreateObject</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;Word.application&quot;</span><span style="color: #000000;">&#41;</span>
WinDir <span style="color: #008000;">=</span> objWord.<span style="color: #0000FF;">System</span>.<span style="color: #0000FF;">PrivateProfileString</span><span style="color: #000000;">&#40;</span>FileName , Section , Key<span style="color: #000000;">&#41;</span></pre></div></div>

</p>
<p>This, however, does not work in BartPE. Instead, I have developed a class that can be added into a VBScript and used very easily. It utilizes Dictionaries to keep the settings organised. This means that if it reads two settings in the same section with the same name, the value will reflect the last one (the one closest to the end of the file).</p>
<p>The full source of the IniFile handler are as follows:</p>
<p>
<div class="wp_syntax"><div class="code"><pre class="vbnet" style="font-family:monospace;"><span style="color: #0600FF;">Class</span> IniFile
   <span style="color: #FF8000;">Private</span> mIniFile
   <span style="color: #008080; font-style: italic;">'</span>
   <span style="color: #008080; font-style: italic;">'----------------------- Sub Load -------------------------------</span>
   <span style="color: #FF8000;">Public</span> <span style="color: #0600FF;">Sub</span> Load<span style="color: #000000;">&#40;</span>Filename<span style="color: #000000;">&#41;</span>
      LoadIni FileName,<span style="color: #0600FF;">False</span>
   <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span>
   <span style="color: #008080; font-style: italic;">'-------------------- End of Sub Load ---------------------------</span>
&nbsp;
   <span style="color: #FF8000;">Public</span> <span style="color: #0600FF;">Sub</span> LoadIni<span style="color: #000000;">&#40;</span>Filename,JustDefaults<span style="color: #000000;">&#41;</span>
     <span style="color: #0600FF;">Dim</span> objFSO, objDictionary, objSubDictionary, <span style="color: #008000;">file</span>, ini, arr, <span style="color: #0600FF;">line</span>, splitline, tmpsplit  
     <span style="color: #FF8000;">Set</span> objFSO <span style="color: #008000;">=</span> <span style="color: #0600FF;">CreateObject</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;Scripting.FileSystemObject&quot;</span><span style="color: #000000;">&#41;</span>
&nbsp;
     <span style="color: #FF8000;">Set</span> objDictionary <span style="color: #008000;">=</span> mIniFile
     <span style="color: #FF8000;">Set</span> objDictionary <span style="color: #008000;">=</span> <span style="color: #0600FF;">CreateObject</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;Scripting.Dictionary&quot;</span><span style="color: #000000;">&#41;</span>
     <span style="color: #FF8000;">Set</span> objSubDictionary <span style="color: #008000;">=</span> <span style="color: #FF8000;">Nothing</span>
     <span style="color: #FF8000;">Set</span> mIniFile <span style="color: #008000;">=</span> objDictionary
     <span style="color: #0600FF;">If</span> JustDefaults <span style="color: #FF8000;">Then</span>
        Read <span style="color: #008000;">=</span> <span style="color: #0600FF;">False</span>
     <span style="color: #FF8000;">Else</span>
        Read <span style="color: #008000;">=</span> <span style="color: #0600FF;">True</span>
     <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
&nbsp;
     <span style="color: #0600FF;">If</span> objFSO.<span style="color: #0000FF;">FileExists</span><span style="color: #000000;">&#40;</span>Filename<span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Then</span>
        <span style="color: #FF8000;">Set</span> <span style="color: #008000;">file</span> <span style="color: #008000;">=</span> objFSO.<span style="color: #0000FF;">OpenTextFile</span><span style="color: #000000;">&#40;</span>Filename<span style="color: #000000;">&#41;</span>
        ini <span style="color: #008000;">=</span> <span style="color: #008000;">file</span>.<span style="color: #0000FF;">ReadAll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
        <span style="color: #008000;">file</span>.<span style="color: #0600FF;">Close</span> 
&nbsp;
        arr <span style="color: #008000;">=</span> <span style="color: #0600FF;">Split</span><span style="color: #000000;">&#40;</span>ini,vbCrLf<span style="color: #000000;">&#41;</span>
        <span style="color: #FF8000;">For</span> <span style="color: #0600FF;">Each</span> <span style="color: #0600FF;">line</span> in arr
           <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">line</span> <span style="color: #008000;">=</span> <span style="color: #808080;">&quot;##STARTDEFAULT&quot;</span> <span style="color: #FF8000;">Then</span>
              Read <span style="color: #008000;">=</span> <span style="color: #0600FF;">True</span>
           <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
           <span style="color: #0600FF;">If</span> Read <span style="color: #FF8000;">Then</span>
              <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">Left</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">Trim</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">Line</span><span style="color: #000000;">&#41;</span>,<span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">=</span> <span style="color: #808080;">&quot;[&quot;</span> <span style="color: #804040;">And</span> <span style="color: #0600FF;">Right</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">Trim</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">Line</span><span style="color: #000000;">&#41;</span>,<span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">=</span> <span style="color: #808080;">&quot;]&quot;</span> <span style="color: #FF8000;">Then</span>
                 <span style="color: #0600FF;">line</span> <span style="color: #008000;">=</span> <span style="color: #0600FF;">replace</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">replace</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">line</span>,<span style="color: #808080;">&quot;[&quot;</span>,<span style="color: #808080;">&quot;&quot;</span><span style="color: #000000;">&#41;</span>,<span style="color: #808080;">&quot;]&quot;</span>,<span style="color: #808080;">&quot;&quot;</span><span style="color: #000000;">&#41;</span>
                 <span style="color: #0600FF;">If</span> <span style="color: #804040;">Not</span> <span style="color: #0600FF;">IsEmpty</span><span style="color: #000000;">&#40;</span>objDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">line</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Then</span>
                    <span style="color: #FF8000;">Set</span> objSubDictionary <span style="color: #008000;">=</span> objDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">line</span><span style="color: #000000;">&#41;</span>
                 <span style="color: #FF8000;">Else</span>
&nbsp;
                    <span style="color: #FF8000;">Set</span> objSubDictionary <span style="color: #008000;">=</span> <span style="color: #0600FF;">CreateObject</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;Scripting.Dictionary&quot;</span><span style="color: #000000;">&#41;</span>
                    <span style="color: #008080; font-style: italic;">'objDictionary.Add line, objSubDictionary</span>
                    <span style="color: #FF8000;">set</span> objDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">line</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">=</span> objSubDictionary
                 <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
              <span style="color: #FF8000;">Else</span>
                 <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">TypeName</span><span style="color: #000000;">&#40;</span>objSubDictionary<span style="color: #000000;">&#41;</span> <span style="color: #008000;">=</span> <span style="color: #808080;">&quot;Nothing&quot;</span> or <span style="color: #0600FF;">IsEmpty</span><span style="color: #000000;">&#40;</span>objSubDictionary<span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Then</span>
                    <span style="color: #FF8000;">Set</span> objSubDictionary <span style="color: #008000;">=</span> <span style="color: #0600FF;">CreateObject</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;Scripting.Dictionary&quot;</span><span style="color: #000000;">&#41;</span>
                    objDictionary.<span style="color: #0000FF;">Add</span> <span style="color: #808080;">&quot;[]&quot;</span>,objSubDictionary
                    <span style="color: #FF8000;">Set</span> objDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;[]&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">=</span> objSubDictionary
                 <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
                 <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">Left</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">Trim</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">line</span><span style="color: #000000;">&#41;</span>,<span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">=</span> <span style="color: #808080;">&quot;#&quot;</span> <span style="color: #FF8000;">Then</span>
                    objSubDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span> <span style="color: #808080;">&quot;[&quot;</span> <span style="color: #008000;">&amp;</span> objSubDictionary.<span style="color: #0000FF;">Count</span> <span style="color: #008000;">&amp;</span> <span style="color: #808080;">&quot;]&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">=</span> <span style="color: #0600FF;">Trim</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">line</span><span style="color: #000000;">&#41;</span>
                 <span style="color: #FF8000;">Else</span>
                    splitline <span style="color: #008000;">=</span> <span style="color: #0600FF;">split</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">Trim</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">line</span><span style="color: #000000;">&#41;</span>,<span style="color: #808080;">&quot;=&quot;</span><span style="color: #000000;">&#41;</span>
&nbsp;
                    <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">TypeName</span><span style="color: #000000;">&#40;</span>splitline<span style="color: #000000;">&#41;</span> &lt;&gt; <span style="color: #808080;">&quot;Nothing&quot;</span> <span style="color: #FF8000;">Then</span>
                       <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">UBound</span><span style="color: #000000;">&#40;</span>splitline<span style="color: #000000;">&#41;</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">1</span> <span style="color: #FF8000;">Then</span>
                          tmpsplit <span style="color: #008000;">=</span> <span style="color: #0600FF;">split</span><span style="color: #000000;">&#40;</span>splitline<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span>, <span style="color: #808080;">&quot;#&quot;</span><span style="color: #000000;">&#41;</span>
                          <span style="color: #008080; font-style: italic;">' Resolve a &lt;value&gt;=&lt;blank&gt; error</span>
                          <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">UBound</span><span style="color: #000000;">&#40;</span>tmpsplit<span style="color: #000000;">&#41;</span> &gt;<span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span> <span style="color: #FF8000;">Then</span>
                             objSubDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">Trim</span><span style="color: #000000;">&#40;</span>splitline<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">=</span> <span style="color: #0600FF;">Trim</span><span style="color: #000000;">&#40;</span>tmpsplit<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> 
                          <span style="color: #FF8000;">Else</span>
                             objSubDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">Trim</span><span style="color: #000000;">&#40;</span>splitline<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">=</span> <span style="color: #808080;">&quot;&quot;</span>
                          <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
                       <span style="color: #FF8000;">Else</span>
                         <span style="color: #008080; font-style: italic;">'Error</span>
                       <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
                    <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
                 <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
              <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
              <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">line</span> <span style="color: #008000;">=</span> <span style="color: #808080;">&quot;##ENDDEFAULT&quot;</span> <span style="color: #804040;">And</span> JustDefaults <span style="color: #FF8000;">Then</span>
            <span style="color: #0600FF;">MsgBox</span> <span style="color: #808080;">&quot;End Default&quot;</span>
                 Read <span style="color: #008000;">=</span> <span style="color: #0600FF;">False</span>
                 <span style="color: #0600FF;">Exit</span> <span style="color: #0600FF;">Sub</span>
              <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
           <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
        <span style="color: #FF8000;">Next</span>
     <span style="color: #FF8000;">Else</span> 
       <span style="color: #0600FF;">Exit</span> <span style="color: #0600FF;">Sub</span>
     <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
   <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span>
   <span style="color: #008080; font-style: italic;">'------------------- End of Sub LoadIni -------------------------</span>
&nbsp;
   <span style="color: #008080; font-style: italic;">'----------------------- Function GetValue -------------------------------</span>
   <span style="color: #FF8000;">Public</span> <span style="color: #0600FF;">Function</span> GetValue<span style="color: #000000;">&#40;</span>Section, Value<span style="color: #000000;">&#41;</span>
      <span style="color: #FF8000;">Set</span> objDictionary <span style="color: #008000;">=</span> mIniFile
      <span style="color: #0600FF;">If</span> IsSection<span style="color: #000000;">&#40;</span>Section<span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Then</span>
         <span style="color: #FF8000;">Set</span> objSubDictionary <span style="color: #008000;">=</span> objDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span>Section<span style="color: #000000;">&#41;</span>
         <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">IsEmpty</span><span style="color: #000000;">&#40;</span>objSubDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span>Value<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Then</span>
            objSubDictionary.<span style="color: #0000FF;">Remove</span><span style="color: #000000;">&#40;</span>Value<span style="color: #000000;">&#41;</span>
         <span style="color: #FF8000;">Else</span>
            GetValue <span style="color: #008000;">=</span> objSubDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span>Value<span style="color: #000000;">&#41;</span>
         <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
      <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
   <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Function</span>
   <span style="color: #008080; font-style: italic;">'-------------------- End of Function GetValue ---------------------------</span>
&nbsp;
   <span style="color: #008080; font-style: italic;">'----------------------- Function IsSection ------------------------------</span>
   <span style="color: #FF8000;">Public</span> <span style="color: #0600FF;">Function</span> IsSection<span style="color: #000000;">&#40;</span>Section<span style="color: #000000;">&#41;</span>
      <span style="color: #FF8000;">Set</span> objDictionary <span style="color: #008000;">=</span> mIniFile
      <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">IsEmpty</span><span style="color: #000000;">&#40;</span>objDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span>Section<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Then</span>
         objDictionary.<span style="color: #0000FF;">Remove</span><span style="color: #000000;">&#40;</span>Section<span style="color: #000000;">&#41;</span>
         IsSection <span style="color: #008000;">=</span> <span style="color: #0600FF;">False</span>
      <span style="color: #FF8000;">Else</span>
        IsSection <span style="color: #008000;">=</span> <span style="color: #0600FF;">True</span>
      <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
   <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Function</span>
   <span style="color: #008080; font-style: italic;">'-------------------- End of Function IsSection --------------------------</span>
&nbsp;
   <span style="color: #008080; font-style: italic;">'----------------------- Function IsSection ------------------------------</span>
   <span style="color: #FF8000;">Public</span> <span style="color: #0600FF;">Function</span> Save<span style="color: #000000;">&#40;</span>FileName<span style="color: #000000;">&#41;</span>
      <span style="color: #FF8000;">Set</span> objDictionary <span style="color: #008000;">=</span> mIniFile
      <span style="color: #FF8000;">Set</span> objFSO <span style="color: #008000;">=</span> <span style="color: #0600FF;">CreateObject</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;Scripting.FileSystemObject&quot;</span><span style="color: #000000;">&#41;</span>
      <span style="color: #FF8000;">Set</span> Outfile <span style="color: #008000;">=</span> objFSO.<span style="color: #0000FF;">CreateTextFile</span><span style="color: #000000;">&#40;</span>FileName<span style="color: #000000;">&#41;</span>
      <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">TypeName</span><span style="color: #000000;">&#40;</span>objDictionary<span style="color: #000000;">&#41;</span> &lt;&gt; <span style="color: #808080;">&quot;Nothing&quot;</span> <span style="color: #FF8000;">Then</span>
         <span style="color: #0600FF;">If</span> <span style="color: #804040;">Not</span> <span style="color: #0600FF;">IsEmpty</span><span style="color: #000000;">&#40;</span>objDictionary.<span style="color: #0000FF;">Keys</span><span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Then</span>
            <span style="color: #FF8000;">For</span> <span style="color: #0600FF;">Each</span> Key in objDictionary.<span style="color: #0000FF;">Keys</span>
               <span style="color: #0600FF;">If</span> Key <span style="color: #008000;">=</span> <span style="color: #808080;">&quot;[]&quot;</span> <span style="color: #FF8000;">Then</span>
               <span style="color: #FF8000;">ElseIf</span> Key <span style="color: #008000;">=</span> <span style="color: #808080;">&quot;&quot;</span> <span style="color: #FF8000;">Then</span>
               <span style="color: #FF8000;">Else</span>
                  Outfile.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;[&quot;</span> <span style="color: #008000;">&amp;</span> Key <span style="color: #008000;">&amp;</span> <span style="color: #808080;">&quot;]&quot;</span><span style="color: #000000;">&#41;</span>
               <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
               <span style="color: #FF8000;">Set</span> objSubDictionary <span style="color: #008000;">=</span> <span style="color: #FF8000;">Nothing</span>
               <span style="color: #0600FF;">If</span> <span style="color: #804040;">Not</span> <span style="color: #0600FF;">IsEmpty</span><span style="color: #000000;">&#40;</span>objDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span>Key<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Then</span>
                  <span style="color: #FF8000;">Set</span> objSubDictionary <span style="color: #008000;">=</span> objDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span>Key<span style="color: #000000;">&#41;</span>
               <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
               <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">TypeName</span><span style="color: #000000;">&#40;</span>objSubDictionary<span style="color: #000000;">&#41;</span> &lt;&gt; <span style="color: #808080;">&quot;Nothing&quot;</span> <span style="color: #FF8000;">Then</span>
                  <span style="color: #0600FF;">If</span> <span style="color: #804040;">Not</span> <span style="color: #0600FF;">IsEmpty</span><span style="color: #000000;">&#40;</span>objSubDictionary.<span style="color: #0000FF;">Keys</span><span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Then</span>
                     <span style="color: #FF8000;">For</span> <span style="color: #0600FF;">Each</span> subKey in objSubDictionary.<span style="color: #0000FF;">Keys</span>
                        <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">Left</span><span style="color: #000000;">&#40;</span>subKey,<span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">=</span> <span style="color: #808080;">&quot;[&quot;</span> <span style="color: #FF8000;">Then</span>
                           OutFile.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span>objSubDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span>subKey<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
                        <span style="color: #FF8000;">Else</span>
                           OutFile.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span>subKey <span style="color: #008000;">&amp;</span> <span style="color: #808080;">&quot;=&quot;</span> <span style="color: #008000;">&amp;</span> objSubDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span>subKey<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
                        <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
                     <span style="color: #FF8000;">Next</span>
                  <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
               <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
               OutFile.<span style="color: #0000FF;">WriteLine</span>
            <span style="color: #FF8000;">Next</span>
         <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
      <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
   <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Function</span>
   <span style="color: #008080; font-style: italic;">'-------------------- End of Function IsSection --------------------------</span>
&nbsp;
   <span style="color: #008080; font-style: italic;">'--------------------- Function AddNextNumeric ---------------------------</span>
   <span style="color: #FF8000;">Public</span> <span style="color: #0600FF;">Function</span> AddNextNumeric<span style="color: #000000;">&#40;</span>Section,Value<span style="color: #000000;">&#41;</span>
      <span style="color: #FF8000;">Set</span> objDictionary <span style="color: #008000;">=</span> mIniFile
      <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">IsEmpty</span><span style="color: #000000;">&#40;</span>objDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span>Section<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Then</span>
         <span style="color: #FF8000;">Set</span> objSubDictionary <span style="color: #008000;">=</span> <span style="color: #0600FF;">CreateObject</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;Scripting.Dictionary&quot;</span><span style="color: #000000;">&#41;</span>
         <span style="color: #FF8000;">Set</span> objDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span>Section<span style="color: #000000;">&#41;</span> <span style="color: #008000;">=</span> objSubDictionary
         objSubDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;1&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">=</span> Value
         AddNextNumeric <span style="color: #008000;">=</span> <span style="color: #FF0000;">1</span>
      <span style="color: #FF8000;">Else</span>
        <span style="color: #FF8000;">Set</span> objSubDictionary <span style="color: #008000;">=</span> objDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span>Section<span style="color: #000000;">&#41;</span>
        Number <span style="color: #008000;">=</span> <span style="color: #FF0000;">1</span>
        <span style="color: #0600FF;">Do</span> <span style="color: #0600FF;">While</span> <span style="color: #0600FF;">IsEmpty</span><span style="color: #000000;">&#40;</span>objSubDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;&quot;</span> <span style="color: #008000;">&amp;</span> Number<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> 
          Number <span style="color: #008000;">=</span> Number <span style="color: #008000;">+</span> <span style="color: #FF0000;">1</span>
        <span style="color: #0600FF;">Loop</span>
        objSubDictionary.<span style="color: #0000FF;">Item</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;&quot;</span> <span style="color: #008000;">&amp;</span> Number<span style="color: #000000;">&#41;</span> <span style="color: #008000;">=</span> Value
        AddNextNumeric <span style="color: #008000;">=</span> Number
      <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
   <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Function</span>
   <span style="color: #008080; font-style: italic;">'------------------ End of Function AddNextNumeric -----------------------</span>
&nbsp;
   <span style="color: #008080; font-style: italic;">'--------------------------- CONSTRUCTOR ---------------------------------</span>
   <span style="color: #FF8000;">Private</span> <span style="color: #0600FF;">Sub</span> Class_Initialize
      <span style="color: #008080; font-style: italic;">' Calss Constructor</span>
      <span style="color: #008080; font-style: italic;">' Initialization goes here</span>
      <span style="color: #FF8000;">Set</span> mIniFile <span style="color: #008000;">=</span> <span style="color: #FF8000;">Nothing</span>
<span style="color: #008080; font-style: italic;">' MsgBox TypeName(mIniFile)</span>
   <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span>
   <span style="color: #008080; font-style: italic;">'------------------------- END CONSTRUCTOR -------------------------------</span>
&nbsp;
   <span style="color: #008080; font-style: italic;">'---------------------------- DESTRUCTOR ---------------------------------</span>
   <span style="color: #FF8000;">Private</span> <span style="color: #0600FF;">Sub</span> Class_Terminate
      <span style="color: #008080; font-style: italic;">' Calss Destructor</span>
      <span style="color: #008080; font-style: italic;">' Cleanup goes here</span>
<span style="color: #008080; font-style: italic;">' MsgBox TypeName(mIniFile)</span>
      <span style="color: #FF8000;">Set</span> mIniFile <span style="color: #008000;">=</span> <span style="color: #FF8000;">Nothing</span>
   <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span>
   <span style="color: #008080; font-style: italic;">'-------------------------- END DESTRUCTOR -------------------------------</span>
<span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Class</span></pre></div></div>

</p>
<p>Usage of the class for reading Ini files is as follows:</p>
<p>
<div class="wp_syntax"><div class="code"><pre class="vbnet" style="font-family:monospace;"><span style="color: #FF8000;">set</span> ifile <span style="color: #008000;">=</span> <span style="color: #FF8000;">New</span> IniFile
ifile.<span style="color: #0000FF;">Load</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;filename.ini&quot;</span><span style="color: #000000;">&#41;</span>
Variable <span style="color: #008000;">=</span> ifile.<span style="color: #0000FF;">GetValue</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;Section&quot;</span>,<span style="color: #808080;">&quot;Variable&quot;</span><span style="color: #000000;">&#41;</span></pre></div></div>

</p>
<p>There are obviously functions in the class that allow for writing out the Ini File and modifying the values. Feel free to play with the code, but please remember to link back to here. I do love my popularity, so any of you who want to link here, please do so.</p>
<p>Cheers, Chris.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dwarfsoft.com/blog/2009/02/27/ini-file-handler-for-vbscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing Roles</title>
		<link>http://www.dwarfsoft.com/blog/2008/06/30/changing-roles/</link>
		<comments>http://www.dwarfsoft.com/blog/2008/06/30/changing-roles/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 12:38:50 +0000</pubDate>
		<dc:creator>dwarfsoft</dc:creator>
				<category><![CDATA[Novell]]></category>
		<category><![CDATA[Politics]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Application]]></category>
		<category><![CDATA[Concept]]></category>
		<category><![CDATA[Container]]></category>
		<category><![CDATA[Distribution]]></category>
		<category><![CDATA[Initiative]]></category>
		<category><![CDATA[NAL]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[TED]]></category>
		<category><![CDATA[Theory]]></category>
		<category><![CDATA[UNC]]></category>
		<category><![CDATA[ZfS]]></category>

		<guid isPermaLink="false">http://www.dwarfsoft.com/blog/?p=30</guid>
		<description><![CDATA[Interesting moves happening at work. Today I moved into a Networks role. Originally it was intended that I be doing 80% Servers and 20% Networks due to the solid input I have provided within the Server team to date. This has now been changed to 80% Networks and 20% Servers. The guy who I am [...]]]></description>
			<content:encoded><![CDATA[<p>Interesting moves happening at work. Today I moved into a Networks role. Originally it was intended that I be doing 80% Servers and 20% Networks due to the solid input I have provided within the Server team to date. This has now been changed to 80% Networks and 20% Servers. The guy who I am filling in for didn&#8217;t like the idea of his role being technically abandonned, and I agree with him. There will definitely be some Server Action from my end anyway, because I have a keen interest in running with a few ideas.</p>
<p>Trav and I have approached the Server team with an idea on distributing apps more effectively, relying mainly on network addresses of the PCs to correctly locate an application server. This brings up a few logistical hurdles.<span id="more-30"></span></p>
<ol>
<li>The restructuring of our Applications such that we can point to a mapped network drive instead of relying on UNC paths.</li>
<li>The fact that some applications are released with site specific information. As we currently have to modify every new release of these apps to include that information, we should approach the issue from a more managable perspective.</li>
<li>The Implementation of Login Scripts to Base Drive Mapping on current Network Location instead of the Current Login or Workstation Context or Group (as this then provides a benefit of decreased WAN traffic for Mobile Computers and Distributed Applications).</li>
<li>The Politics of testing and gaining approval for implementing a new process into something that is seen as a working system. This is possibly the greatest hurdle to overcome in regards to the push for initiative.</li>
</ol>
<p>At least with respect to point Number 4, Trav and I raised this with one of our counterparts in the Server Team, and although we were given some good reasons why some of the ideas we initially had could not go any further than the drawing board, he did provide some additional ideas on how to proceed to at least implement some positive change so that we can all manage our site specific apps (Point number 2) more effectively.</p>
<p>The thing we need to concentrate on first is going to be appropriating some hardware and then building an environment in which we can test some of our theories that are not being implemented. In the mean time I will start testing some of the ideas that the team has approved at this point.</p>
<p>Hopefully we can implement a ZfS Server that creates NALs under the District Container (as opposed to our site containers) which uses %DEST-APPS1% as X:\ instead of a UNC path, and use a Cluster Wide Login Script to appropriately map X:\.</p>
<p>One parting thought on another issue this could have on us, that the X:\ drive is not consistent around the state. From ZfS&#8217;s perspective, everything is all well, however there are a lot more things stored on the X:\ drive that are used constantly from a Technical perspective. This will possibly require some more training, or at least another drive mapping&#8230;</p>
<p>Until I start looking into DFS at least <img src='http://www.dwarfsoft.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>In three weeks time we shall see what position I am in though, before too many things are set in stone.</p>
<p>Cheers, Chris.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dwarfsoft.com/blog/2008/06/30/changing-roles/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
