<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.autoitscript.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Storme</id>
	<title>AutoIt Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.autoitscript.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Storme"/>
	<link rel="alternate" type="text/html" href="https://www.autoitscript.com/wiki/Special:Contributions/Storme"/>
	<updated>2026-05-14T14:35:05Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoIt_Snippets&amp;diff=11507</id>
		<title>AutoIt Snippets</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoIt_Snippets&amp;diff=11507"/>
		<updated>2013-01-04T07:47:34Z</updated>

		<summary type="html">&lt;p&gt;Storme: /* GUI - Anything GUI related. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome To The AutoIt Snippets Page - ( &#039;&#039;&#039;&#039;&#039;Snippet - A short reusable piece of computer code&#039;&#039;&#039;&#039;&#039; ).  &lt;br /&gt;
&lt;br /&gt;
Snippets are generally single functions or small pieces of code which can be incorporated into a script to add extra functionality. This section covers a wide variety of subjects and uses. Examples may include anything from finding if an internet connection is working to retrieving the date Windows was installed. This page is intended to give easy access to the functions.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
[[category:Snippets]]&lt;br /&gt;
&lt;br /&gt;
{{Snippet Credit Header}}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== _IsInternetConnected ===&lt;br /&gt;
&lt;br /&gt;
{{Snippet Header&lt;br /&gt;
| AuthorURL=35302-guinness&lt;br /&gt;
| AuthorName=guinness&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
ConsoleWrite(&amp;quot;Internet Is Connected&amp;quot; &amp;amp; &amp;quot; = &amp;quot; &amp;amp; _IsInternetConnected() &amp;amp; @CRLF) ; ( Returns &amp;quot;True&amp;quot; Or &amp;quot;False&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
Func _IsInternetConnected()&lt;br /&gt;
    Local $aReturn = DllCall(&#039;connect.dll&#039;, &#039;long&#039;, &#039;IsInternetConnected&#039;)&lt;br /&gt;
    If @error Then&lt;br /&gt;
        Return SetError(1, 0, False)&lt;br /&gt;
    EndIf&lt;br /&gt;
    Return $aReturn[0] = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;_IsInternetConnected&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[#top | ReturnToContents]]&lt;br /&gt;
&lt;br /&gt;
=== _PasswordCrypt ===&lt;br /&gt;
&lt;br /&gt;
{{Snippet Header&lt;br /&gt;
| AuthorURL=4920-valuater&lt;br /&gt;
| AuthorName=Valuater&lt;br /&gt;
| ModifierURL=35302-guinness&lt;br /&gt;
| ModifierName=guinness&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;Crypt.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Local $sGenericPassword_1 = &#039;Password@AutoIt&#039;, $sGenericPassword_2 = &#039;NewPassword@AutoIt&#039;, $sSavePath = @ScriptDir &amp;amp; &#039;\License.dat&#039;&lt;br /&gt;
ConsoleWrite(&#039;1. &#039; &amp;amp; _PasswordCrypt($sGenericPassword_1, $sSavePath) &amp;amp; @CRLF) ; Write the password to a file located in the @ScriptDir. The password we wrote is returned by the function.&lt;br /&gt;
ConsoleWrite(&#039;2. &#039; &amp;amp; _PasswordCrypt($sGenericPassword_1, $sSavePath) &amp;amp; @CRLF) ; Since the password has been written already, we now want to check if the user has entered the password correctly. Returns True or False.&lt;br /&gt;
ConsoleWrite(&#039;3. &#039; &amp;amp; _PasswordCrypt($sGenericPassword_2, $sSavePath, 1) &amp;amp; @CRLF) ; Overwrite the old password with a new one.&lt;br /&gt;
ConsoleWrite(&#039;4. &#039; &amp;amp; _PasswordCrypt($sGenericPassword_1, $sSavePath) &amp;amp; @CRLF) ; Check the password matches. This will fail as we&#039;re checking the old password against the new one.&lt;br /&gt;
FileDelete($sSavePath)&lt;br /&gt;
&lt;br /&gt;
Func _PasswordCrypt($sPassword, $sFilePath, $iOverwrite = 0) ; By guinness, idea by Valuater.&lt;br /&gt;
    If FileExists($sFilePath) And $iOverwrite = 0 Then&lt;br /&gt;
        Return BinaryToString(_Crypt_DecryptData(IniRead($sFilePath, &#039;PasswordKey&#039;, &#039;Password&#039;, &#039;&#039;), @ComputerName, $CALG_AES_256)) == $sPassword&lt;br /&gt;
    Else&lt;br /&gt;
        If IniWrite($sFilePath, &#039;PasswordKey&#039;, &#039;Password&#039;, _Crypt_EncryptData($sPassword, @ComputerName, $CALG_AES_256)) Then&lt;br /&gt;
            Return $sPassword&lt;br /&gt;
        EndIf&lt;br /&gt;
    EndIf&lt;br /&gt;
    Return SetError(1, 0, &#039;&#039;)&lt;br /&gt;
EndFunc   ;==&amp;gt;_PasswordCrypt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[#top | ReturnToContents]]&lt;br /&gt;
&lt;br /&gt;
== Snippet Creation Help ==&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Creation )| Snippets Creation Examples ]]&lt;br /&gt;
&lt;br /&gt;
== AutoIt Snippets Collection ==&lt;br /&gt;
&lt;br /&gt;
=== AutoIt &amp;lt;small&amp;gt;- AutoIt Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( AutoIt Audio )| Audio Related ]] ( Last Updated - 16:58, 21 May 2012 (BST) )&lt;br /&gt;
* [[Snippets ( AutoIt )| AutoIt Miscellaneous ]] ( Last Updated - 12:22, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( AutoIt Array )| AutoIt Array Related]] ( Last Updated - 13:17, 21 May 2012 (BST) )&lt;br /&gt;
* [[Snippets ( AutoIt Mouse &amp;amp; Keyboard )| AutoIt Mouse &amp;amp; Keyboard ]] ( Last Updated - 07:52, 3 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( AutoIt String )| AutoIt String Related ]] ( Last Updated - 12:45, 1 August 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== GUI &amp;lt;small&amp;gt;- Anything GUI related.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Checkboxes )| Checkboxes &amp;amp; Radio ]] ( Last Updated - 21:04, 13 November 2012 (BST) )&lt;br /&gt;
* [[Snippets ( GUI )| GUI ]]  ( Last Updated - 12:11, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Graphics )| Graphics And Images ]] ( Last Updated - 12:37, 1 August 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== Hardware &amp;lt;small&amp;gt;- Hardware Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Hardware Information )| Hardware Information ]] ( Last Updated - 11:02, 30 April 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== Numbers &amp;lt;small&amp;gt;- Math, Number &amp;amp; Time Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Math &amp;amp; Numbers )| Math &amp;amp; Numbers ]] ( Last Updated - 12:07, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Time &amp;amp; Date )| Time &amp;amp; Date ]] ( Last Updated - 14:11, 21 May 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous &amp;lt;small&amp;gt;- All Other Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Miscellaneous )| Miscellaneous ]] ( Last Updated - 12:35, 1 August 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== Networking &amp;lt;small&amp;gt;- Network, Wireless and Internet Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Network )| Network ]] ( Last Updated - 12:33, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Internet )|Internet ]] ( Last Updated - 12:30, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Wireless )|Wireless ]] ( Last Updated - 19:19, 16 November 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== Windows &amp;lt;small&amp;gt;- Windows Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( CMD ) |CMD - Commandline ]] (Last Updated - 19:24, 16 November 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Files &amp;amp; Folders )| Files &amp;amp; Folders ]] ( Last Updated - 12:16, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Registry )| Registry ]] ( Last Updated - 17:26, 18 November 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Windows Information )| Windows Information ]] ( Last Updated - 11:27, 30 April 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Windows OS )| Windows OS ]] ( Last Updated - 14:35, 21 May 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Windows Settings )| Windows Settings ]] ( Last Updated - 12:07, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Windows Users )| Windows Account Management ]] ( Last Updated - 14:13, 21 May 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
== Other Links ==&lt;br /&gt;
&lt;br /&gt;
[http://www.autoitscript.com/wiki/Free_Software Free Software Written in AutoIt]&lt;/div&gt;</summary>
		<author><name>Storme</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoIt_Snippets&amp;diff=11506</id>
		<title>AutoIt Snippets</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoIt_Snippets&amp;diff=11506"/>
		<updated>2013-01-04T07:46:12Z</updated>

		<summary type="html">&lt;p&gt;Storme: /* Windows - Windows Examples. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome To The AutoIt Snippets Page - ( &#039;&#039;&#039;&#039;&#039;Snippet - A short reusable piece of computer code&#039;&#039;&#039;&#039;&#039; ).  &lt;br /&gt;
&lt;br /&gt;
Snippets are generally single functions or small pieces of code which can be incorporated into a script to add extra functionality. This section covers a wide variety of subjects and uses. Examples may include anything from finding if an internet connection is working to retrieving the date Windows was installed. This page is intended to give easy access to the functions.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
[[category:Snippets]]&lt;br /&gt;
&lt;br /&gt;
{{Snippet Credit Header}}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== _IsInternetConnected ===&lt;br /&gt;
&lt;br /&gt;
{{Snippet Header&lt;br /&gt;
| AuthorURL=35302-guinness&lt;br /&gt;
| AuthorName=guinness&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
ConsoleWrite(&amp;quot;Internet Is Connected&amp;quot; &amp;amp; &amp;quot; = &amp;quot; &amp;amp; _IsInternetConnected() &amp;amp; @CRLF) ; ( Returns &amp;quot;True&amp;quot; Or &amp;quot;False&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
Func _IsInternetConnected()&lt;br /&gt;
    Local $aReturn = DllCall(&#039;connect.dll&#039;, &#039;long&#039;, &#039;IsInternetConnected&#039;)&lt;br /&gt;
    If @error Then&lt;br /&gt;
        Return SetError(1, 0, False)&lt;br /&gt;
    EndIf&lt;br /&gt;
    Return $aReturn[0] = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;_IsInternetConnected&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[#top | ReturnToContents]]&lt;br /&gt;
&lt;br /&gt;
=== _PasswordCrypt ===&lt;br /&gt;
&lt;br /&gt;
{{Snippet Header&lt;br /&gt;
| AuthorURL=4920-valuater&lt;br /&gt;
| AuthorName=Valuater&lt;br /&gt;
| ModifierURL=35302-guinness&lt;br /&gt;
| ModifierName=guinness&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;Crypt.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Local $sGenericPassword_1 = &#039;Password@AutoIt&#039;, $sGenericPassword_2 = &#039;NewPassword@AutoIt&#039;, $sSavePath = @ScriptDir &amp;amp; &#039;\License.dat&#039;&lt;br /&gt;
ConsoleWrite(&#039;1. &#039; &amp;amp; _PasswordCrypt($sGenericPassword_1, $sSavePath) &amp;amp; @CRLF) ; Write the password to a file located in the @ScriptDir. The password we wrote is returned by the function.&lt;br /&gt;
ConsoleWrite(&#039;2. &#039; &amp;amp; _PasswordCrypt($sGenericPassword_1, $sSavePath) &amp;amp; @CRLF) ; Since the password has been written already, we now want to check if the user has entered the password correctly. Returns True or False.&lt;br /&gt;
ConsoleWrite(&#039;3. &#039; &amp;amp; _PasswordCrypt($sGenericPassword_2, $sSavePath, 1) &amp;amp; @CRLF) ; Overwrite the old password with a new one.&lt;br /&gt;
ConsoleWrite(&#039;4. &#039; &amp;amp; _PasswordCrypt($sGenericPassword_1, $sSavePath) &amp;amp; @CRLF) ; Check the password matches. This will fail as we&#039;re checking the old password against the new one.&lt;br /&gt;
FileDelete($sSavePath)&lt;br /&gt;
&lt;br /&gt;
Func _PasswordCrypt($sPassword, $sFilePath, $iOverwrite = 0) ; By guinness, idea by Valuater.&lt;br /&gt;
    If FileExists($sFilePath) And $iOverwrite = 0 Then&lt;br /&gt;
        Return BinaryToString(_Crypt_DecryptData(IniRead($sFilePath, &#039;PasswordKey&#039;, &#039;Password&#039;, &#039;&#039;), @ComputerName, $CALG_AES_256)) == $sPassword&lt;br /&gt;
    Else&lt;br /&gt;
        If IniWrite($sFilePath, &#039;PasswordKey&#039;, &#039;Password&#039;, _Crypt_EncryptData($sPassword, @ComputerName, $CALG_AES_256)) Then&lt;br /&gt;
            Return $sPassword&lt;br /&gt;
        EndIf&lt;br /&gt;
    EndIf&lt;br /&gt;
    Return SetError(1, 0, &#039;&#039;)&lt;br /&gt;
EndFunc   ;==&amp;gt;_PasswordCrypt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[#top | ReturnToContents]]&lt;br /&gt;
&lt;br /&gt;
== Snippet Creation Help ==&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Creation )| Snippets Creation Examples ]]&lt;br /&gt;
&lt;br /&gt;
== AutoIt Snippets Collection ==&lt;br /&gt;
&lt;br /&gt;
=== AutoIt &amp;lt;small&amp;gt;- AutoIt Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( AutoIt Audio )| Audio Related ]] ( Last Updated - 16:58, 21 May 2012 (BST) )&lt;br /&gt;
* [[Snippets ( AutoIt )| AutoIt Miscellaneous ]] ( Last Updated - 12:22, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( AutoIt Array )| AutoIt Array Related]] ( Last Updated - 13:17, 21 May 2012 (BST) )&lt;br /&gt;
* [[Snippets ( AutoIt Mouse &amp;amp; Keyboard )| AutoIt Mouse &amp;amp; Keyboard ]] ( Last Updated - 07:52, 3 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( AutoIt String )| AutoIt String Related ]] ( Last Updated - 12:45, 1 August 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== GUI &amp;lt;small&amp;gt;- Anything GUI related.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Checkboxes )| Checkboxes &amp;amp; Radio ]]&lt;br /&gt;
* [[Snippets ( GUI )| GUI ]]  ( Last Updated - 12:11, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Graphics )| Graphics And Images ]] ( Last Updated - 12:37, 1 August 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== Hardware &amp;lt;small&amp;gt;- Hardware Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Hardware Information )| Hardware Information ]] ( Last Updated - 11:02, 30 April 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== Numbers &amp;lt;small&amp;gt;- Math, Number &amp;amp; Time Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Math &amp;amp; Numbers )| Math &amp;amp; Numbers ]] ( Last Updated - 12:07, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Time &amp;amp; Date )| Time &amp;amp; Date ]] ( Last Updated - 14:11, 21 May 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous &amp;lt;small&amp;gt;- All Other Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Miscellaneous )| Miscellaneous ]] ( Last Updated - 12:35, 1 August 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== Networking &amp;lt;small&amp;gt;- Network, Wireless and Internet Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Network )| Network ]] ( Last Updated - 12:33, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Internet )|Internet ]] ( Last Updated - 12:30, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Wireless )|Wireless ]] ( Last Updated - 19:19, 16 November 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== Windows &amp;lt;small&amp;gt;- Windows Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( CMD ) |CMD - Commandline ]] (Last Updated - 19:24, 16 November 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Files &amp;amp; Folders )| Files &amp;amp; Folders ]] ( Last Updated - 12:16, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Registry )| Registry ]] ( Last Updated - 17:26, 18 November 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Windows Information )| Windows Information ]] ( Last Updated - 11:27, 30 April 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Windows OS )| Windows OS ]] ( Last Updated - 14:35, 21 May 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Windows Settings )| Windows Settings ]] ( Last Updated - 12:07, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Windows Users )| Windows Account Management ]] ( Last Updated - 14:13, 21 May 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
== Other Links ==&lt;br /&gt;
&lt;br /&gt;
[http://www.autoitscript.com/wiki/Free_Software Free Software Written in AutoIt]&lt;/div&gt;</summary>
		<author><name>Storme</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoIt_Snippets&amp;diff=11505</id>
		<title>AutoIt Snippets</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoIt_Snippets&amp;diff=11505"/>
		<updated>2013-01-04T07:42:58Z</updated>

		<summary type="html">&lt;p&gt;Storme: /* Networking - Network, Wireless and Internet Examples. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome To The AutoIt Snippets Page - ( &#039;&#039;&#039;&#039;&#039;Snippet - A short reusable piece of computer code&#039;&#039;&#039;&#039;&#039; ).  &lt;br /&gt;
&lt;br /&gt;
Snippets are generally single functions or small pieces of code which can be incorporated into a script to add extra functionality. This section covers a wide variety of subjects and uses. Examples may include anything from finding if an internet connection is working to retrieving the date Windows was installed. This page is intended to give easy access to the functions.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
[[category:Snippets]]&lt;br /&gt;
&lt;br /&gt;
{{Snippet Credit Header}}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== _IsInternetConnected ===&lt;br /&gt;
&lt;br /&gt;
{{Snippet Header&lt;br /&gt;
| AuthorURL=35302-guinness&lt;br /&gt;
| AuthorName=guinness&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
ConsoleWrite(&amp;quot;Internet Is Connected&amp;quot; &amp;amp; &amp;quot; = &amp;quot; &amp;amp; _IsInternetConnected() &amp;amp; @CRLF) ; ( Returns &amp;quot;True&amp;quot; Or &amp;quot;False&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
Func _IsInternetConnected()&lt;br /&gt;
    Local $aReturn = DllCall(&#039;connect.dll&#039;, &#039;long&#039;, &#039;IsInternetConnected&#039;)&lt;br /&gt;
    If @error Then&lt;br /&gt;
        Return SetError(1, 0, False)&lt;br /&gt;
    EndIf&lt;br /&gt;
    Return $aReturn[0] = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;_IsInternetConnected&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[#top | ReturnToContents]]&lt;br /&gt;
&lt;br /&gt;
=== _PasswordCrypt ===&lt;br /&gt;
&lt;br /&gt;
{{Snippet Header&lt;br /&gt;
| AuthorURL=4920-valuater&lt;br /&gt;
| AuthorName=Valuater&lt;br /&gt;
| ModifierURL=35302-guinness&lt;br /&gt;
| ModifierName=guinness&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;Crypt.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Local $sGenericPassword_1 = &#039;Password@AutoIt&#039;, $sGenericPassword_2 = &#039;NewPassword@AutoIt&#039;, $sSavePath = @ScriptDir &amp;amp; &#039;\License.dat&#039;&lt;br /&gt;
ConsoleWrite(&#039;1. &#039; &amp;amp; _PasswordCrypt($sGenericPassword_1, $sSavePath) &amp;amp; @CRLF) ; Write the password to a file located in the @ScriptDir. The password we wrote is returned by the function.&lt;br /&gt;
ConsoleWrite(&#039;2. &#039; &amp;amp; _PasswordCrypt($sGenericPassword_1, $sSavePath) &amp;amp; @CRLF) ; Since the password has been written already, we now want to check if the user has entered the password correctly. Returns True or False.&lt;br /&gt;
ConsoleWrite(&#039;3. &#039; &amp;amp; _PasswordCrypt($sGenericPassword_2, $sSavePath, 1) &amp;amp; @CRLF) ; Overwrite the old password with a new one.&lt;br /&gt;
ConsoleWrite(&#039;4. &#039; &amp;amp; _PasswordCrypt($sGenericPassword_1, $sSavePath) &amp;amp; @CRLF) ; Check the password matches. This will fail as we&#039;re checking the old password against the new one.&lt;br /&gt;
FileDelete($sSavePath)&lt;br /&gt;
&lt;br /&gt;
Func _PasswordCrypt($sPassword, $sFilePath, $iOverwrite = 0) ; By guinness, idea by Valuater.&lt;br /&gt;
    If FileExists($sFilePath) And $iOverwrite = 0 Then&lt;br /&gt;
        Return BinaryToString(_Crypt_DecryptData(IniRead($sFilePath, &#039;PasswordKey&#039;, &#039;Password&#039;, &#039;&#039;), @ComputerName, $CALG_AES_256)) == $sPassword&lt;br /&gt;
    Else&lt;br /&gt;
        If IniWrite($sFilePath, &#039;PasswordKey&#039;, &#039;Password&#039;, _Crypt_EncryptData($sPassword, @ComputerName, $CALG_AES_256)) Then&lt;br /&gt;
            Return $sPassword&lt;br /&gt;
        EndIf&lt;br /&gt;
    EndIf&lt;br /&gt;
    Return SetError(1, 0, &#039;&#039;)&lt;br /&gt;
EndFunc   ;==&amp;gt;_PasswordCrypt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[#top | ReturnToContents]]&lt;br /&gt;
&lt;br /&gt;
== Snippet Creation Help ==&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Creation )| Snippets Creation Examples ]]&lt;br /&gt;
&lt;br /&gt;
== AutoIt Snippets Collection ==&lt;br /&gt;
&lt;br /&gt;
=== AutoIt &amp;lt;small&amp;gt;- AutoIt Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( AutoIt Audio )| Audio Related ]] ( Last Updated - 16:58, 21 May 2012 (BST) )&lt;br /&gt;
* [[Snippets ( AutoIt )| AutoIt Miscellaneous ]] ( Last Updated - 12:22, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( AutoIt Array )| AutoIt Array Related]] ( Last Updated - 13:17, 21 May 2012 (BST) )&lt;br /&gt;
* [[Snippets ( AutoIt Mouse &amp;amp; Keyboard )| AutoIt Mouse &amp;amp; Keyboard ]] ( Last Updated - 07:52, 3 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( AutoIt String )| AutoIt String Related ]] ( Last Updated - 12:45, 1 August 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== GUI &amp;lt;small&amp;gt;- Anything GUI related.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Checkboxes )| Checkboxes &amp;amp; Radio ]]&lt;br /&gt;
* [[Snippets ( GUI )| GUI ]]  ( Last Updated - 12:11, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Graphics )| Graphics And Images ]] ( Last Updated - 12:37, 1 August 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== Hardware &amp;lt;small&amp;gt;- Hardware Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Hardware Information )| Hardware Information ]] ( Last Updated - 11:02, 30 April 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== Numbers &amp;lt;small&amp;gt;- Math, Number &amp;amp; Time Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Math &amp;amp; Numbers )| Math &amp;amp; Numbers ]] ( Last Updated - 12:07, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Time &amp;amp; Date )| Time &amp;amp; Date ]] ( Last Updated - 14:11, 21 May 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous &amp;lt;small&amp;gt;- All Other Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Miscellaneous )| Miscellaneous ]] ( Last Updated - 12:35, 1 August 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== Networking &amp;lt;small&amp;gt;- Network, Wireless and Internet Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( Network )| Network ]] ( Last Updated - 12:33, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Internet )|Internet ]] ( Last Updated - 12:30, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Wireless )|Wireless ]] ( Last Updated - 19:19, 16 November 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
=== Windows &amp;lt;small&amp;gt;- Windows Examples.&amp;lt;/small&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
* [[Snippets ( CMD ) |CMD - Commandline ]]&lt;br /&gt;
* [[Snippets ( Files &amp;amp; Folders )| Files &amp;amp; Folders ]] ( Last Updated - 12:16, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Registry )| Registry ]]&lt;br /&gt;
* [[Snippets ( Windows Information )| Windows Information ]] ( Last Updated - 11:27, 30 April 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Windows OS )| Windows OS ]] ( Last Updated - 14:35, 21 May 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Windows Settings )| Windows Settings ]] ( Last Updated - 12:07, 1 August 2012 (BST) )&lt;br /&gt;
* [[Snippets ( Windows Users )| Windows Account Management ]] ( Last Updated - 14:13, 21 May 2012 (BST) )&lt;br /&gt;
&lt;br /&gt;
== Other Links ==&lt;br /&gt;
&lt;br /&gt;
[http://www.autoitscript.com/wiki/Free_Software Free Software Written in AutoIt]&lt;/div&gt;</summary>
		<author><name>Storme</name></author>
	</entry>
</feed>