<?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>Programming | Automation Dojos</title>
	<atom:link href="https://www.automationdojos.com/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.automationdojos.com/tag/programming/</link>
	<description>Applied Automation Ops</description>
	<lastBuildDate>Mon, 03 Jan 2022 00:01:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://www.automationdojos.com/wp-content/uploads/2021/06/Adjo_X_fav_32.png</url>
	<title>Programming | Automation Dojos</title>
	<link>https://www.automationdojos.com/tag/programming/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How To Sort List in Java</title>
		<link>https://www.automationdojos.com/sort-list-in-java/</link>
					<comments>https://www.automationdojos.com/sort-list-in-java/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Tue, 10 Mar 2020 13:17:00 +0000</pubDate>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[How-To Java]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java-how-to]]></category>
		<category><![CDATA[java-list]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=20840</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/sort-list-in-java/">How To Sort List in Java</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_sort-list.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" fetchpriority="high" srcset="https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_sort-list.png 575w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_sort-list-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_sort-list-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_sort-list-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_sort-list-400x240.png 400w" sizes="(max-width: 575px) 100vw, 575px" /></p>
<p>Introduction A List is an interface in the Java collection framework. It can be used to store objects. Programmers often encounter scenarios where they need to sort a List. There are several ways you can achieve this. In the next few sections, I will be going over each method in detail. 1. Using Collections.sort The [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/sort-list-in-java/">How To Sort List in Java</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/sort-list-in-java/">How To Sort List in Java</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_sort-list.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" srcset="https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_sort-list.png 575w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_sort-list-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_sort-list-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_sort-list-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_sort-list-400x240.png 400w" sizes="(max-width: 575px) 100vw, 575px" /></p><h2 class="simpletoc-title">Table of Contents</h2>
<ul class="simpletoc-list">
<li><a href="#introduction">Introduction</a>

</li>
<li><a href="#1-using-collectionssort">1. Using Collections.sort</a>


<ul><li>
<a href="#collectionssort-without-comparator">Collections.sort without Comparator</a>

</li>
<li><a href="#collectionssort-with-comparator">Collections.sort with Comparator</a>

</li>
</ul>
<li><a href="#2-using-listsort">2. Using List.sort</a>

</li>
<li><a href="#3-using-stream-api">3. Using Stream API</a>

</li>
<li><a href="#4-sorting-a-list-of-objects">4. Sorting a List of Objects</a>

</li>
<li><a href="#conclusion">Conclusion</a>
</li></ul>

<h2 class="wp-block-heading" id="introduction">Introduction</h2>


<p>A List is an interface in the Java collection framework. It can be used to store objects. Programmers often encounter scenarios where they need to sort a List. There are several ways you can achieve this. In the next few sections, I will be going over each method in detail.</p>


<h2 class="wp-block-heading" id="1-using-collectionssort">1. Using Collections.sort</h2>


<p>The Collection framework has the java.util.Collections class. This has a lot of utility methods that can be used to perform various operations on Collections. One of these is the Collections.sort method. There are two overloaded versions of this method as explained below.</p>



<div class="rt-block">
<h3 class="wp-block-heading" id="collectionssort-without-comparator"><strong>Collections.sort without Comparator</strong></h3>


<p>This version of the Collections.sort method accepts as parameter a List object. It sorts the List according to the natural order of the elements in the List. The following code demonstrates this:</p>


<div class="su-spacer" style="height:20px"></div>


<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
public static void usingCollectionsSort() {
List&lt;Integer> input = Arrays.asList(34,12,67,8,91,54,24);
Collections.sort(input);
System.out.print("Sorted List:");
input.forEach(num -> System.out.print(num+" "));
}</pre>


<div class="su-spacer" style="height:20px"></div>


<p>Here, the code creates a new List with some Integer values. As you can see this List is not sorted. The code then invokes the Collections.sort method. Since the natural ordering for Integers is ascending order, this sorts the List in ascending order. So, this code prints the following output:</p>



<pre class="wp-block-code"><code>Sorted List:8 12 24 34 54 67 91 </code></pre>


<div class="su-spacer" style="height:20px"></div>

<h3 class="wp-block-heading" id="collectionssort-with-comparator"><strong>Collections.sort with Comparator</strong></h3>


<p>There is an overloaded version of the Collections.sort method. In addition to the List to be sorted, this method also accepts as parameter a Comparator. It then sorts the input List as per the specified Comparator. The following code demonstrates this:</p>


<div class="su-spacer" style="height:20px"></div>


<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">
public static void usingCollectionsSortWithComparator() {
List&lt;Integer> input = Arrays.asList(34,12,67,8,91,54,24);
Collections.sort(input,(num1,num2) -> num2-num1);
System.out.print("Sorted List:");
input.forEach(num -> System.out.print(num+" "));
}
</pre>


<div class="su-spacer" style="height:20px"></div>


<p>As before, this code creates an unsorted List with some values. The Collections.sort method is invoked with the input List and a lambda expression that implements the Comparator interface. Here, the lambda expression returns the difference of subtracting the first number from the second number. So, this is equivalent to sorting the List in descending order. So, this code prints the following output:</p>



<pre class="wp-block-code"><code>Sorted List:91 67 54 34 24 12 8</code></pre>

</div>


<h2 class="wp-block-heading" id="2-using-listsort">2. Using List.sort</h2>


<p>Java 8 has added a sort method on the List interface. This can also be used to sort a List. It accepts as parameter a Comparator instance and sorts the List based on the specified Comparator. The following code demonstrates this:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">public static void usingListSortWithStrings() {
List&lt;String> input = Arrays.asList("Horse","Cat","Elephant","Giraffe");
	input.sort((str1,str2) -> str1.compareTo(str2));
	System.out.print("Sorted List:");
	input.forEach(num -> System.out.print(num+" "));

}
</pre>



<p>In this case, the code creates a List of String values. The List.sort method is invoked using a lambda expression that compares the Strings and returns the result of comparison. This is equivalent to sorting the List in alphabetical order. So, this code prints the following output:</p>



<pre class="wp-block-code"><code>Sorted List:Cat Elephant Giraffe Horse</code></pre>



<p>List.sort has better performance compared to Collections.sort. This is because Collections.sort sorts the List by dumping its contents in an array. List.sort on the other hands sorts inline.</p>


<h2 class="wp-block-heading" id="3-using-stream-api">3. Using Stream API</h2>


<p>The Stream API added by Java 8 can also be used to perform several operations on Collections. The Stream interface has a method called sorted that sorts the element in the Stream as per their natural order.&nbsp; The following code demonstrates this:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">public static void usingStreamSort() {
	List&lt;Integer> input = Arrays.asList(34,12,67,8,91,54,24);
	Stream&lt;Integer> inputStream = input.stream();
	Stream&lt;Integer> sortedStream = inputStream.sorted();
	List&lt;Integer> output = sortedStream.collect(Collectors.toList());
	System.out.print("Sorted List:");
	output.forEach(num -> System.out.print(num+" "));
}
</pre>



<p>Here, first the stream() method is invoked on the input List. This returns a Stream corresponding to the List. Then the sorted() method is invoked on the Stream. This returns a new Stream that is sorted. Finally, the collect() method is invoked which converts the Stream to a List back. So, this code prints the same output as before:</p>



<pre class="wp-block-code"><code>Sorted List:8 12 24 34 54 67 91</code></pre>



<p>There is also an overloaded version of the sorted method that accepts as parameter a Comparator instance and sorts the input Stream as per the specified Comparator.</p>


<h2 class="wp-block-heading" id="4-sorting-a-list-of-objects">4. Sorting a List of Objects</h2>


<p>Sometimes, you may have a List of objects and you may need to sort it based on some field in the class. You can achieve this by using a Comparator and either the Collections.sort of List.sort method.</p>



<p>For example, suppose you have a Student class as follows:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">public class Student {
	
	private String name;
	private double marks;
	//constructors, getters and setters
}
</pre>



<p>And suppose you have a List of Student objects that need to be sorted based on the marks field. You can do this using the following code:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">List&lt;Student> input = new ArrayList&lt;Student>();
		
input.add(new Student("Bill",76));
input.add(new Student("Jane",94));
input.add(new Student("George",68));
	
input.sort((s1,s2) -> s1.getMarks() - s2.getMarks());
System.out.print("Sorted List:");
input.forEach(s -> System.out.print(s.getName()+" "));
</pre>



<p>Here, we have used the List.sort method. The lambda expression passed to the sort method implements a Comparator and compares the marks fields. So, this code prints the following output: Sorted List:George Bill Jane</p>


<h2 class="wp-block-heading" id="conclusion">Conclusion</h2>


<p>So, there are several ways in which you can sort a List in Java. You can use the Collections.sort to sort as per the natural order or using a custom Comparator. You can use the List.sort with a custom Comparator as well. You can also use the Stream API to sort a List.</p>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/programming/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D20840" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=Programming&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D20840" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D20840" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/programming/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D20840&title=Programming" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=Programming https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D20840" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=20840" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=20840', 'Programming', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/sort-list-in-java/">How To Sort List in Java</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/sort-list-in-java/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Convert String To Date in Java</title>
		<link>https://www.automationdojos.com/convert-string-to-date/</link>
					<comments>https://www.automationdojos.com/convert-string-to-date/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Tue, 04 Feb 2020 11:58:00 +0000</pubDate>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[How-To Java]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java-how-to]]></category>
		<category><![CDATA[java-strings]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=20831</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/convert-string-to-date/">How To Convert String To Date in Java</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2020/02/post_howto_string-date.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" srcset="https://www.automationdojos.com/wp-content/uploads/2020/02/post_howto_string-date.png 575w, https://www.automationdojos.com/wp-content/uploads/2020/02/post_howto_string-date-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/02/post_howto_string-date-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/02/post_howto_string-date-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/02/post_howto_string-date-400x240.png 400w" sizes="(max-width: 575px) 100vw, 575px" /></p>
<p>Introduction There are often scenarios in programming, where you will need to convert a date in String format to an actual Date object. For example, such a scenario may occur when the date is read from an end user via a UI and sent to the back-end code. In this article, we will understand the [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/convert-string-to-date/">How To Convert String To Date in Java</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/convert-string-to-date/">How To Convert String To Date in Java</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2020/02/post_howto_string-date.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/02/post_howto_string-date.png 575w, https://www.automationdojos.com/wp-content/uploads/2020/02/post_howto_string-date-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/02/post_howto_string-date-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/02/post_howto_string-date-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/02/post_howto_string-date-400x240.png 400w" sizes="auto, (max-width: 575px) 100vw, 575px" /></p><h2 class="simpletoc-title">Table of Contents</h2>
<ul class="simpletoc-list">
<li><a href="#introduction">Introduction</a>

</li>
<li><a href="#java-date-handling">Java Date Handling</a>

</li>
<li><a href="#converting-string-to-javautildate">Converting String to java.util.Date</a>

</li>
<li><a href="#converting-string-to-javautilcalendar">Converting String to java.util.Calendar</a>

</li>
<li><a href="#converting-string-to-javatimelocaldate">Converting String to java.time.LocalDate</a>


<ul><li>
<a href="#localdate-without-formatter">LocalDate without Formatter</a>

</li>
<li><a href="#localdate-with-formatter">LocalDate with formatter</a>

</li>
</ul>
<li><a href="#conclusion">Conclusion</a>
</li></ul>

<h2 class="wp-block-heading" id="introduction">Introduction</h2>


<p>There are often scenarios in programming, where you will need to convert a date in String format to an actual Date object. For example, such a scenario may occur when the date is read from an end user via a UI and sent to the back-end code. In this article, we will understand the different ways in which you can represent a date in Java and how you can convert a String date to each of these Date representations.</p>


<h2 class="wp-block-heading" id="java-date-handling">Java Date Handling</h2>


<p>Before we dive into the details of how to convert a String to a Date, let us understand how Java handles Dates.  In Java, there are three main classes that can be used to represent a date. These are as follows:</p>


<div class="su-note"  style="border-color:#dcdcdc;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#f6f6f6;border-color:#ffffff;color:#444444;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">



<ul class="wp-block-list"><li>java.util.Date</li><li>java.util.Calendar</li><li>java.time.LocalDate</li></ul>



</div></div>



<p>The java.util.Date and java.util.Calendar classes were present right from the early versions of Java. However, these classes have several issues. They are not very user friendly and they do not allow performing date time manipulation very easily. To address all these issues, Java 8 introduced the java.time.LocalDate class as part of DateTime API. The LocalDate class allows performing date operations easily.  So, if you have a String object, you can convert it to a java.util.Date, java.util.Calender object or a java.time.LocalDate object based on your requirements.</p>


<h2 class="wp-block-heading" id="converting-string-to-javautildate">Converting String to java.util.Date</h2>


<p>Sometimes, you may need to convert a String to a java.util.Date object. For this, you need to use the SimpleDateFormat class. You need to specify the format in which the String date is present and invoke the parse method. The following code demonstrates how this can be done:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">private static void convertToDate() throws ParseException {
	String strDate = "2015-06-12";
	SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd");
	Date date = dateFormatter.parse(strDate);
	System.out.println(date);
}
</pre>



<p>This code creates a SimpleDateFormat instance. Since the input date is in the <strong>yyyy-MM-dd</strong> format, the SimpleDateFormat is created using this format. The parse() method is then invoked with the actual String date. This returns a java.util.Date object corresponding to the String. So, this code prints the following output:</p>



<pre class="wp-block-code"><code>Fri Jun 12 00:00:00 IST 2015</code></pre>



<p>You can check out the API documentation for <a href="https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html">SimpleDateFormat</a> in order to understand the patterns that need to be specified for various date formats.</p>


<h2 class="wp-block-heading" id="converting-string-to-javautilcalendar">Converting String to java.util.Calendar</h2>


<p>As mentioned earlier, the java.util.Calendar class also encapsulates a date. The Calendar class has some more features that the java.util.Date class. It provides the ability to extract the day, month, year and other fields corresponding to the date that the Calendar represents. So, sometimes, you may need to convert a String date to a Calendar instance. For this, you first need to convert the String date to a java.util.Date instance via the SimpleDateFormat class. You can then use this Date to create a Calendar instance. The following code demonstrates this:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">private static void convertToCalendar() throws ParseException {
String strDate = "2015-06-12";
	SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd");
	Date date = dateFormatter.parse(strDate);
	Calendar cal = Calendar.getInstance();
	cal.setTime(date);
	System.out.println(date);
}
</pre>



<p>As before, this code uses a SimpleDateFormat and creates a java.util.Date instance from the String date. The Calendar.getInstance() method is invoked which creates a Calendar object corresponding to the current time. The calendar.setTime() method is then invoked with the Date object. This changes the Calendar’s time to the time in the Date object. So, this code prints the following output:</p>



<pre class="wp-block-code"><code>Fri Jun 12 00:00:00 IST 2015</code></pre>


<h2 class="wp-block-heading" id="converting-string-to-javatimelocaldate">Converting String to java.time.LocalDate</h2>


<p>As mentioned earlier, in order to overcome the shortcomings of the Date and Calendar classes, Java 8 introduced the LocalDate class as part of the DateTime API. Compared to the java.util.Date and java.util.Calendar classes, the LocalDate class is much simpler to use.  Let us now understand how to convert a String date to a LocalDate instance.</p>



<div class="rt-block">
<h3 class="wp-block-heading" id="localdate-without-formatter">LocalDate without Formatter</h3>


<p>The LocalDate class has a parse method. You can use this to convert a String to a LocalDate. The following code demonstrates this:</p>

<div class="su-spacer" style="height:20px"></div>

<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">private static void convertToLocalDate() {
String strDate = "2015-06-12";
	LocalDate date = LocalDate.parse(strDate);
	System.out.println(date);
}
</pre>

<div class="su-spacer" style="height:20px"></div>

<p>So, this code simply invokes the parse method with the String date object. It prints the following output: 2015-06-12</p>

<div class="su-spacer" style="height:20px"></div>

<p>The LocalDate.parse() method requires the String date to be in the <strong>yyyy-MM-dd</strong> format. If the String date is in some other format, this method throws an Exception. There is an overloaded version of the parse method that can be used for such scenarios as explained in the next section.</p>

<div class="su-spacer" style="height:20px"></div>
<h3 class="wp-block-heading" id="localdate-with-formatter">LocalDate with formatter</h3>


<p>The LocalDate class has an overloaded parse() method. In addition to the String Date, it accepts a DateTimeFormatter instance that specifies the format of the input date. So, this can be used in case the String date is not in the <strong>yyyy-MM-dd</strong> format. The following code demonstrates this:</p>

<div class="su-spacer" style="height:20px"></div>

<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">private static void convertToLocalDateWithDateFormatter() { 
String strDate = "06/12/2015";
	DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd/MM/yyyy");
	LocalDate date = LocalDate.parse(strDate,formatter);
	System.out.println(date);
}
</pre>

<div class="su-spacer" style="height:20px"></div>

<p>In this case, the String date is in the <strong>dd/MM/YYYY</strong> format.&nbsp; A DateTimeFormatter instance is created with this pattern. The parse() method is then invoked with the String date and the DateTimeFormatter instance. So, this code prints the following output:</p>



<p>2015-06-12</p>

<div class="su-spacer" style="height:20px"></div>

<p>You can check out the API documentation for <a href="https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html">DateTimeFormatter</a> in order to understand the patterns that need to be specified for various date formats.</p>

</div>


<h2 class="wp-block-heading" id="conclusion">Conclusion</h2>


<p>So, in summary, you can use the java.util.Date, java.util.Calendar or the java. time.LocalDate classes to represent a date in Java. You can convert a String date to any of these methods using the methods demonstrated in this article.</p>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/programming/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D20831" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=Programming&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D20831" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D20831" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/programming/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D20831&title=Programming" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=Programming https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D20831" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=20831" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=20831', 'Programming', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/convert-string-to-date/">How To Convert String To Date in Java</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/convert-string-to-date/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Concatenate Strings in Java</title>
		<link>https://www.automationdojos.com/concatenate-strings-in-java/</link>
					<comments>https://www.automationdojos.com/concatenate-strings-in-java/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Sat, 04 Jan 2020 10:00:00 +0000</pubDate>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[How-To Java]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[concatenate]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java-how-to]]></category>
		<category><![CDATA[java-strings]]></category>
		<guid isPermaLink="false">https://www.automationdojos.com/?p=20809</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/concatenate-strings-in-java/">How To Concatenate Strings in Java</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_concatenate-java.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_concatenate-java.png 575w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_concatenate-java-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_concatenate-java-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_concatenate-java-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_concatenate-java-400x240.png 400w" sizes="auto, (max-width: 575px) 100vw, 575px" /></p>
<p>Introduction In Java, a String is a sequence of characters. There are often programming situations where you will need to concatenate Strings. There are several ways in which you can achieve this. In the next few sections, I will be going over each method in detail. Using + Operator The + operator is also known [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/concatenate-strings-in-java/">How To Concatenate Strings in Java</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/concatenate-strings-in-java/">How To Concatenate Strings in Java</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="575" height="345" src="https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_concatenate-java.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_concatenate-java.png 575w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_concatenate-java-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_concatenate-java-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_concatenate-java-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2021/10/post_howto_concatenate-java-400x240.png 400w" sizes="auto, (max-width: 575px) 100vw, 575px" /></p><h2 class="simpletoc-title">Table of Contents</h2>
<ul class="simpletoc-list">
<li><a href="#introduction">Introduction</a>

</li>
<li><a href="#using-operator">Using + Operator</a>

</li>
<li><a href="#using-stringconcat">Using String.concat</a>

</li>
<li><a href="#using-stringbufferstringbuilder">Using StringBuffer/StringBuilder</a>


<ul><li>
<a href="#using-stringbuffer-for-strings">Using StringBuffer for Strings</a>

</li>
<li><a href="#using-stringbuffer-for-other-types-of-data">Using StringBuffer for other types of data</a>

</li>
<li><a href="#using-stringbuilder">Using StringBuilder</a>

</li>
</ul>
<li><a href="#using-stringjoin">Using String.join</a>


<ul><li>
<a href="#stringjoin-for-multiple-strings">String.join for multiple Strings</a>

</li>
<li><a href="#stringjoin-for-a-collection">String.join for a Collection</a>

</li>
</ul>
<li><a href="#using-stringjoiner">Using StringJoiner</a>

</li>
<li><a href="#conclusion">Conclusion</a>
</li></ul>

<h2 class="wp-block-heading" id="introduction">Introduction</h2>


<p>In Java, a String is a sequence of characters. There are often programming situations where you will need to concatenate Strings. There are several ways in which you can achieve this. In the next few sections, I will be going over each method in detail.</p>


<h2 class="wp-block-heading" id="using-operator">Using + Operator</h2>


<p>The + operator is also known as the concatenation operator. It can be used to concatenate Strings. The following code demonstrates this:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">private static void usingPlusOperator() {
String string1 = "Hello ";
	String string2 = "World";
	String result = string1+string2;
	System.out.println(result);
}</pre>



<p>This code creates two Strings called string1 and string2. It uses the + operator to concatenate them and assign the result to a separate variable. So, this code prints the following output:</p>



<pre class="wp-block-code"><code>Hello World</code></pre>



<p>This approach can be used to concatenate more than two values. Not only that, it can be used to concatenate other types of values like primitives as shown below:</p>



<pre class="wp-block-code"><code>String result = “Hello”+” World”+” 2“+” times!”; </code></pre>



<p>So, this code prints the following output:</p>



<pre class="wp-block-code"><code>Hello World 2 times!</code></pre>



<p>The downside of this approach is that it is not very efficient. Since String is immutable, every time you use the + operator, a new String is created.</p>


<h2 class="wp-block-heading" id="using-stringconcat">Using String.concat</h2>


<p>The String class has a method called concat. It accepts as parameter a String value and concatenates it with the current String. The following code demonstrates this:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">private static void usingStringConcat() {
	String string1 = "Hello ";
	String string2 = "World";
	String result = string1.concat(string2);
	System.out.println(result);
}
</pre>



<p>As before, this code creates string1 and string2.&nbsp; It then invokes the concat() method on string1 and passes string2 as an argument. So, this code also prints the same output as before:</p>



<pre class="wp-block-code"><code>Hello World</code></pre>



<p>Performance-wise, this approach is not much better than using the + operator. Also, unlike the + operator, this approach cannot be used for multiple Strings or other types of values.</p>


<h2 class="wp-block-heading" id="using-stringbufferstringbuilder">Using StringBuffer/StringBuilder</h2>


<p>In addition to String, Java has the java.lang.StringBuffer and java.lang.StringBuilder classes. These can also be used to concatenate Strings.  The advantage of these classes is that both these classes are mutable, so using them does not result in the creation of new String objects. So StringBuffer and StringBuilder have a better performance as compared to the + operator and concat method.</p>



<div class="rt-block">
<h3 class="wp-block-heading" id="using-stringbuffer-for-strings">Using StringBuffer for Strings</h3>


<p>The StringBuffer class has a method called append which can be used to concatenate Strings. It appends the value passed in with the StringBuffer on which it is invoked. The following code demonstrates this:</p>

<div class="su-spacer" style="height:20px"></div>

<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">private static void usingStringBuffer() {
String string1 = "Hello ";
	String string2 = "World";
	StringBuffer result = new StringBuffer();
	result.append(string1);
	result.append(string2);
	System.out.println(result);
}
</pre>

<div class="su-spacer" style="height:20px"></div>

<p>As before, this code creates string1 and string2.&nbsp; It also creates a StringBuffer called result. It then invokes the append method with both the Strings. So, this code also prints the same output as before: Hello World</p>

<div class="su-spacer" style="height:20px"></div>
<h3 class="wp-block-heading" id="using-stringbuffer-for-other-types-of-data">Using StringBuffer for other types of data</h3>


<p>There are several overloaded versions of the append method that accept data of different types like primitive values, character arrays and Strings. These methods can be used to append different types of data as demonstrated below:</p>

<div class="su-spacer" style="height:20px"></div>

<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">StringBuffer result = new StringBuffer();
result.append("Hello").append(" World ").append(2).append(" times!");
</pre>

<div class="su-spacer" style="height:20px"></div>

<p>So, this code prints the following output: Hello World 2 times!</p>

<div class="su-spacer" style="height:20px"></div>
<h3 class="wp-block-heading" id="using-stringbuilder">Using StringBuilder</h3>


<p>The StringBuilder class is very similar to StringBuffer. It also has a method called append which can be used to concatenate Strings. The only difference is that StringBuffer is synchronised while StringBuilder is not. So StringBuilder has a slight performance advantage over StringBuffer.</p>

<div class="su-spacer" style="height:20px"></div>

<p>The following code demonstrates the StringBuilder.append method:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">private static void usingStringBuilder() {
String string1 = "Hello ";
	String string2 = "World";
	StringBuilder result = new StringBuilder();
	result.append(string1);
	result.append(string2);
	System.out.println(result);
}
</pre>

<div class="su-spacer" style="height:20px"></div>

<p>So, this code is exactly the same as the StringBuffer code and it prints the following output: Hello World</p>

</div>


<h2 class="wp-block-heading" id="using-stringjoin">Using String.join</h2>


<p>Java 8 has added a static join method to the String class. This concatenates Strings using a delimiter. Performance-wise, it is similar to StringBuffer.append, but it has the added advantage that it automatically adds a delimiter.</p>



<div class="rt-block">
<h3 class="wp-block-heading" id="stringjoin-for-multiple-strings">String.join for multiple Strings</h3>


<p>&nbsp;The String.join() method accepts as parameter a variable number of Strings that need to be concatenated as well as a delimiter to separate the Strings. The following code demonstrates this:</p>

<div class="su-spacer" style="height:20px"></div>

<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">private static void usingStringJoin() {

String string1 = "red";
	String string2 = "blue";
	String result = String.join(" ", string1,string2);
	System.out.println(result);

}
</pre>

<div class="su-spacer" style="height:20px"></div>

<p>As before, this code creates string1 and string2.&nbsp; It invokes the join method with these Strings and specifies space (“ “) as a delimiter. So, this code prints the following output: red blue</p>

<div class="su-spacer" style="height:20px"></div>
<h3 class="wp-block-heading" id="stringjoin-for-a-collection">String.join for a Collection</h3>


<p>There is also an overloaded version of the String.join method that accepts as parameter an Iterable implementation. Since all Collection classes implement the Iterable interface, this method can be used to concatenate all the elements in a Collection. The following code demonstrates this:</p>

<div class="su-spacer" style="height:20px"></div>

<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">private static void usingStringJoinWithList() {

List&lt;String> colours = Arrays.asList("red","blue","green","white");
	String result = String.join("/", colours);
	System.out.println(result);

}
</pre>

<div class="su-spacer" style="height:20px"></div>

<p>This code creates a List of String values and passes this List to the String.join method with a “/” as the delimiter. So, this code prints the following output: red/blue/green/white</p>

</div>


<h2 class="wp-block-heading" id="using-stringjoiner">Using StringJoiner</h2>


<p>Java 8 has added a new class called StringJoiner. This concatenates Strings using a delimiter as well as adds a prefix and suffix to the concatenated String. Performance wise, it is similar to StringBuffer.append, but it has the added advantage that it automatically adds a delimiter, prefix and suffix.</p>



<p>The following code demonstrates how the StringJoiner class can be used to concatenate Strings:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">private static void usingStringJoiner() {

	StringJoiner strJoiner = new StringJoiner(",","{","}");	strJoiner.add("red");
	strJoiner.add("blue");
	strJoiner.add("green");
	System.out.println(strJoiner);

}
</pre>



<p>This code creates a StringJoiner. It specifies that a comma symbol (,) should be used as the delimiter. It also specifies that the “{“should be used as the prefix and “}” should be used as the suffix. It then invokes the add method with some String values. So, this concatenates the specified Strings using the specified delimiter, prefix and suffix. So, this code prints the following output: {red,blue,green}</p>


<h2 class="wp-block-heading" id="conclusion">Conclusion</h2>


<p>So, as seen in this article, there are several ways in which you can concatenate Strings in Java. The approach that you need to choose depends on your requirements and performance consideration. If you want to simply concatenate Strings without a delimiter, using a StringBuffer or StringBuilder is a better approach. However, if you want to add delimiters/prefix/suffix, consider going for the String.join or StringJoiner method. &nbsp;</p>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/programming/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D20809" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=Programming&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D20809" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D20809" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/programming/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D20809&title=Programming" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=Programming https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D20809" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=20809" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=20809', 'Programming', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/concatenate-strings-in-java/">How To Concatenate Strings in Java</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/concatenate-strings-in-java/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Early Bound Vs Late Bound (Binding)</title>
		<link>https://www.automationdojos.com/early-bound-vs-late-bound-binding/</link>
					<comments>https://www.automationdojos.com/early-bound-vs-late-bound-binding/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Sun, 21 Apr 2013 12:14:18 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[com binding]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[VBS]]></category>
		<guid isPermaLink="false">http://www.automationdojos.com/?p=280</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/early-bound-vs-late-bound-binding/">Early Bound Vs Late Bound (Binding)</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="275" height="165" src="https://www.automationdojos.com/wp-content/uploads/2020/04/post_Early-Bound-vs-Late-Bound-275x165.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/04/post_Early-Bound-vs-Late-Bound-275x165.png 275w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_Early-Bound-vs-Late-Bound-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_Early-Bound-vs-Late-Bound-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_Early-Bound-vs-Late-Bound-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_Early-Bound-vs-Late-Bound-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_Early-Bound-vs-Late-Bound.png 575w" sizes="auto, (max-width: 275px) 100vw, 275px" /></p>
<p>What is Binding Before we dive into &#8216;Early&#8217; and &#8216;Late&#8217; stuff, let us discover, what the &#8216;Binding&#8217; itself means? In simple terms, the refers to the way a script or an application accesses a COM Automation object. This is manifested as the association of entities such as data, program, procedures etc. with identifiers. It is [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/early-bound-vs-late-bound-binding/">Early Bound Vs Late Bound (Binding)</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/early-bound-vs-late-bound-binding/">Early Bound Vs Late Bound (Binding)</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="275" height="165" src="https://www.automationdojos.com/wp-content/uploads/2020/04/post_Early-Bound-vs-Late-Bound-275x165.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/04/post_Early-Bound-vs-Late-Bound-275x165.png 275w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_Early-Bound-vs-Late-Bound-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_Early-Bound-vs-Late-Bound-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_Early-Bound-vs-Late-Bound-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_Early-Bound-vs-Late-Bound-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_Early-Bound-vs-Late-Bound.png 575w" sizes="auto, (max-width: 275px) 100vw, 275px" /></p><h3>What is Binding</h3>
<p style="text-align: justify;">Before we dive into &#8216;Early&#8217; and &#8216;Late&#8217; stuff, let us discover, what the &#8216;<b>Binding&#8217;</b> itself means?<br />
In simple terms, the <span class="su-label su-label-type-default">&#8216;Binding&#8217;</span> refers to the way a script or an application accesses a COM Automation object. This is manifested as the association of entities such as data, program, procedures etc. with identifiers.</p>
<p>It is done when the application is compiled and all functions called in code must be bound before the code can be executed. In the premise of VBScripting, when a script or application attempts to create an instance of a COM object, it inherently verifies the existence of the object in the relevant or specified namespace besides this the object&#8217;s methods and properties (called in the script) are also verified. This entire process of locating and verification while creating an instance of COM Object is called &#8216;Binding&#8217;.</p>
<div class="rt-block">
<h3>Binding with VBScript</h3>
<p>Here are some typical examples of binding &#8211;</p>
<pre class="EnlighterJSRAW" data-enlighter-language="visualbasic">Set MyObject = CreateObject ("Word.Application") 
Set MyObject = GetObject ("winmgmts:") 
Set MyObject = WScript.CreateObject ("Scripting.FileSystemObject")</pre>
</p>
<p style="text-align: justify;">In general, there are two methods to bind to a COM object using <b><a class="zem_slink" title="VBScript" href="http://en.wikipedia.org/wiki/VBScript" target="_blank" rel="wikipedia noopener noreferrer">VBScript</a> syntax </b>as specified below<b> </b>(other variations exist as well depending upon the specific needs or style) &#8211;</p>
<p><div class="su-note"  style="border-color:#dcdcdc;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#f6f6f6;border-color:#ffffff;color:#444444;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"></p>
<ul class="bullet-crank">
<li>CreateObject (&#8220;[Component or Server or Moniker][.][Object or typename]&#8221;)</li>
<li>GetObject (&#8220;[Component or Server or Moniker][.][Object or typename]&#8221;)</li>
</ul>
<p></div></div></p>
<p style="text-align: justify;">However, if you wish to use purely <b>WSH scripts</b>, then the syntax would slightly change to accommodate the <b>prefix</b> &#8211; &#8216;WScript&#8217; and as in &#8216;WScript.CreateObject&#8217; and &#8216;WScript.GetObject&#8217;.</p>
</div>
<div class="quote">
<div class="quote-l">
<div class="quote-r">
<p style="text-align: justify;">What is the <b>difference</b> between the above two methods, i.e.&nbsp;CreateObject and GetObject again requires a good explanation which may be out of scope of this post. But in short – ‘You should use GetObject while using <b>monikers</b> and if&nbsp;the object to which you are binding exists outside the&nbsp;‘File System’ <b>namespace</b> examples would be <b>WMI</b> and <b>ADSI</b>. For all other purposes CreateObject should do fine</p>
</div>
</div>
</div>
<p style="text-align: justify;">Coming back to Early and Late terms, the &#8216;COM&#8217; support two types of binding &#8211;</p>
<p><div class="su-box su-box-style-default" id="" style="border-color:#bfbfbf;border-radius:3px;"><div class="su-box-title" style="background-color:#f2f2f2;color:#666666;border-top-left-radius:1px;border-top-right-radius:1px">COM Binding Types Explained</div><div class="su-box-content su-u-clearfix su-u-trim" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px"></p>
<p class="dropcap"><span class="dropcap">1</span><span class="su-label su-label-type-default">Early Binding :</span>With this type of binding the &#8216;COM Object&#8217;, its methods and properties are all checked when the script or program is compiled. This has some obvious advantages. Firstly any problems with &#8216;COM Object&#8217; binding if exist makes the compilation to fail and hence results in the early discovery of related issues. Secondly, this provides the advantage of early access to object model and library (COM) and hence the related information is loaded itself into the compilation or the program. Lastly, as obvious scripts or programs supporting &#8216;Early Bindinding&#8217; are relatively faster.</p>
<p class="dropcap"><span class="dropcap">2</span><span class="su-label su-label-type-default">Late Binding : </span> Since VBScript is a not a compiled language, natively it supports only &#8216;Late Binding&#8217;. Hence unlike the &#8216;Early Binding&#8217;, in case of VBScript the binding does not occur until the program is actually executed. In this scenario the program usually performs frequent registry or namespace lookups upon execution to access the information about the &#8216;COM Objects&#8217;, consequently any issues with the COM information are not discovered until the actual execution of the script/program.</p>
<p></div></div></p>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/programming/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D280" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=Programming&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D280" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D280" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/programming/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D280&title=Programming" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=Programming https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D280" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=280" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=280', 'Programming', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/early-bound-vs-late-bound-binding/">Early Bound Vs Late Bound (Binding)</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/early-bound-vs-late-bound-binding/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Does VBScript Supports all COM Objects ?</title>
		<link>https://www.automationdojos.com/vbscript-supports-com/</link>
					<comments>https://www.automationdojos.com/vbscript-supports-com/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Thu, 14 Feb 2013 12:07:15 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[com object]]></category>
		<category><![CDATA[scripting]]></category>
		<guid isPermaLink="false">http://www.automationdojos.com/?p=166</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/vbscript-supports-com/">Does VBScript Supports all COM Objects ?</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="275" height="165" src="https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBScript-COM-Object-275x165.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBScript-COM-Object-275x165.png 275w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBScript-COM-Object-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBScript-COM-Object-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBScript-COM-Object-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBScript-COM-Object-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBScript-COM-Object.png 575w" sizes="auto, (max-width: 275px) 100vw, 275px" /></p>
<p>Well the answer in one line is &#8211; No VBScript does not supports all COM Objects or Servers! VBScript works with only a subset of ‘Objects’ knows as ‘Automation Objects‘. As per the official literature, ‘All COM objects must support one or more interfaces, which are simply the avenues by which a COM client can access [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/vbscript-supports-com/">Does VBScript Supports all COM Objects ?</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/vbscript-supports-com/">Does VBScript Supports all COM Objects ?</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="275" height="165" src="https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBScript-COM-Object-275x165.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBScript-COM-Object-275x165.png 275w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBScript-COM-Object-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBScript-COM-Object-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBScript-COM-Object-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBScript-COM-Object-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBScript-COM-Object.png 575w" sizes="auto, (max-width: 275px) 100vw, 275px" /></p><p style="text-align: justify;">Well the answer in one line is &#8211; No VBScript does not supports all COM Objects or Servers!</p>
<div class="approved2">
<p style="text-align: justify;">VBScript works with only a subset of ‘Objects’ knows as ‘<strong>Automation Objects</strong>‘. As per the official literature, ‘All COM objects must support one or more interfaces, which are simply the avenues by which a COM client can access a COM server. Any object which supports <strong>IDispatch interface</strong> is known as the Automation Object. Since not all COM objects support this interface hence VBScript does not directly work with all COM objects’</p>
<div class="module-icon"></div>
</div>
<p style="text-align: justify;">For more information on COM and Automation Objects refer to earlier post on &#8216;<a href="https://www.automationdojos.com/in-proc-out-proc/" rel="noopener noreferrer" target="_blank">In-Proc and Out-Proc</a>&#8216; servers here.</p>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/programming/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D250" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=Programming&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D250" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D250" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/programming/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D250&title=Programming" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=Programming https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D250" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=250" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=250', 'Programming', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/vbscript-supports-com/">Does VBScript Supports all COM Objects ?</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/vbscript-supports-com/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>COM Components and Scripting Process</title>
		<link>https://www.automationdojos.com/com-scripting-process/</link>
					<comments>https://www.automationdojos.com/com-scripting-process/#comments</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Mon, 14 Jan 2013 12:03:25 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[VBScript]]></category>
		<guid isPermaLink="false">http://www.automationdojos.com/?p=159</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/com-scripting-process/">COM Components and Scripting Process</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="275" height="165" src="https://www.automationdojos.com/wp-content/uploads/2020/04/post_com-scripting-process-275x165.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/04/post_com-scripting-process-275x165.png 275w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_com-scripting-process-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_com-scripting-process-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_com-scripting-process-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_com-scripting-process-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_com-scripting-process.png 575w" sizes="auto, (max-width: 275px) 100vw, 275px" /></p>
<p>Although this article should not concern you at all as a &#8216;script developer&#8217; as long as you are aware of creating a reference to &#8216;Automation Objects&#8217; but for people with an appetite to look behind the scenes, it is quite recommended! Moreover it is always useful to know what, indeed happens when you are creating [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/com-scripting-process/">COM Components and Scripting Process</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/com-scripting-process/">COM Components and Scripting Process</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p style="text-align: justify;">Although this article should not concern you at all as a &#8216;script developer&#8217; as long as you are aware of creating a reference to &#8216;Automation Objects&#8217; but for people with an appetite to look behind the scenes, it is quite recommended! Moreover it is always useful to know what, indeed happens when you are creating an instance of any COM object in your script.</p>
<p style="text-align: justify;">In this article, we discuss the <span class="su-label su-label-type-default">&#8216;COM Object instantiation&#8217;</span> and <span class="su-label su-label-type-default">&#8216;Binding&#8217; process</span>. But before we go through this article it would be a good idea to have a look at COM and Scripting Fundamentals posted earlier in this article &#8216;<a href="https://www.automationdojos.com/in-proc-out-proc/" target="_blank" rel="noopener noreferrer">In-Proc and Out-Proc</a>&#8216; or refer to &#8216;Glossary&#8217; page for a quick brush-up of related terms.</p>
<div class="rt-block">
<h3 style="text-align: justify;">The COM Registration Process</h3>
<p style="text-align: justify;">This story starts when an application or library is installed on the operating system. During the installation, this library or application &#8216;<strong>registers</strong>&#8216; itself with the operating system just like &#8216;<strong>regsvr32</strong>&#8216; command if you are aware of it. The idea behind this registration is for the system to know that</p>
<p><div class="su-note"  style="border-color:#dcdcdc;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#f6f6f6;border-color:#ffffff;color:#747474;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"></p>
<ol>
<li>A new &#8216;<a class="zem_slink" title="Component Object Model" href="http://en.wikipedia.org/wiki/Component_Object_Model" target="_blank" rel="wikipedia noopener noreferrer">COM Server</a>&#8216; is available for use and</li>
<li>What &#8216;COM Classes&#8217; this COM Server has to offer.</li>
</ol>
<p></div></div></p>
<p style="text-align: justify;">There are some keys which get added at the location &#8211; &#8216;<strong>HKEY_CLASSES_ROOT</strong>&#8216; in the registry for each new &#8216;Object Class&#8217;. Among these keys is present one significant key called the &#8216;<strong>Programmatic Identifier</strong>&#8216; (<a class="zem_slink" title="ProgID" href="http://en.wikipedia.org/wiki/ProgID" target="_blank" rel="wikipedia noopener noreferrer">ProgID</a>). This &#8216;<strong>ProgID</strong>&#8216; is the short text which identifies the name given to the respective object class and hence this is the text we use in the command (CreateObject or GetObject) for creating the instance of the COM Object. For example; for creating an instance of &#8216;<em>Scripting Runtime Library</em>&#8216; you may use the &#8216;ProgID&#8217; syntax as &#8211;</p>
<pre class="EnlighterJSRAW" data-enlighter-language="visualbasic">Set MyObject = CreateObject("Scripting.FileSystemObject")</pre>
<p><figure id="attachment_20041" aria-describedby="caption-attachment-20041" style="width: 570px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" src="https://www.automationdojos.com/wp-content/uploads/2021/09/1106162_orig.jpg" alt="" width="570" height="400" class="size-full wp-image-20041" srcset="https://www.automationdojos.com/wp-content/uploads/2021/09/1106162_orig.jpg 570w, https://www.automationdojos.com/wp-content/uploads/2021/09/1106162_orig-300x211.jpg 300w, https://www.automationdojos.com/wp-content/uploads/2021/09/1106162_orig-150x105.jpg 150w, https://www.automationdojos.com/wp-content/uploads/2021/09/1106162_orig-100x70.jpg 100w, https://www.automationdojos.com/wp-content/uploads/2021/09/1106162_orig-200x140.jpg 200w, https://www.automationdojos.com/wp-content/uploads/2021/09/1106162_orig-400x281.jpg 400w" sizes="auto, (max-width: 570px) 100vw, 570px" /><figcaption id="caption-attachment-20041" class="wp-caption-text">Developed for Automation Dojos Website</figcaption></figure></p>
<p style="text-align: justify;">This &#8216;<strong>ProgID</strong>&#8216; is all the information which the system needs to locate and instantiate the COM object. The section below describes the process of locating and instantiation of COM Object.</p>
</div>
<div class="rt-block">
<h3>COM Instantiation Process</h3>
<p style="text-align: justify;">Upon the execution of &#8216;CreateObject&#8217; command as in above example, the &#8216;Script Engine&#8217; parses the &#8216;ProgID&#8217; and passes it to a &#8216;COM API&#8217; which in turn is responsible for creating the object reference. The steps below explain the remaining process &#8211;</p>
<p><div class="su-note"  style="border-color:#dcdcdc;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#f6f6f6;border-color:#ffffff;color:#747474;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"></p>
<ul class="bullet-crank">
<li>The &#8216;<strong>COM API</strong>&#8216; searches the &#8216;<strong>HKEY_CLASSES_ROOT</strong>&#8216; section of the registry for the subkey with the same name as the ProgID.</li>
<li>If the above subkey is located then the COM API searches for another subkey called the class ID (<a class="zem_slink" title="Globally unique identifier" href="http://en.wikipedia.org/wiki/Globally_unique_identifier" target="_blank" rel="wikipedia noopener noreferrer">CLSID</a>) in the &#8216;HKEY_CLASSES_ROOT&#8217; section. This &#8216;<strong>CLSID</strong>&#8216; is a globally unique identifier (<strong>GUID</strong>) of the Automation Object.</li>
<li>Once the system locates the &#8216;<strong>GUID</strong>&#8216;, it makes a note of it since this GUID is what the system uses in future to track and use the object.</li>
<li>With this GUID the system searches the following registry location &#8211;  &#8216;<strong>HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID</strong>&#8216; to retrieve the necessary information like the location of the executable or library file name.</li>
<li>Finally, the &#8216;COM API&#8217; loads the relevant application or library file name as deduced above,  creates the object and returns the reference to the calling script.</li>
</ul>
<p></div></div><figure id="attachment_20042" aria-describedby="caption-attachment-20042" style="width: 629px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" src="https://www.automationdojos.com/wp-content/uploads/2021/09/547729_orig.jpg" alt="" width="629" height="403" class="size-full wp-image-20042" srcset="https://www.automationdojos.com/wp-content/uploads/2021/09/547729_orig.jpg 629w, https://www.automationdojos.com/wp-content/uploads/2021/09/547729_orig-300x192.jpg 300w, https://www.automationdojos.com/wp-content/uploads/2021/09/547729_orig-150x96.jpg 150w, https://www.automationdojos.com/wp-content/uploads/2021/09/547729_orig-200x128.jpg 200w, https://www.automationdojos.com/wp-content/uploads/2021/09/547729_orig-400x256.jpg 400w" sizes="auto, (max-width: 629px) 100vw, 629px" /><figcaption id="caption-attachment-20042" class="wp-caption-text">Developed for Automation Dojos Website</figcaption></figure></p>
<div class="approved2">
<p style="text-align: justify;"><em>On the last note – If you are wondering what’s the difference between ProgID and GUID? The answer is that they are more or less aliases. Since the ProgID is easier for developers to remember and use, it is used by them while the cryptic GUID is used by the system. Both of them point to the same automation object in a given scenario.</em></p>
<div class="module-icon"></div>
</div>
</div>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/programming/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D159" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=Programming&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D159" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D159" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/programming/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D159&title=Programming" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=Programming https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D159" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=159" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=159', 'Programming', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/com-scripting-process/">COM Components and Scripting Process</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/com-scripting-process/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Interpreted Vs Compiled Languages</title>
		<link>https://www.automationdojos.com/interpreted-vs-compiled-languages/</link>
					<comments>https://www.automationdojos.com/interpreted-vs-compiled-languages/#comments</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Thu, 10 Jan 2013 12:04:56 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[compiled]]></category>
		<category><![CDATA[interpreted]]></category>
		<category><![CDATA[scripting]]></category>
		<guid isPermaLink="false">http://www.automationdojos.com/?p=163</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/interpreted-vs-compiled-languages/">Interpreted Vs Compiled Languages</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="275" height="165" src="https://www.automationdojos.com/wp-content/uploads/2020/04/post_InterpretedVsCompiled-275x165.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/04/post_InterpretedVsCompiled-275x165.png 275w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_InterpretedVsCompiled-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_InterpretedVsCompiled-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_InterpretedVsCompiled-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_InterpretedVsCompiled-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_InterpretedVsCompiled.png 575w" sizes="auto, (max-width: 275px) 100vw, 275px" /></p>
<p>This is based on an excerpt from one of my favourite literature on VBScript and in fact, is quite relevant with respect to one of the earlier post &#8211; &#8216;Fundamentals and Concepts&#8216; posted under VBS tutorials. Since we know that at some point, every language needs to be converted into machine-readable commands (binary) for the machine [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/interpreted-vs-compiled-languages/">Interpreted Vs Compiled Languages</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/interpreted-vs-compiled-languages/">Interpreted Vs Compiled Languages</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="275" height="165" src="https://www.automationdojos.com/wp-content/uploads/2020/04/post_InterpretedVsCompiled-275x165.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/04/post_InterpretedVsCompiled-275x165.png 275w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_InterpretedVsCompiled-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_InterpretedVsCompiled-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_InterpretedVsCompiled-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_InterpretedVsCompiled-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_InterpretedVsCompiled.png 575w" sizes="auto, (max-width: 275px) 100vw, 275px" /></p><p style="text-align: justify;">This is based on an excerpt from one of my favourite literature on VBScript and in fact, is quite relevant with respect to one of the earlier post &#8211; &#8216;<a href="https://www.automationdojos.com/vbs-part-2-funda-and-concepts/" rel="noopener noreferrer" target="_blank">Fundamentals and Concepts</a>&#8216; posted under VBS tutorials.</p>
<p style="text-align: justify;">Since we know that at some point, every language needs to be converted into machine-readable commands (binary) for the machine to understand and execute it, both the terms &#8216;<strong>compiled</strong>&#8216; and &#8216;<strong>interpreted</strong>&#8216; actually refer to this process only.</p>
<div class="rt-block">
<div style="text-align: justify;">
<h3>Compiled Languages</h3>
<p>In the case of &#8216;<strong>compilation</strong>&#8216;, the source code is almost &#8216;<strong>re-coded</strong>&#8216; into another language/form (binary) before distribution or deployment for the end-user. Hence after &#8216;compilation&#8217; the end product of the source code remains no more human-readable but rather becomes only machine-readable and hence may require special tools to unpack or read it. </p>
<p>Moreover during the compilation process generally a good number of checks and verifications are performed which may verify the source code for syntax errors, dependencies (COM objects etc.), methods and properties of called libraries or COM servers, namespaces, and other resources. If everything goes fine, you get a packaged end product (example; &#8216;.exe&#8217; file). All this happens even before a single line of code is actually executed by the end-user.</p>
</div>
</div>
<div class="rt-block">
<h3>Interpreted Languages</h3>
<p>However in case of the &#8216;<strong>Interpreted language</strong>&#8216;, as is the case with our VBScript, the conversion into machine-readable commands actually does not take place <strong>until</strong> the &#8216;runtime&#8217;. </p>
<p>Hence the end product of the source code remains as a plain text file with the relevant extension (.vbs in our case). Now when this file is executed, the conversion into machine language takes place on-the-fly. This on-the-fly conversion process is performed by the relevant &#8216;<strong>Scripting Engine</strong>&#8216;.Moreover this entire process of &#8216;Interpretation&#8217; occurs logically in the memory and hence in no way alters your script source code which remains as it is. The syntax and other checks are performed in this case as well but again at<strong> &#8216;runtime&#8217;</strong> only while the code is actually getting executed.</p>
</div>
<p><div class="su-box su-box-style-default" id="" style="border-color:#bfbfbf;border-radius:3px;"><div class="su-box-title" style="background-color:#f2f2f2;color:#6b6b6b;border-top-left-radius:1px;border-top-right-radius:1px">Runtime Compilation - Disadvantages</div><div class="su-box-content su-u-clearfix su-u-trim" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px"></p>
<p>A couple of worth mentioning disadvantages which &#8216;runtime compilation&#8217; brings along are :</p>
<ul class="bullet-arrow2" style="font-size:13px;line-height:1.65em;">
<li>Since the system has to exert more effort during runtime the performance is going to be slower in case of runtime compilation. But unless you are thousands of lines of code it should be pretty affordable.</li>
<li>Source Code security and protection is again one &#8216;grey area&#8217; in case of runtime compilation. Since the end product is still a plain text file, it is prone to snooping and accidental changes.</li>
<li>Late discovery of bugs and errors is again a disadvantage. There can be a lot of syntax errors, misspelt variable or object names or even logic errors which you would be able to discover early in case of compiled languages but in case of runtime compilation these are not visible until the runtime.</li>
</ul>
<p></div></div></p>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/programming/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D163" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=Programming&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D163" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D163" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/programming/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D163&title=Programming" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=Programming https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D163" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=163" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=163', 'Programming', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/interpreted-vs-compiled-languages/">Interpreted Vs Compiled Languages</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/interpreted-vs-compiled-languages/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
			</item>
		<item>
		<title>VBS Part 2 &#8211; Fundamentals and Concepts</title>
		<link>https://www.automationdojos.com/vbs-part-2-concepts/</link>
					<comments>https://www.automationdojos.com/vbs-part-2-concepts/#respond</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Thu, 20 Dec 2012 12:09:34 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Tutorials]]></category>
		<category><![CDATA[scripting]]></category>
		<guid isPermaLink="false">http://www.automationdojos.com/?p=173</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/vbs-part-2-concepts/">VBS Part 2 &#8211; Fundamentals and Concepts</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="275" height="165" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-275x165.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-275x165.png 275w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2.png 575w" sizes="auto, (max-width: 275px) 100vw, 275px" /></p>
<p>Having gone through the Introductory part, it is time to look at some crucial fundamentals and concepts. This article is to refresh some of the key facts and features of VBScript. In the least, you should consider the following six points for developing a fundamental understanding of VBScript. Though we will cover these concepts in [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/vbs-part-2-concepts/">VBS Part 2 &#8211; Fundamentals and Concepts</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/vbs-part-2-concepts/">VBS Part 2 &#8211; Fundamentals and Concepts</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="275" height="165" src="https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-275x165.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-275x165.png 275w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/05/post_vbs-part2.png 575w" sizes="auto, (max-width: 275px) 100vw, 275px" /></p><p style="text-align: justify;">Having gone through the Introductory part, it is time to look at some crucial fundamentals and concepts. This article is to refresh some of the key facts and features of VBScript. In the least, you should consider the following six points for developing a fundamental understanding of VBScript.</p>
<p>Though we will cover these concepts in depth along with examples in the subsequent tutorials, but for now these brief points are enough for you to understand &#8216;what you can or should do with VBScript&#8217;. So without further ado, let&#8217;s jump on to these concepts.</p>
<div class="rt-block">
<h3 style="text-align: justify;">VBScript is a Scripting Language</h3>
<p style="text-align: justify;">&#8216;VBScript&#8217; is a &#8216;scripting language&#8217;! What does this mean? Well, a vague difference between a programming and scripting is that a scripting language is not pre-compiled until runtime and hence while the end product of a programming language is mostly a compiled binary executable program (example; .exe), the end product of a scripting language is rather the source code itself (example; .vbs file)!<br />
Hence unlike C++, VB or other compiled programming languages, the &#8216;VBScript&#8217; is essentially an <span class="su-label su-label-type-default">&#8216;interpreted language&#8217; which is interpreted by &#8216;VBScript Engine&#8217; at runtime</span> i.e. every time the code is actually executed it is interpreted (or compiled internally).</p>
<p>For detailed explanation around interpreted and compiled languages, please refer to the earlier article &#8216;<a href="https://www.automationdojos.com/interpreted-vs-compiled-languages/" rel="noopener noreferrer" target="_blank">Interpreted Vs Compiled languages</a>&#8216;</p>
</div>
<div class="rt-block">
<h3 style="text-align: justify;">VBScript Supports &#8216;Late Binding&#8217;</h3>
<p style="text-align: justify;">Since VBScript is a not a compiled language, hence natively it supports only &#8216;Late Binding&#8217;. Therefore unlike the &#8216;Early Binding&#8217; scenario, in case of VBScript being the &#8216;Late Binding&#8217; language, the binding does not occur until the program is actually executed.</p>
<p>In this scenario the program usually performs frequent registry or namespace lookups upon execution to access the information about the &#8216;COM Object&#8217;, consequently, any issues with the COM information are not discovered until actual execution. For further reading around this concept, please refer to dedicated article on &#8216;<a href="https://www.automationdojos.com/early-bound-vs-late-bound-binding/" rel="noopener noreferrer" target="_blank">Early Bound Vs Late Bound</a>&#8216;</p>
</div>
<div class="rt-block">
<h3 style="text-align: justify;">Loosely Typed Language</h3>
<p style="text-align: justify;">When it comes to &#8216;Data Types&#8217;, VBScript is a &#8216;loosely typed language&#8217;. What this means is that the programmer does <span class="su-label su-label-type-default">not have to declare the &#8216;Data Type&#8217; of variables in advance</span>. Stating it the other way, VBScript does not provide any means for declaring the &#8216;Data Types&#8217; for the variables and rather uses a generic or universal data type called the &#8216;Variant&#8217; which can logically hold any type of value by means of its &#8216;Sub-Type&#8217;</p>
<p>Such a strategy of &#8216;having and not having data type&#8217; simultaneously is manifested by the concept of &#8216;Variant&#8217; and its &#8216;Sub-Type&#8217;. Summing-up this by means of a vague analogy, &#8220;all variables in VBScript have a default &#8216;data type called variant&#8217; which is equivalent of &#8216;no data type&#8217;, however, each variant has an associated &#8216;Sub-Type&#8217; which could be a string, integer, float&#8221; etc. Together they manifest the &#8216;having and not-having&#8217; strategy. More details around this have been discussed in the below section</p>
</div>
<div class="rt-block">
<h3 style="text-align: justify;">Single and Universal Data Type</h3>
<p style="text-align: justify;">As discussed above, VBScript has only one Data Type which is called the &#8216;Variant&#8217;. This <span class="su-label su-label-type-default">&#8216;Variant&#8217; is a special type of data type </span>in the sense that it can logically hold almost any type of value e.g. String, Integer, Date, time etc. But this does not mean the VBScript is totally unaware about &#8216;Data Types&#8217;, in order to facilitate VBScript with the intelligence to recognize and deal with &#8216;Data Types&#8217; it has a <span class="su-label su-label-type-default">special feature known as the &#8216;SubType&#8217;</span>. This &#8216;SubType&#8217; is kind of &#8216;Data Type&#8217; of the &#8216;Variant&#8217; itself. For better understanding Imagine this :</p>
<p style="text-align: justify;">When you declare a variable it automatically gets the &#8216;Variant&#8217; data type assigned to it. But when you actually put some value in this variable then VBScript assigns the appropriate Sub Type (data type) for this value. You do have means to force the data types or query the data types from there onwards.</p>
<p>So in VBScript, you can solve the dilemma of Data Types by <span class="su-label su-label-type-default">asking the &#8216;Variant&#8217; that, what is it&#8217;s SubType</span>. Now, this might complicate things further hence we will leave it here on the worth mentioning note that &#8211; the &#8216;Variant&#8217; is the only data type supported by VBScript and hence it is the only data type returned by VBScript functions.</p>
</div>
<div class="rt-block">
<h3 style="text-align: justify;">Object Model and Libraries</h3>
<p style="text-align: justify;">VBScript does not have any proprietary object model of its own! That is to say that if you want to access say for example &#8216;FileSystem&#8217; or &#8216;Network&#8217; objects and namespace, VBScript alone cannot help you. It has no way to directly talk to these resources.</p>
<p style="text-align: justify;">But the best part is, that it can hook to most of the <span class="su-label su-label-type-default">COM Components or Servers</span> and exploit them to get the work done. Hence whether you need to play with databases (ADO) or XMLs (DOM) or HTML (DOM) or any other supported COM stuff, it&#8217;s a piece of cake for VBS!</p>
<p style="text-align: justify;">Apart from being such a&nbsp; COM Master, it has got some very cool good friends from the same Microsoft family; namely the <span class="su-label su-label-type-default">&#8216;WSH&#8217;, &#8216;WMI&#8217; and &#8216;Scripting Runtime Library&#8217;</span>. You can literally get almost any scripting or automation task done on windows if you are able to make VBScript work together with these friends.</p>
</div>
<div class="rt-block">
<h3 style="text-align: justify;">COM Enabled and COM Automation</h3>
<p style="text-align: justify;">On the last note, VBScript is a <span class="su-label su-label-type-default">fully &#8216;COM-Enabled&#8217; scripting language</span> and hence can very well work with a variety of COM Components / Servers. The worth mentioning point is that VBScript works only with the COM Objects which implement an <span class="su-label su-label-type-default">&#8216;IDispatch&#8217; interface</span>.</p>
<p style="text-align: justify;">Moreover, VBScript supports COM scripting which is to say that you can create your own &#8216;Custom Classes&#8217; and their methods and properties in VBScript. This gives you increased power while using VBScript. By coding &#8216;classes&#8217; you can make your code more robust, modular and reusable.</p>
</div>
<p><div class="su-spacer" style="height:5px"></div></p>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/programming/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D173" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=Programming&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D173" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D173" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/programming/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D173&title=Programming" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=Programming https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D173" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=173" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=173', 'Programming', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/vbs-part-2-concepts/">VBS Part 2 &#8211; Fundamentals and Concepts</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/vbs-part-2-concepts/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is In-Proc and Out-Proc (COM) ?</title>
		<link>https://www.automationdojos.com/in-proc-out-proc/</link>
					<comments>https://www.automationdojos.com/in-proc-out-proc/#comments</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Tue, 18 Dec 2012 12:08:21 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[in-proc]]></category>
		<category><![CDATA[out-proc]]></category>
		<guid isPermaLink="false">http://www.automationdojos.com/?p=170</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/in-proc-out-proc/">What is In-Proc and Out-Proc (COM) ?</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="275" height="165" src="https://www.automationdojos.com/wp-content/uploads/2020/04/post_In-Proc-Out-Proc-275x165.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/04/post_In-Proc-Out-Proc-275x165.png 275w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_In-Proc-Out-Proc-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_In-Proc-Out-Proc-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_In-Proc-Out-Proc-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_In-Proc-Out-Proc-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_In-Proc-Out-Proc.png 575w" sizes="auto, (max-width: 275px) 100vw, 275px" /></p>
<p>The terms &#8216;In-Proc&#8217; and &#8216;Out-Proc&#8217; are to describe the kind of implementation of COM Servers. Before we begin, for those who are not quite &#8216;COM&#8217; savvy, here is a brief preface. COM : The acronym COM stands for &#8216;Component Object Model&#8216; and it is the technology which provides a way for applications (.exe) and libraries (.dll) [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/in-proc-out-proc/">What is In-Proc and Out-Proc (COM) ?</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/in-proc-out-proc/">What is In-Proc and Out-Proc (COM) ?</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="275" height="165" src="https://www.automationdojos.com/wp-content/uploads/2020/04/post_In-Proc-Out-Proc-275x165.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/04/post_In-Proc-Out-Proc-275x165.png 275w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_In-Proc-Out-Proc-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_In-Proc-Out-Proc-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_In-Proc-Out-Proc-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_In-Proc-Out-Proc-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_In-Proc-Out-Proc.png 575w" sizes="auto, (max-width: 275px) 100vw, 275px" /></p><div style="text-align: justify;">
<p>The terms &#8216;In-Proc&#8217; and &#8216;Out-Proc&#8217; are to describe the kind of implementation of COM Servers. Before we begin, for those who are not quite &#8216;COM&#8217; savvy, here is a brief preface.</p>
<p>COM : The acronym COM stands for &#8216;<strong>Component Object Model</strong>&#8216; and it is the technology which provides a way for applications (.exe) and libraries (.dll) to make their functionality available to COM compliant applications or scripts. It helps developers to create re-usable software components as well as to link the components together to build applications.</p>
<p>Over a period the <strong>COM family</strong> has grown to include COM+ (MTS), Distributed COM (DCOM) and ActiveX. If you are interested in further reading refer to this official <a href="http://www.microsoft.com/com/default.mspx" target="_blank" rel="noopener noreferrer">COM Page</a>.</p>
</div>
<div style="text-align: justify;">
<h3><strong>COM Servers and COM Clients :</strong></h3>
<p>Objects that make their functionality available through &#8216;COM&#8217; are known as &#8216;COM Servers&#8217; while the scripts or application which make use of this functionality are called &#8216;COM Clients&#8217;. As simple as that! As stated in the beginning of this post, &#8216;In-Proc&#8217; and &#8216;Out-Proc&#8217; terms describe the kind of implementation of COM Servers. Here is what they mean &#8230;</p>
<div class="rt-block">
<h3><strong>Out-Proc Servers :</strong></h3>
<p>These kinds of servers are generally implemented in <strong>executable</strong> files (.exe) and are characterized by being responsible for running in a different process than the script or application which called them. </p>
<p>This is to say that for example &#8211; if you are running a script which in the middle invokes a Microsoft Excel or Word as an object then this later object would run in a different process of its own then the script which called or invoked it. So if you observe your &#8216;Task Manager&#8217; you would notice a &#8216;WScript.exe&#8217; process (for the script) and another process as &#8216;winword.exe&#8217; (for MSWord) object.</p>
</div>
<div class="rt-block">
<h3><strong>In-Proc Servers :</strong></h3>
<p>These type of servers are typically implemented in <strong>Libraries</strong> (.dll). and unlike the Out-Proc servers, they run in the same process as the script or application which called or invoked them. They do not create a separate process for themselves.</p>
<p>A good example would be the <span class="su-label su-label-type-default">&#8216;Scrun.dll&#8217;</span> (Scripting Runtime Library). So if you try creating an instance of say &#8216;FileSystem&#8217; Object (which exists in scrun.dll) you would not notice any separate process coming up then the already running process of the active script itself (WScript.exe).</p>
</div>
<div class="quote">
<div class="quote-l">
<div class="quote-r">
<p>On the last note, the worth mentioning point would be that ‘<strong>In-Proc’ servers are generally faster than the ‘Out-Proc’ servers</strong> since the operating system does not have to cross the process boundaries to interact with the object and its methods/properties.</p>
</div>
</div>
</div>
</div>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/programming/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D170" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=Programming&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D170" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D170" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/programming/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D170&title=Programming" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=Programming https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D170" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=170" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=170', 'Programming', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/in-proc-out-proc/">What is In-Proc and Out-Proc (COM) ?</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/in-proc-out-proc/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>VBS Part 1 &#8211; Introduction and Background</title>
		<link>https://www.automationdojos.com/vbs-tutorial-part-1/</link>
					<comments>https://www.automationdojos.com/vbs-tutorial-part-1/#comments</comments>
		
		<dc:creator><![CDATA[Tushar Sharma]]></dc:creator>
		<pubDate>Sat, 10 Nov 2012 11:09:33 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Tutorials]]></category>
		<category><![CDATA[scripting]]></category>
		<guid isPermaLink="false">http://www.automationdojos.com/?p=275</guid>

					<description><![CDATA[<p><a href="https://www.automationdojos.com/vbs-tutorial-part-1/">VBS Part 1 &#8211; Introduction and Background</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p><img width="275" height="165" src="https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBS-Tutorials-1-275x165.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBS-Tutorials-1-275x165.png 275w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBS-Tutorials-1-300x180.png 300w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBS-Tutorials-1-150x90.png 150w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBS-Tutorials-1-200x120.png 200w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBS-Tutorials-1-400x240.png 400w, https://www.automationdojos.com/wp-content/uploads/2020/04/post_VBS-Tutorials-1.png 575w" sizes="auto, (max-width: 275px) 100vw, 275px" /></p>
<p>At the upfront, this theoretical article might look boring to most of us but still, it is advisable to know about our scripting friend before we start interacting and dealing with it. This is to provide a brief background of VBS, its purpose, origin etc., and if we don&#8217;t let go our patience it does [&#8230;]</p>
<p>The post <a href="https://www.automationdojos.com/vbs-tutorial-part-1/">VBS Part 1 &#8211; Introduction and Background</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.automationdojos.com/vbs-tutorial-part-1/">VBS Part 1 &#8211; Introduction and Background</a> | As Published On <a href="https://www.automationdojos.com">Automation Dojos</a></p>
<p style="text-align: justify;">At the upfront, this theoretical article might look boring to most of us but still, it is advisable to know about our scripting friend before we start interacting and dealing with it. This is to provide a brief background of VBS, its purpose, origin etc., and if we don&#8217;t let go our patience it does turn out to be interesting! In this article, we would briefly discuss about &#8211; <span class="su-label su-label-type-default"> &#8216;Windows Script&#8217;, &#8216;Microsoft Visual Basic Family&#8217;, &#8216;VBScript&#8217; </span> background, history and versions.</p>
<p style="text-align: justify;">To start with, the commonly referred to as <a href="http://en.wikipedia.org/wiki/VB_Script" target="_blank" rel="noopener noreferrer">&#8216;VB Script&#8217;</a> was developed by <b>Microsoft</b> and hence officially known as&nbsp;the &#8216;<a href="http://en.wikipedia.org/wiki/VB_Script" target="_blank" rel="noopener noreferrer">Microsoft&#8217;s Visual Basic Scripting Edition</a>&#8216;. It is one of the important members of the &#8216;Windows Script Technology&#8217; which consists of a total of two members.</p>
<h3>Windows Script Technology</h3>
<p style="text-align: justify;">The &#8216;<a href="http://msdn.microsoft.com/en-us/library/d1et7k7c%28VS.85%29.aspx" target="_blank" rel="noopener noreferrer">Windows Script</a>&#8216; is the technology which is the backbone&nbsp;of scripting on Windows platform. It has been manifested as two <i>&#8216;Script Engines&#8217;</i>. Although it is not recommended because of the resulting complexity but these two scripting languages can be included in parallel within a single project and&nbsp;should work perfectly fine!</p>
<p><div class="su-box su-box-style-default" id="" style="border-color:#bfbfbf;border-radius:3px;"><div class="su-box-title" style="background-color:#f2f2f2;color:#6b6b6b;border-top-left-radius:1px;border-top-right-radius:1px">Windows Script Engines</div><div class="su-box-content su-u-clearfix su-u-trim" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px"></p>
<div style="padding:3px 1px; margin: 5px 0px">
<ol style="text-align: justify;">
<li>Visual Basic Scripting Edition (VBScript)</li>
<li style="text-align: justify;">Microsoft JScript</li>
</ol>
</div>
<p></div></div></p>
<p style="text-align: justify;">Under this <b><i>&#8216;Windows Script</i>&#8216;</b> banner, Microsoft provides an array of supporting features and technologies which includes tools like &#8211; debuggers, script encoders besides the COM libraries and object models like &#8211; <span class="su-label su-label-type-default">Runtime Library</span> (scrrun.dll), WSH, WMI,&nbsp;ADSI, DOM&nbsp;and many more.</p>
<p><img loading="lazy" decoding="async" src="https://www.automationdojos.com/wp-content/uploads/2021/09/4696225_orig.jpg" alt="" width="657" height="350" class="aligncenter size-full wp-image-20039" srcset="https://www.automationdojos.com/wp-content/uploads/2021/09/4696225_orig.jpg 657w, https://www.automationdojos.com/wp-content/uploads/2021/09/4696225_orig-300x160.jpg 300w, https://www.automationdojos.com/wp-content/uploads/2021/09/4696225_orig-150x80.jpg 150w, https://www.automationdojos.com/wp-content/uploads/2021/09/4696225_orig-200x107.jpg 200w, https://www.automationdojos.com/wp-content/uploads/2021/09/4696225_orig-400x213.jpg 400w" sizes="auto, (max-width: 657px) 100vw, 657px" /></p>
<p style="text-align: justify;">We will discuss more about &#8216;VBScript&#8217; in this article as well as in subsequent posts, but for <b>&#8216;JScript&#8217;</b> we will put an end by saying that it is&nbsp; Microsoft&#8217;s&nbsp;implementation of <b>&#8216;ECMA Scripting Standards and Specification</b>&#8216;. For reference the <b>Netscape&#8217;s</b> <b>&#8216;JavaScript&#8217;</b> as well is an implementation of the&nbsp;same ECMA specification and hence there is a common misconception that both JScript and JavaScript are same but officially it might be wrong to say that.</p>
<h3 style="text-align: justify;">The Microsoft VB Family</h3>
<p style="text-align: justify;">The &#8216;VBScript&#8217; belongs to the Microsoft VB family,&nbsp;more precisely it is a subset of the &#8216;<a href="http://en.wikipedia.org/wiki/Visual_Basic" target="_blank" rel="noopener noreferrer">Microsoft&#8217;s Visual Basic Language</a>&#8216;,&nbsp;this is quite obvious when we look at the similarties in the syntax of the both. The VB family comprises of three members &#8211;</p>
<p><div class="su-box su-box-style-default" id="" style="border-color:#bfbfbf;border-radius:3px;"><div class="su-box-title" style="background-color:#f2f2f2;color:#6b6b6b;border-top-left-radius:1px;border-top-right-radius:1px">VB Family Members</div><div class="su-box-content su-u-clearfix su-u-trim" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px"></p>
<div style="padding:3px 1px; margin: 5px 0px">
<ol style="text-align: justify;">
<li>Visual Basic Language</li>
<li>Visual Basic for Applications (VBA) and</li>
<li>Visual Basic Scripting Edition (VBScript)</li>
</ol>
</div>
<p></div></div></p>
<p style="text-align: justify;">Unlike the rest of the two members, the <span class="su-label su-label-type-default">VBScript is typically a &#8216;<i>scripting language</i>&#8216;</span> hence it inherits all the features and constraints of a &#8216;scripting language&#8217;. Since the VB and VBA are not in-scope of this article hence rather than &#8216;muddying the water&#8217;, we would restrict ourselves to VBScript.&nbsp; As with any scripting language VBScript is &#8211;</p>
<p><div class="su-box su-box-style-default" id="" style="border-color:#bfbfbf;border-radius:3px;"><div class="su-box-title" style="background-color:#f2f2f2;color:#6b6b6b;border-top-left-radius:1px;border-top-right-radius:1px">Windows Script Engines</div><div class="su-box-content su-u-clearfix su-u-trim" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px"></p>
<div style="padding:3px 1px; margin: 5px 0px">
<ol style="text-align: justify;">
<li>&#8216;<b><i>Interpreted</i></b> at Runtime&#8217;</li>
<li>Requires a <b>&#8216;<i>Host</i>&#8216;</b> to run on windows and</li>
<li>Does <b>not</b> support <b>&#8216;<i>Early Binding</i>&#8216;</b></li>
</ol>
</div>
<p></div></div></p>
<p style="text-align: justify;">Besides the above, it is a <span class="su-label su-label-type-default">&#8216;<i>Loosely Typed Language</i>&#8216;</span> which means it&nbsp;uses a &#8216;<i>universal data</i>&#8216; type (variant) and does not constraints the programmer to specify data types for variables while scripting. You can find more details and explanation on the above in related sections.</p>
<div class="rt-block">
<h3 style="text-align: justify;">History and Background</h3>
<p style="text-align: justify;">Historically, VBScript was probably first released (version 1.0) and shipped with Internet Explorer (MSIE 3.0) in 1996. It was intended to be used by&nbsp;web-developers to enhance their <span class="su-label su-label-type-default"><i>&#8216;client-side scripting&#8217;</i></span> capabilities.</p>
<p style="text-align: justify;">Nearly&nbsp;a year after, VBScript (version 2.0) was released with some added <span class="su-label su-label-type-default">&#8216;<i>server-side scripting&#8217;</i></span> capabilities for <i>Internet Information Server</i> (IIS) which was quite well leveraged with <i>ASP</i>. It was since then, that VBScript quickly claimed its right place. With this success, VBScript (version 3.0) was quickly&nbsp;introduced in Outlook 98 and for the first time appeared with &#8216;<i>Windows Script Host</i>&#8216; (WSH 1.0).</p>
<p><div class="su-note"  style="border-color:#dcdcdc;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#f6f6f6;border-color:#ffffff;color:#747474;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"></p>
<p style="text-align: justify;">Together with &nbsp;&#8216;<a href="http://msdn.microsoft.com/en-us/library/d1et7k7c%28VS.85%29.aspx" target="_blank" rel="noopener noreferrer">Windows Script Host</a>&#8216; <b>(WSH)</b> which supported any &#8216;<i>ActiveX Scripting</i>&#8216; languages, VBScript&nbsp;proved a &nbsp;boon to system administrators by providing the capability to manage and control system resources via VBScripts and other &#8216;<i>ActiveX scripting</i>&#8216; languages.</p>
<p></div></div></p>
<p><div class="su-note"  style="border-color:#dcdcdc;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#f6f6f6;border-color:#ffffff;color:#747474;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"></p>
<p style="text-align: justify;">Besides all this, VBScript still lacked any native &#8216;<i>Object Model</i>&#8216; and hence&nbsp;soon after, it&nbsp;was&nbsp;supplemented with a &#8216;<i>Runtime Library</i>&#8216; providing some &#8216;<i>Object Model</i>&#8216;. This &#8216;<a href="http://msdn.microsoft.com/en-us/library/bstcxhf7%28VS.85%29.aspx" target="_blank" rel="noopener noreferrer">Script Runtime Library</a>&#8216; was implemented as &#8216;<b>scrrun.dll</b>&#8216; which primarily introduced &#8216;<i>Dictionary</i>&#8216; and &#8216;<i>Filesystem</i> (FSO) object models&#8217;.</p>
<p></div></div></p>
<p style="text-align: justify;">During the early launch days of VBScript, it had to face a tough competition with another scripting language that preceded it &#8211; &#8216;<i><a href="http://en.wikipedia.org/wiki/JavaScript" target="_blank" rel="noopener noreferrer">JavaScript&#8217;</a></i>. Moreover unlike VBScript the &#8216;<i><a href="http://en.wikipedia.org/wiki/Netscape" target="_blank" rel="noopener noreferrer">Netscape&#8217;s</a></i>&#8216; support for &#8216;<i>JavaScript</i>&#8216; did boost&nbsp;the acceptance of &#8216;<i>JavaScript</i>&#8216; in the market rather then VBScript. But due to Microsoft&#8217;s committment towards VBScript and subsequent inclusion of VBScript in number of Microsoft products like &#8211; <i>IIS, Internet Explorer, Outlook</i> and <i>WSH</i> made VBScript to survive the competition till date.</p>
</div>
<h3 style="text-align: justify;">Latest and Significant Versions</h3>
<p style="text-align: justify;">Over the years because of Microsoft&#8217;s commitment to VBScript, there have been considerable releases of VBScript each of them adding more or less to it&#8217;s feature set. You can find detailed information about VBscript versions on this <a href="http://msdn.microsoft.com/en-us/library/4y5y7bh5%28VS.85%29.aspx" target="_blank" rel="noopener noreferrer">page on MSDN</a>.</p>
<p><div class="su-note"  style="border-color:#dcdcdc;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#f6f6f6;border-color:#ffffff;color:#747474;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"></p>
<p style="text-align: justify;">The <b>latest version</b> of VBScript available at the time of this article (Sept 2009)&nbsp;is VBScript <b>version 5.8</b> available with Internet Explorer v8. However if you ask me the most&nbsp;<b>significant release</b> still remains the VBScript <b>version 5.0</b>. Since it was this&nbsp;VBScript version 5.0 in which Microsoft introduced the &#8211; &#8216;<i>Class Objects&#8217;, &#8216;Class Statement&#8217;, &#8216;Property Let, Get and Set&#8217;, &#8216;Regular Expressions&#8217;, &#8216;Events&#8217;, Timer</i>&#8216;, etc.</p>
<p></div></div></p>
<div class="rt-block">
<h3 style="text-align: justify;">Applied VBScript (The Playground)</h3>
<p style="text-align: justify;">As described above VBScript was meant to be <b><i>&#8216;</i>client-side scripting</b>&#8216; language which holds true to the good extent till date besides its capabilities and usage in&nbsp;<i>&#8216;<b>server-side scripting</b>&#8216;</i> in conjunction with HTML, ASP or others. The &#8216;.HTC&#8217; files being the most basic example of webpage and VBScript collaboration.</p>
<p style="text-align: justify;">Apart from this web arena,&nbsp;VBScript is&nbsp;predominantly popular in <b>&#8216;system administration</b>&#8216; domain&nbsp;and of course proves as a&nbsp;good aid in related <b>&#8216;system side development&#8217;</b> wherein it fits very well along with <b><i>WSH, WMI, ADSI, ADO</i></b><i>&nbsp;</i>etc.</p>
<p style="text-align: justify;">Moreover,&nbsp;to add to its importance and usage &#8211; The latest&nbsp;playground is of course <b>HP&#8217;s &#8216;Quick Test Pro</b>&#8216; which has considerably raised the popularity of VBScript among the &#8216;Software Testing Community&#8217;.</p>
</div>
<div class='the_champ_sharing_container the_champ_vertical_sharing the_champ_hide_sharing the_champ_bottom_sharing' style='width:42px;left: -10px;top: 222px;-webkit-box-shadow:none;box-shadow:none;' data-super-socializer-href="https://www.automationdojos.com/tag/programming/feed/"><div class="the_champ_sharing_ul"><a aria-label="Facebook" class="the_champ_facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D275" title="Facebook" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#0765FE;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path fill="#484848" d="M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z"></path></svg></span></a><a aria-label="Twitter" class="the_champ_button_twitter" href="https://twitter.com/intent/tweet?via=@testoxide&text=Programming&url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D275" title="Twitter" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_twitter" style="background-color:#55acee;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-4 -4 39 39"><path d="M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z" fill="#484848"></path></svg></span></a><a aria-label="Linkedin" class="the_champ_button_linkedin" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D275" title="Linkedin" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_linkedin" style="background-color:#0077b5;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32"><path d="M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z" fill="#484848"></path></svg></span></a><a aria-label="Pinterest" class="the_champ_button_pinterest" href="https://www.automationdojos.com/tag/programming/feed/" onclick="event.preventDefault();javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="noopener" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_pinterest" style="background-color:#cc2329;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-2 -2 35 35"><path fill="#484848" d="M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z"/></svg></span></a><a aria-label="Reddit" class="the_champ_button_reddit" href="https://reddit.com/submit?url=https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D275&title=Programming" title="Reddit" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg the_champ_s__default the_champ_s_reddit" style="background-color:#ff5700;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-3.5 -3.5 39 39"><path d="M28.543 15.774a2.953 2.953 0 0 0-2.951-2.949 2.882 2.882 0 0 0-1.9.713 14.075 14.075 0 0 0-6.85-2.044l1.38-4.349 3.768.884a2.452 2.452 0 1 0 .24-1.176l-4.274-1a.6.6 0 0 0-.709.4l-1.659 5.224a14.314 14.314 0 0 0-7.316 2.029 2.908 2.908 0 0 0-1.872-.681 2.942 2.942 0 0 0-1.618 5.4 5.109 5.109 0 0 0-.062.765c0 4.158 5.037 7.541 11.229 7.541s11.22-3.383 11.22-7.541a5.2 5.2 0 0 0-.053-.706 2.963 2.963 0 0 0 1.427-2.51zm-18.008 1.88a1.753 1.753 0 0 1 1.73-1.74 1.73 1.73 0 0 1 1.709 1.74 1.709 1.709 0 0 1-1.709 1.711 1.733 1.733 0 0 1-1.73-1.711zm9.565 4.968a5.573 5.573 0 0 1-4.081 1.272h-.032a5.576 5.576 0 0 1-4.087-1.272.6.6 0 0 1 .844-.854 4.5 4.5 0 0 0 3.238.927h.032a4.5 4.5 0 0 0 3.237-.927.6.6 0 1 1 .844.854zm-.331-3.256a1.726 1.726 0 1 1 1.709-1.712 1.717 1.717 0 0 1-1.712 1.712z" fill="#484848"/></svg></span></a><a aria-label="Whatsapp" class="the_champ_whatsapp" href="https://api.whatsapp.com/send?text=Programming https%3A%2F%2Fwww.automationdojos.com%2F%3Fp%3D275" title="Whatsapp" rel="nofollow noopener" target="_blank" style="font-size:24px!important;box-shadow:none;display:inline-block;vertical-align:middle"><span class="the_champ_svg" style="background-color:#55eb4c;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block;opacity:1;float:left;font-size:24px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box"><svg style="display:block;" focusable="false" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="-6 -5 40 40"><path class="the_champ_svg_stroke the_champ_no_fill" stroke="#484848" stroke-width="2" fill="none" d="M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046"></path><path d="M 7 19 l -1 6 l 6 -1" class="the_champ_no_fill the_champ_svg_stroke" stroke="#484848" stroke-width="2" fill="none"></path><path d="M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4" fill="#484848"></path></svg></span></a><a class="the_champ_more" title="More" rel="nofollow noopener" style="font-size:24px!important;border:0;box-shadow:none;display:inline-block!important;font-size:16px;padding:0 4px;vertical-align: middle;display:inline;" href="https://www.automationdojos.com/?p=275" onclick="event.preventDefault()"><span class="the_champ_svg" style="background-color:#ee8e2d;width:38px;height:38px;border-radius:3px;margin:0;display:inline-block!important;opacity:1;float:left;font-size:32px!important;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;display:inline;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box;" onclick="theChampMoreSharingPopup(this, 'https://www.automationdojos.com/?p=275', 'Programming', '' )"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-.3 0 32 32" version="1.1" width="100%" height="100%" style="display:block;" xml:space="preserve"><g><path fill="#484848" d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div><p>The post <a href="https://www.automationdojos.com/vbs-tutorial-part-1/">VBS Part 1 &#8211; Introduction and Background</a> appeared first on <a href="https://www.automationdojos.com">Automation Dojos</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.automationdojos.com/vbs-tutorial-part-1/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
