<?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=Jaberwocky6669</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=Jaberwocky6669"/>
	<link rel="alternate" type="text/html" href="https://www.autoitscript.com/wiki/Special:Contributions/Jaberwocky6669"/>
	<updated>2026-05-08T12:17:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=Best_coding_practices&amp;diff=12871</id>
		<title>Best coding practices</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=Best_coding_practices&amp;diff=12871"/>
		<updated>2015-03-07T07:11:35Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: /* Magic Numbers */  Expanded the first example in Magic Numbers to include an example of correct usage.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Outlined in this section is a detailed explanation of what is to be considered the best coding practices within AutoIt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A few notes:&lt;br /&gt;
* You must use the latest version of AutoIt (v3.3.10.0 or above) to run the examples below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Names of Variables ==&lt;br /&gt;
A variant of [http://en.wikipedia.org/wiki/Hungarian_notation Hungarian notation] is used.&amp;lt;br /&amp;gt;&lt;br /&gt;
In AutoIt the Hungarian notation defines the logical data type rather than the physical data type; in this way, it gives a hint as to what the variable&#039;s purpose is, or what it represents. The prefix does not encode the actual data type: this occurs on assignment.&amp;lt;br /&amp;gt;&lt;br /&gt;
See the table below for examples.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! prefix !! covering type !! example&lt;br /&gt;
|-&lt;br /&gt;
| i || Integer || $iInteger = 10&lt;br /&gt;
|-&lt;br /&gt;
| f || Floating point || $fFloat = 0.123&lt;br /&gt;
|-&lt;br /&gt;
| n || General number (no preference) || $nNumber = 123&lt;br /&gt;
|-&lt;br /&gt;
| a || Arrays || Local $aArray[0]&lt;br /&gt;
|-&lt;br /&gt;
| m || Maps || Local $mMap[]&lt;br /&gt;
|-&lt;br /&gt;
| s || Strings (chars included) || $sString = &amp;quot;hello world&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| b || Booleans || $bBool = True&lt;br /&gt;
|-&lt;br /&gt;
| d || Binaries || $dBinary = Binary(&amp;quot;0x80000000&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| id || An AutoIt controlid || $idButton = GUICtrlCreateButton(&amp;quot;OK&amp;quot;, 5, 5)&lt;br /&gt;
|-&lt;br /&gt;
| h || Handles (and GUI handles) || $hGUI = GUICreate(&amp;quot;My GUI&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| fu || Functions || $fuMessage = MsgBox&lt;br /&gt;
|-&lt;br /&gt;
| p || Pointers || $p = 0&lt;br /&gt;
|-&lt;br /&gt;
| tag || Structures definition || $tag = 0&lt;br /&gt;
|-&lt;br /&gt;
| t || Structures || $t = 0&lt;br /&gt;
|-&lt;br /&gt;
| o || Objects || $o = 0 or $o = Null&lt;br /&gt;
|-&lt;br /&gt;
| v || Variant || $v = 0 or $v = &amp;quot;&amp;quot; (or $v = Null)&lt;br /&gt;
|-&lt;br /&gt;
| e || Enumerations || Enum $e1st = 1, $e2nd, $e3rd&lt;br /&gt;
|-&lt;br /&gt;
| k || Keywords || $kKeyword = Default&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The variables are named following this schema:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! type (lower case) !! [optional] subtype (lower case) !! var name (first letter in upper case)&lt;br /&gt;
|-&lt;br /&gt;
| i || f || MyFlag&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
; Assign a Local variable the number 5.&lt;br /&gt;
Local $iSomeVar = 5&lt;br /&gt;
&lt;br /&gt;
; Assign a Local variable the number 1.&lt;br /&gt;
Local $ifMyFlag = 1&lt;br /&gt;
&lt;br /&gt;
; Assign a Local variable an array of numbers.&lt;br /&gt;
Local $aiArray = 0&lt;br /&gt;
&lt;br /&gt;
; Re-declare the array to size and fill it.&lt;br /&gt;
Local $aiArray[3] = [0, 0.25, 3 / 4]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Always initialize a variable on it&#039;s declaration, and declare all the same type of variable on the same line.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
;Bad&lt;br /&gt;
Local $iSomeVar1, $aiArray = 0&lt;br /&gt;
Local $iSomeVar2 = 5&lt;br /&gt;
&lt;br /&gt;
;Good&lt;br /&gt;
Local $iSomeVar1 = 0, $iSomeVar2 = 5&lt;br /&gt;
Local $aiArray = 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can still categorize your variables and declare for example the $iSomeVar2 on another line.&lt;br /&gt;
&lt;br /&gt;
Example2:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Local $vValue ; Bad, this is initially blank.&lt;br /&gt;
Local $vVal = 0 ; Good&lt;br /&gt;
&lt;br /&gt;
MsgBox($MB_SYSTEMMODAL, &#039;&#039;, &#039;$vValue: &#039; &amp;amp; $vValue &amp;amp; @CRLF &amp;amp; &#039;$vVal: &#039; &amp;amp; $vVal)&lt;br /&gt;
&lt;br /&gt;
; In C++ $vValue would display the previous value that was residing in the memory address $vValue points to. AutoIt&lt;br /&gt;
; is a little less forgiving in that it initialises the variable as being blank and doesn&#039;t throw any error, unlike some moder C++ compilers.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scopes of Variables ==&lt;br /&gt;
To make the transition, the variables are also named according to their scope.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Global UDF variable !! Global variable !! Local variable&lt;br /&gt;
|-&lt;br /&gt;
| $g__iSomeVar || $g_iSomeVar || $iSomeVar&lt;br /&gt;
|}&lt;br /&gt;
With this method, you will avoid non wanted re-assignments.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Assign a Global variable the number 0.&lt;br /&gt;
Global $iSomeVar1 = 0&lt;br /&gt;
; Assign a Global variable the number 5.&lt;br /&gt;
Global $_iSomeVar2 = 5&lt;br /&gt;
&lt;br /&gt;
SomeFunc()&lt;br /&gt;
&lt;br /&gt;
Func SomeFunc()&lt;br /&gt;
	; Assign Local variables respectively the numbers 3 and 4.&lt;br /&gt;
	Local $iSomeVar1 = 3, $iSomeVar2 = 4&lt;br /&gt;
&lt;br /&gt;
	; Note: The user inadvertently re-assigned the global variable $iSomeVar1, because this one is not named as &amp;quot;global&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
	; Display the value of $iSomeVar1.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;Value of $iSomeVar1: &amp;quot; &amp;amp; $iSomeVar1)&lt;br /&gt;
&lt;br /&gt;
	; Display the value of $iSomeVar2.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;Value of $iSomeVar2: &amp;quot; &amp;amp; $iSomeVar2)&lt;br /&gt;
&lt;br /&gt;
	; Display the value of $_iSomeVar2.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;Value of $_iSomeVar2: &amp;quot; &amp;amp; $_iSomeVar2)&lt;br /&gt;
EndFunc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A variable declared globally (with the Global keyword) is visible anywhere in the script.&lt;br /&gt;
Always declare your global variables in the global scope, not in the functions. It will prevent another function to use it before its declaration and the declaration is implicit (see [[#jumpsec1|examples]]).&lt;br /&gt;
&lt;br /&gt;
* A variable declared locally (with the Local keyword), has a visibility which depends of the scope where it&#039;s declared.&lt;br /&gt;
:Declaration in the global scope: the variable is nonetheless visible everywhere; declare it as Local if this one is only used in the same scope.&lt;br /&gt;
:Declaration in a function: the variable is visible by the function itself and nowhere else.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Structure of a code scope:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
; Global scope.&lt;br /&gt;
&lt;br /&gt;
; Include the Constants file, it contains various constants; it&#039;s needed here for the $MB_SYSTEMMODAL flag of the MsgBox function).&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; This scope is either Global or Local, depending on where do you use the variables.&lt;br /&gt;
&lt;br /&gt;
; Assign a Global variable the number 0 (which corresponds to an initialization of a variable number), its scope is Global because it&#039;s used at least in one function.&lt;br /&gt;
Global $_iVar1 = 0&lt;br /&gt;
&lt;br /&gt;
; Assign a Local variable the string &amp;quot;foo&amp;quot;, its scope is Local because it&#039;s use is restricted to this scope.&lt;br /&gt;
Local $_sVar2 = &amp;quot;foo&amp;quot;&lt;br /&gt;
&lt;br /&gt;
; Display the content of $_sVar2&lt;br /&gt;
MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;Value of $sVar2: &amp;quot; &amp;amp; $_sVar2)&lt;br /&gt;
&lt;br /&gt;
; Re-assign a Local variable the string returned by the function MyFunc.&lt;br /&gt;
$_sVar2 = MyFunc()&lt;br /&gt;
&lt;br /&gt;
; Re-Display the content of $_sVar2&lt;br /&gt;
MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;Value of $sVar2: &amp;quot; &amp;amp; $_sVar2)&lt;br /&gt;
&lt;br /&gt;
; Declare a function (its main utility is described later in Functions, we can see one here which is to create a Local scope).&lt;br /&gt;
Func MyFunc()&lt;br /&gt;
	; Local scope.&lt;br /&gt;
&lt;br /&gt;
	; Display the content of $_iVar1.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;Value of $_iVar1: &amp;quot; &amp;amp; $_iVar1)&lt;br /&gt;
&lt;br /&gt;
	; Assign a Local variable the string &amp;quot;bar&amp;quot;, its scope is Local because it&#039;s use is restricted to the function&#039;s scope.&lt;br /&gt;
	Local $sVar3 = &amp;quot;bar&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	; Display the content of $sVar3.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;Value of $sVar3: &amp;quot; &amp;amp; $sVar3)&lt;br /&gt;
&lt;br /&gt;
	; Return the $sVar3 content, it will be visible (if used) to the scope where the function is called.&lt;br /&gt;
	Return $sVar3&lt;br /&gt;
EndFunc   ;==&amp;gt;MyFunc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Concerning the Dim keyword, its recommended usage is limited to empty an existing array (Example 1) or to redeclare a function parameter (Example 2).&lt;br /&gt;
&lt;br /&gt;
Example 1:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
; Include the Array UDF, it&#039;s needed here for the _ArrayDisplay function.&lt;br /&gt;
#include &amp;lt;Array.au3&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
; Assign a Local variable an array containing numbers with a size of 5.&lt;br /&gt;
; Note than an array is based 0 index, to access the first element the code is: $aiArray[0].&lt;br /&gt;
Local $aArray[5] = [1, 2, 3, 4, 5]&lt;br /&gt;
 &lt;br /&gt;
; Display the contents.&lt;br /&gt;
_ArrayDisplay($aArray)&lt;br /&gt;
 &lt;br /&gt;
; Empty the array (and keep its size).&lt;br /&gt;
Dim $aArray[5]&lt;br /&gt;
 &lt;br /&gt;
; Display the contents.&lt;br /&gt;
_ArrayDisplay($aArray)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Remark: The variable type of the emptied array is a string, every variable non initialized is a string.&lt;br /&gt;
&lt;br /&gt;
Example 2:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;Array.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Call MyFunc with default parameters ($vParam1 = 0).&lt;br /&gt;
MyFunc()&lt;br /&gt;
&lt;br /&gt;
; Assign a Local variable an array containing integers.&lt;br /&gt;
Local $aiArray[3] = [3, 4, 5]&lt;br /&gt;
; Call MyFunc with $aiArray as parameter ($vParam1 = $aiArray).&lt;br /&gt;
MyFunc($aiArray)&lt;br /&gt;
&lt;br /&gt;
Func MyFunc($vParam1 = 0)&lt;br /&gt;
    ; If $vParam1 is NOT an array then redeclare it to an array.&lt;br /&gt;
    If IsArray($vParam1) = 0 Then&lt;br /&gt;
        Dim $vParam1[3] = [0, 1, 2]&lt;br /&gt;
    EndIf&lt;br /&gt;
&lt;br /&gt;
    ; Display the array.&lt;br /&gt;
    _ArrayDisplay($vParam1)&lt;br /&gt;
EndFunc   ;==&amp;gt;MyFunc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And for the ReDim keyword, limit its use to resize an array you want to keep its content:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
; Include the Array UDF, it&#039;s needed here for the _ArrayDisplay function.&lt;br /&gt;
#include &amp;lt;Array.au3&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
; Assign a Local variable an array containing numbers with a size of 5.&lt;br /&gt;
; Note than an array is based 0 index, to access the first element the code is: $aiArray[0].&lt;br /&gt;
Local $aArray[5] = [1, 2, 3, 4, 5]&lt;br /&gt;
 &lt;br /&gt;
; Display the contents.&lt;br /&gt;
_ArrayDisplay($aArray)&lt;br /&gt;
 &lt;br /&gt;
; Resize the array (and keep its content).&lt;br /&gt;
ReDim $aArray[3]&lt;br /&gt;
 &lt;br /&gt;
; Display the contents.&lt;br /&gt;
_ArrayDisplay($aArray)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why using Dim over Local/Global is not always a good option:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Dim $vVariableThatIsGlobal = &amp;quot;This is a variable that has &amp;quot;&amp;quot;Program Scope&amp;quot;&amp;quot; aka Global.&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;An example of why Dim can cause more problems than solve them.&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
Example()&lt;br /&gt;
 &lt;br /&gt;
Func Example()&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, $vVariableThatIsGlobal) ; That looks alright to me as it displays the following text: This is a variable that has &amp;quot;Program Scope&amp;quot; aka Global.&lt;br /&gt;
 &lt;br /&gt;
	Local $vReturn = SomeFunc() ; Call some random function.&lt;br /&gt;
 &lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, $vReturn, $vVariableThatIsGlobal) ; The Global variable ($vVariableThatIsGlobal) changed because I totally forgot I had a duplicate variable name in &amp;quot;SomeFunc&amp;quot;.&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
 &lt;br /&gt;
Func SomeFunc()&lt;br /&gt;
	; This should create a variable in Local scope if the variable name doesn&amp;quot;t already exist.&lt;br /&gt;
	; For argument sake I totally forgot that I declared a variable already with the same name.&lt;br /&gt;
	; Well I only want this to be changed in the function and not the variable at the top of the script.&lt;br /&gt;
	; Should be OK right? Think again.&lt;br /&gt;
	Dim $vVariableThatIsGlobal = &amp;quot;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
	For $i = 1 To 10&lt;br /&gt;
		$vVariableThatIsGlobal &amp;amp;= $i ; This will return 12345678910 totally wiping the previous contents of $vVariableThatIsGlobal.&lt;br /&gt;
	Next&lt;br /&gt;
	Return $vVariableThatIsGlobal&lt;br /&gt;
EndFunc   ;==&amp;gt;SomeFunc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;jumpsec1&amp;quot;&amp;gt;Declaring Global variables in a Function is never a good idea:&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Calling Example() first will initialise the Global variable $vVariableThatIsGlobal and therefore calling SomeFunc() won&#039;t return an error.&lt;br /&gt;
; Now look at Example 2.&lt;br /&gt;
Example()&lt;br /&gt;
 &lt;br /&gt;
Func Example()&lt;br /&gt;
	; Declaring a variable in a function can cause serious problems, hence why all Global variables should be declared at the top of a script.&lt;br /&gt;
	Global $vVariableThatIsGlobal = &#039;This is a variable that has &#039;&#039;File Scope&#039;&#039; aka Global.&#039;&lt;br /&gt;
	SomeFunc()&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
 &lt;br /&gt;
Func SomeFunc()&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &#039;&#039;, $vVariableThatIsGlobal) ; As the variable was initialised this will not return an error.&lt;br /&gt;
EndFunc   ;==&amp;gt;SomeFunc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Calling SomeFunc() first will bypass the Global variable $vVariableThatIsGlobal being initialised and therefore AutoIt has no idea of what data the variable&lt;br /&gt;
; $vVariableThatIsGlobal contains.&lt;br /&gt;
SomeFunc()&lt;br /&gt;
 &lt;br /&gt;
Func Example()&lt;br /&gt;
	; Declaring a variable in a function can cause serious problems, hence why all Global variables should be declared at the top of a script.&lt;br /&gt;
	Global $vVariableThatIsGlobal = &#039;This is a variable that has &#039;&#039;File Scope&#039;&#039; aka Global.&#039;&lt;br /&gt;
	SomeFunc()&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
 &lt;br /&gt;
Func SomeFunc()&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &#039;&#039;, $vVariableThatIsGlobal) ; As the variable wasn&#039;t initialised this will return an error of &amp;quot;variable used without being declared.&amp;quot;&lt;br /&gt;
EndFunc   ;==&amp;gt;SomeFunc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Declaring variables in loops (For, While, Do etc..) can have an affect on efficiency:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Declaring variables inside loops should be avoided as the variable is re-declared on each repetition.&lt;br /&gt;
For $i = 1 To 10 ; $i is in &#039;loop scope.&#039;&lt;br /&gt;
	Local $iInt = $i&lt;br /&gt;
Next&lt;br /&gt;
MsgBox($MB_SYSTEMMODAL, &#039;&#039;, $iInt) ; This will display 10.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Declaring variables outside of loops is more efficent in the long run.&lt;br /&gt;
Local $iInt = 0&lt;br /&gt;
For $i = 1 To 10 ; $i is in &#039;loop scope.&#039;&lt;br /&gt;
	$iInt = $i&lt;br /&gt;
Next&lt;br /&gt;
MsgBox($MB_SYSTEMMODAL, &#039;&#039;, $iInt) ; This will display 10.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is no requirement to declare the iteration count variable in a loop:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
; Correct&lt;br /&gt;
Local Const $iCount = 99&lt;br /&gt;
Local $aArray[$iCount]&lt;br /&gt;
For $i = 0 To UBound($iCount) - 1 ; $i is only used in the loop, so there is no requirement to declare it.&lt;br /&gt;
	$aArray[$i] = $i&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Incorrect&lt;br /&gt;
Local Const $iCount = 99&lt;br /&gt;
Local $aArray[$iCount]&lt;br /&gt;
Local $i ; This is only used to store the iteration count value in the loop and therefore doesn&#039;t need to be declared. This is known as loop scope.&lt;br /&gt;
For $i = 0 To UBound($iCount) - 1&lt;br /&gt;
	$aArray[$i] = $i&lt;br /&gt;
Next&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As you can see, there is the Const keyword in the example, we are going to talk about it.&lt;br /&gt;
&lt;br /&gt;
== Const, Static, Enum ==&lt;br /&gt;
&lt;br /&gt;
=== Const ===&lt;br /&gt;
We won&#039;t talk about the advantages of a constant variable, they are neglibible (for your information, an autoit constant variable is marked as read-only and remains a variable as read-only when compiled).&lt;br /&gt;
&lt;br /&gt;
The Const keyword may be used in a first by some of you to avoid re-assignments.&lt;br /&gt;
The best way to use them is not this last case, the constants should be used for real static variables, meaning that their value won&#039;t change regardless to the instance of the program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
;Bad&lt;br /&gt;
Local Const $hGUI = GUICreate(&amp;quot;MyGUI&amp;quot;)&lt;br /&gt;
; The handle of the window is unique, it&#039;s generated by Windows and changes.&lt;br /&gt;
&lt;br /&gt;
;Good&lt;br /&gt;
Local Const $iMyAge = 19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Static ===&lt;br /&gt;
Static variables are the solution to the global variables used in only one function.&lt;br /&gt;
e.g: Retain variable data once returned from a Function and only use that variable in that particular Function.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
    SomeFunc() ; This will display a message box of 1, 1.&lt;br /&gt;
    SomeFunc() ; This will display a message box of 1, 2.&lt;br /&gt;
    SomeFunc() ; This will display a message box of 1, 3.&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&lt;br /&gt;
Func SomeFunc()&lt;br /&gt;
    ; This initialises a Static variable in Local scope. When a variable is declared just in Local scope (within a Function,)&lt;br /&gt;
    ; it&#039;s destroyed when the Function ends/returns. This isn&#039;t the case for a Static variable. The variable can&#039;t be&lt;br /&gt;
    ; accessed from anywhere else in the script apart from the Function it was declared in.&lt;br /&gt;
    Local Static $vVariableThatIsStatic = 0&lt;br /&gt;
    Local $vVariableThatIsLocal = 0&lt;br /&gt;
    $vVariableThatIsLocal += 1 ; This will always be 1 as it was destroyed once returned from SomeFunc.&lt;br /&gt;
    $vVariableThatIsStatic += 1 ; This will increase by 1.&lt;br /&gt;
    MsgBox(4096, $vVariableThatIsLocal, $vVariableThatIsStatic)&lt;br /&gt;
EndFunc   ;==&amp;gt;SomeFunc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enum ===&lt;br /&gt;
This statement is often practical in certain situations:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
    ; Create variables in Local scope and enumerate through the variables. Default is to start from 0.&lt;br /&gt;
    Local Enum $eCat, $eDog, $eMouse, $eHamster ; $eHamster is equal to the value 3, not 4.&lt;br /&gt;
&lt;br /&gt;
    ; Create an array in Local scope with 4 elements.&lt;br /&gt;
    Local $aAnimalNames[4]&lt;br /&gt;
&lt;br /&gt;
    ; Assign each array element with the name of the respective animal. For example the name of the cat is Jasper.&lt;br /&gt;
    $aAnimalNames[$eCat] = &#039;Jasper&#039; ; $eCat is equal to 0, similar to using $aAnimalNames[0]&lt;br /&gt;
    $aAnimalNames[$eDog] = &#039;Beethoven&#039; ; $eDog is equal to 1, similar to using $aAnimalNames[1]&lt;br /&gt;
    $aAnimalNames[$eMouse] = &#039;Pinky&#039; ; $eMouse is equal to 2, similar to using $aAnimalNames[2]&lt;br /&gt;
    $aAnimalNames[$eHamster] = &#039;Fidget&#039; ; $eHamster is equal to 3, similar to using $aAnimalNames[3]&lt;br /&gt;
&lt;br /&gt;
    ; Display the values of the array.&lt;br /&gt;
    MsgBox($MB_SYSTEMMODAL, &#039;&#039;, &#039;$aAnimalNames[$eCat] = &#039; &amp;amp; $aAnimalNames[$eCat] &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
            &#039;$aAnimalNames[$eDog] = &#039; &amp;amp; $aAnimalNames[$eDog] &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
            &#039;$aAnimalNames[$eMouse] = &#039; &amp;amp; $aAnimalNames[$eMouse] &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
            &#039;$aAnimalNames[$eHamster] = &#039; &amp;amp; $aAnimalNames[$eHamster] &amp;amp; @CRLF)&lt;br /&gt;
&lt;br /&gt;
    ; Sometimes using this approach for accessing an element is more practical than using a numerical value, due to the fact changing the index value of&lt;br /&gt;
    ; the enum constant has no affect on it&#039;s position in the array. Therefore changing the location of $eCat in the array is as simple as changing the order&lt;br /&gt;
    ; it appears in the initial declaration e.g.&lt;br /&gt;
&lt;br /&gt;
    ; Local Enum $eDog, $eMouse, $eCat, $eHamster&lt;br /&gt;
&lt;br /&gt;
    ; Now $eCat is the 2nd element in the array. If you were using numerical values, you would have to manually change all references of $aAnimalNames[0] to&lt;br /&gt;
    ; $aAnimalNames[2], as well as for the other elements which have now shifted.&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Au3Check directive ==&lt;br /&gt;
As you may know (and we hope), the Au3Check tool checks your code for syntax errors, variables used without being declared etc. which is a good thing to fix your script.&lt;br /&gt;
&lt;br /&gt;
With the official custom directive used to check the helpfile examples/includes, you can apply the good coding practices listed above:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Magic Numbers ==&lt;br /&gt;
Magic numbers are arbitrary numbers interspersed throughout a program&#039;s source code which do not have an associated identifier. The downside to this is not being able to derive a meaning from the number. &lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
MsgBox(262144, &amp;quot;Magic Numbers&amp;quot;, &amp;quot;It&#039;s Adventure Time!&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In this example, the magic number is 262144 with the identifier being $MB_TOPMOST according to the helpfile.&lt;br /&gt;
&lt;br /&gt;
The corrected example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
MsgBox($MB_TOPMOST, &amp;quot;Magic Numbers&amp;quot;, &amp;quot;It&#039;s Adventure Time!&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
; Imagine you&#039;re a new user to AutoIt and you come across this code, where would you find -3, -4 or -5 in the help file?&lt;br /&gt;
; Since AutoIt is relatively a new concept to you, your first thought isn&#039;t to search through all the include files, I mean&lt;br /&gt;
; why would you, the help file is there for a reason.&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
    Local $hGUI = GUICreate(&#039;&#039;)&lt;br /&gt;
    GUICtrlCreateLabel(&#039;Why magic numbers are counter productive.&#039;, 5, 5)&lt;br /&gt;
    GUICtrlSetState(Default, 128) ; Does this hide, show or disable it?&lt;br /&gt;
    GUICtrlSetState(Default, 64) ; Does this hide, show or disable it?&lt;br /&gt;
    GUISetState(@SW_SHOW, $hGUI)&lt;br /&gt;
&lt;br /&gt;
    While 1&lt;br /&gt;
        Switch GUIGetMsg()&lt;br /&gt;
            Case -3 ; Doesn&#039;t really tell much about what it does.&lt;br /&gt;
                ExitLoop&lt;br /&gt;
&lt;br /&gt;
            Case -4, -5 ; Again, no idea what these are. MouseMove? MouseClick? Restore?&lt;br /&gt;
                MsgBox(4096, &#039;&#039;, &#039;Do something when this action takes place.&#039;)&lt;br /&gt;
&lt;br /&gt;
        EndSwitch&lt;br /&gt;
    WEnd&lt;br /&gt;
&lt;br /&gt;
    GUIDelete($hGUI)&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Did you understand the numbers were these:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;GUIConstantsEx.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
    Local $hGUI = GUICreate(&#039;&#039;)&lt;br /&gt;
    GUICtrlCreateLabel(&#039;Why magic numbers are counter productive.&#039;, 5, 5)&lt;br /&gt;
    GUICtrlSetState(Default, $GUI_DISABLE) ; Better, this is documented in the help file.&lt;br /&gt;
    GUICtrlSetState(Default, $GUI_ENABLE) ; Better, this is documented in the help file.&lt;br /&gt;
    GUISetState(@SW_SHOW, $hGUI)&lt;br /&gt;
&lt;br /&gt;
    While 1&lt;br /&gt;
        Switch GUIGetMsg()&lt;br /&gt;
            Case $GUI_EVENT_CLOSE ; Better, this is documented in the help file. Ah, it&#039;s the close action.&lt;br /&gt;
                ExitLoop&lt;br /&gt;
&lt;br /&gt;
            Case $GUI_EVENT_MINIMIZE, $GUI_EVENT_RESTORE ; Better, this is documented in the help file.&lt;br /&gt;
                MsgBox($MB_SYSTEMMODAL, &#039;&#039;, &#039;Do something when this action takes place.&#039;) ; Better, this is documented in the help file.&lt;br /&gt;
&lt;br /&gt;
        EndSwitch&lt;br /&gt;
    WEnd&lt;br /&gt;
&lt;br /&gt;
    GUIDelete($hGUI)&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Magic_number_(programming) Magic number (programming)]&lt;br /&gt;
&lt;br /&gt;
== Include-once directive ==&lt;br /&gt;
This one is designed for standard includes and UDFs, it&#039;s highly recommended to use it.&lt;br /&gt;
&lt;br /&gt;
Those includes may be included in more than one script of your project because they are needed for some includes or your script itself.&lt;br /&gt;
In that case, the code will be duplicated which is not a good thing especially if you have (and it&#039;s mainly the case) constants declared in those files, in so far as the constants cannot be redeclared/reassigned; same thing for functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Put the directive in top of your UDF (library) to avoid itself to be included more than once :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include-once&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=SciTE4AutoIt3&amp;diff=12803</id>
		<title>SciTE4AutoIt3</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=SciTE4AutoIt3&amp;diff=12803"/>
		<updated>2015-02-28T20:05:02Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: /* Help Files */  Added wikilink to Documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SciTE4AutoIt3&#039;&#039;&#039; is a specialist editor package based on the excellent [http://www.scintilla.org/SciTE.html SciTE] editor.  &lt;br /&gt;
SciTE has been set up to compile AutoIt scripts and has been extended with a multitude of Lua scripts.  &lt;br /&gt;
SciTE4AutoIt3 may be downloaded here: [http://www.AutoItscript.com/site/AutoIt-script-editor/ SciTE4AutoIt3].&lt;br /&gt;
Keep in mind that SciTE4AutoIt3 is not an official package.&lt;br /&gt;
Direct any bug reports or feature requests to the AutoIt3 forum and not the bug tracker.&lt;br /&gt;
&lt;br /&gt;
== Syntax Highlighting ==&lt;br /&gt;
&lt;br /&gt;
[[File:Syntax_Highlighting.JPG|right|A demonstration of syntax highlighting using the default theme.]]&lt;br /&gt;
&lt;br /&gt;
SciTE4AutoIt3 comes with a customized AutoIt3 lexer which enables syntax highlighting.&lt;br /&gt;
Syntax highlighting enables the colorization of various code elements such as variables, strings, operators, comments etc.&lt;br /&gt;
Syntax highlighting allows one to differentiate the various code elements such as keywords, variables, strings, control flow structures etc. quickly without having to specifically identify the element.&lt;br /&gt;
To load a custom theme a user may press [Ctrl] + [1] to bring up [[SciTEConfig]].&lt;br /&gt;
When the &#039;&#039;Color Settings&#039;&#039; tab is selected a button labeled &#039;New Scheme&#039; will appear at the bottom. &lt;br /&gt;
Alternatively, the colors may be customized individually.&lt;br /&gt;
&lt;br /&gt;
Some options that are available for customization include: White Space, Comment Line, Comment Block, Number, Function, Keyword, Macro and String.&lt;br /&gt;
&lt;br /&gt;
== Quick Tips ==&lt;br /&gt;
&lt;br /&gt;
For anyone not familiar with SciTE, here are a few tips and tricks to help easily customize the installation. &lt;br /&gt;
For any advanced info, visit the [http://www.scintilla.org/SciTEDoc.html SciTE home page].&lt;br /&gt;
&lt;br /&gt;
=== Help Files ===&lt;br /&gt;
&lt;br /&gt;
To access the AutoIt3 helpfile the user may press [F1].  For the full article see: [[Documentation]]&lt;br /&gt;
To quickly access help information on a specific function, simply click or highlight the desired function and press the [F1] key to bring up the help file on the relevant page.&lt;br /&gt;
To access the SciTE4AutoIt3 helpfile the user may press [ctrl] + [F1].&lt;br /&gt;
&lt;br /&gt;
=== Properties Files ===&lt;br /&gt;
&lt;br /&gt;
Minor editing of SciTE&#039;s configuration files will be required to make use of the information in this section.&lt;br /&gt;
It is important to be familiar with the hierarchy of SciTE&#039;s configuration files.&lt;br /&gt;
&lt;br /&gt;
There are four properties files used:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| SciTE.properties || Local properties file which may be present in the same directory as the file being edited. This file overrides any other properties files settings below. This file is user created.&lt;br /&gt;
|-&lt;br /&gt;
| SciTEDirectory.properties || Directory properties file which may be present in the same or in a parent directory as the file being edited.&lt;br /&gt;
This file overrides all properties setting of the files below, but not the local properties settings aka &#039;&#039;SciTE.properties&#039;&#039;. &lt;br /&gt;
This file is user created.&lt;br /&gt;
|-&lt;br /&gt;
| SciTEUser.properties || User properties file, this file&#039;s settings override only the global properties settings aka &#039;&#039;SciTEGlobal.properties&#039;&#039;.&lt;br /&gt;
This file is found under the current logged on users profile directory.&lt;br /&gt;
|-&lt;br /&gt;
| SciTEGlobal.properties || All settings in this file can be overridden by any of the above files. &lt;br /&gt;
Typically this file should not be edited. &lt;br /&gt;
Use any of the above methods to implement a setting change.&lt;br /&gt;
This file can be found in SciTE&#039;s installation directory.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Inline Errors ===&lt;br /&gt;
&lt;br /&gt;
[[File:InlineError.JPG|234px|thumb|right|Intentional error prone code used to display the &amp;quot;Inline Error&amp;quot; feature.]]&lt;br /&gt;
&lt;br /&gt;
In the latest version of SciTE, there exists a new feature called &amp;quot;Inline Errors&amp;quot;.  &lt;br /&gt;
Inline Error marks are error messages that will appear in the source code within the Scintilla window.&lt;br /&gt;
&lt;br /&gt;
The feature may be toggled and customized by using SciTEConfig.&lt;br /&gt;
&lt;br /&gt;
=== Selection Highlighting ===&lt;br /&gt;
&lt;br /&gt;
Selection highlighting is a new feature which highlights other instances of the currently highlighted word or string.  &lt;br /&gt;
Due to the colors, sometimes it is hard to tell the selection apart.&lt;br /&gt;
The default colors may be changed.&lt;br /&gt;
&lt;br /&gt;
The feature may be toggled and customized by using SciTEConfig.&lt;br /&gt;
&lt;br /&gt;
=== Colors in the Output Pane ===&lt;br /&gt;
&lt;br /&gt;
SciTE has a console window which can be used to output information from running scripts.  &lt;br /&gt;
The function {{Help File|ConsoleWrite}} may be used in an AutoIt script to output text to the console.  &lt;br /&gt;
The colors of the text may be altered by prepending a string with special characters.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;AutoIt&amp;quot;&amp;gt;&lt;br /&gt;
ConsoleWrite(&amp;quot;This is plain text&amp;quot; &amp;amp; @LF)&lt;br /&gt;
ConsoleWrite(&amp;quot;&amp;gt; This text will have a different color.&amp;quot; &amp;amp; @LF)&lt;br /&gt;
ConsoleWrite(&amp;quot;+ This text will have a different color.&amp;quot; &amp;amp; @LF)&lt;br /&gt;
ConsoleWrite(&amp;quot;- This text will have a different color.&amp;quot; &amp;amp; @LF)&lt;br /&gt;
ConsoleWrite(&amp;quot;! This text will have a different color.&amp;quot; &amp;amp; @LF)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AutoIt3Wrapper ==&lt;br /&gt;
&lt;br /&gt;
AutoIt3Wrapper directives allow for in depth control of the compilation and interpretation of AutoIt scripts.  &lt;br /&gt;
Some of these can be very useful under different circumstances.&lt;br /&gt;
See [[AutoIt3Wrapper Directives]] for a full list of directives and their descriptions.&lt;br /&gt;
&lt;br /&gt;
== Au3Stripper ==&lt;br /&gt;
&lt;br /&gt;
[[Au3Stripper]] may be used to strip away unused [[Function|functions]] and [[Global|global]] [[Variable|variables]] from the script prior to compilation.  &lt;br /&gt;
Functions and variables may be renamed to shorter three character names to save space and to provide some measure of obscurity.  &lt;br /&gt;
&lt;br /&gt;
=== Stripping Excess Code ===&lt;br /&gt;
&lt;br /&gt;
For instance, in a script that has several includes Au3Stripper can often strip thousands of lines from the script.&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_Au3Stripper=y&lt;br /&gt;
 #Au3Stripper_Parameters=/sf /sv /rm&lt;br /&gt;
&lt;br /&gt;
On a medium sized script, results are often like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;Running Au3Stripper (1.2.0.6)  from:C:\Program Files\AutoIt3\SciTE cmdline:&lt;br /&gt;
 - Iteration 1 Strip Functions result: Output  2580 lines and stripped 6741 lines&lt;br /&gt;
 - Iteration 2 Strip Variables result: Output  1585 lines and stripped 950 lines&lt;br /&gt;
 - Iteration 3 Strip Variables result: Output  1566 lines and stripped 19 lines&lt;br /&gt;
 - Iteration 4 Start the actual Obfuscation.&lt;br /&gt;
 +&amp;gt; Source    26190 lines 1447980 Characters.&lt;br /&gt;
 +&amp;gt; Stripped  7710 Func/Var lines and  16862 comment lines, Total 1373871 Characters.&lt;br /&gt;
 +&amp;gt; Saved     93% lines 94% Characters.&lt;br /&gt;
 +&amp;gt; Au3Stripper v1.0.27.0 finished obfuscating 1566 lines, created:C:\MyScript_stripped.au3&lt;br /&gt;
&lt;br /&gt;
== Run_After and Run_Before Commands ==&lt;br /&gt;
&lt;br /&gt;
=== Running the exe On Build ===&lt;br /&gt;
&lt;br /&gt;
Often a build is performed as a testing procedure and so to have to continually open up Windows Explorer to find the exe is repetitive. &lt;br /&gt;
Furthermore, if the script writes to the console using the function {{Help File|ConsoleWrite}} then the messages will not be written to SciTE&#039;s console pane.  The solution is simple:&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=&amp;quot;%out%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This will run the program and read the console output to the SciTE debug frame.&lt;br /&gt;
&lt;br /&gt;
=== Creating a Version Directory ===&lt;br /&gt;
&lt;br /&gt;
When compiling, it is very possible that you want to go back to a previous version. &lt;br /&gt;
If so, then it is neat to have a directory which will store all previous builds, without the need for you to manually copy and paste every time.&lt;br /&gt;
Make sure you add these directives in last (after adding resources) as they might not be included in the copied result.&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=md &amp;quot;%scriptdir%\Versions\%fileversion%&amp;quot;&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=copy &amp;quot;%in%&amp;quot; &amp;quot;%scriptdir%\Versions\%fileversion%\%scriptfile%%fileversion%.au3&amp;quot;&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=copy &amp;quot;%out%&amp;quot; &amp;quot;%scriptdir%\Versions\%fileversion%\%scriptfile%%fileversion%.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Using ResHacker ===&lt;br /&gt;
&lt;br /&gt;
ResHacker is a very important programming tool for extracting and adding resources into executables. &lt;br /&gt;
It has a very simple command line interface that allows it to be used easily using the &amp;quot;Run_After&amp;quot; directive. &lt;br /&gt;
Adding a picture to an executable could be done like this:&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=ResHacker.exe -add %out%, %out%, MyPicture.bmp, BITMAP, RESOURCENAME, 0&lt;br /&gt;
&lt;br /&gt;
NB: Reshacker.exe &#039;&#039;must&#039;&#039; be copied into the script directory for this to work.&lt;br /&gt;
&lt;br /&gt;
If you then want to use the resources in your code, there is an excellent [http://www.AutoItscript.com/forum/index.php?showtopic=51103 Resources UDF] which will allow you to access the resources from within the exe.&lt;br /&gt;
&lt;br /&gt;
==== Adding Original Source Code ====&lt;br /&gt;
&lt;br /&gt;
When using the above tip on stripping excess code, the new source is not readable. &lt;br /&gt;
As a result, using the standard directive for saving the source:&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Res_SaveSource=y&lt;br /&gt;
&lt;br /&gt;
Would add the obfuscated code to the exe, which is not the desired result. &lt;br /&gt;
The solution is to add it in manually. &lt;br /&gt;
This code does not require any editing, so you can just copy and paste it in:&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=ResHacker.exe -add %out%, %out%, %scriptfile%.au3, RCDATA, SOURCE, 0&lt;br /&gt;
 &lt;br /&gt;
==== Extended Reshacker Info ====&lt;br /&gt;
&lt;br /&gt;
ResHacker doesn&#039;t always return with a return code (rc) of not 0 if it fails, to get that info you need to read the ResHacker.log file that is created. This is also pretty simple to do:&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=ResHacker.exe -add %out%, %out%, MyPicture.bmp, BITMAP, RESOURCENAME, 0&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=TYPE ResHacker.log&lt;br /&gt;
&lt;br /&gt;
The new output now looks like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;Running:ResHacker.exe -add C:\MyScript.exe, C:\MyScript.exe, MyPicture.bmp, BITMAP, RESOURCENAME, 0&lt;br /&gt;
 &amp;gt;ResHacker.exe -add C:\MyScript.exe, C:\MyScript.exe, MyPicture.bmp, BITMAP, RESOURCENAME, 0 Ended   rc:0&lt;br /&gt;
 &amp;gt;Running:TYPE ResHacker.log&lt;br /&gt;
 [19 Jan 2010, 21:26:22]&lt;br /&gt;
 ResHacker.exe  -add C:\MyScript.exe, C:\MyScript.exe, MyPicture.bmp, BITMAP, RESOURCENAME, 0&lt;br /&gt;
  Added: BITMAP,RESOURCENAME,0&lt;br /&gt;
 &lt;br /&gt;
 Commands completed&lt;br /&gt;
 &amp;gt;TYPE ResHacker.log Ended   rc:0&lt;br /&gt;
&lt;br /&gt;
And an example of it showing an error:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;ResHacker.exe -add C:\MyScript.exe, C:\MyScript.exe, MyPicture.bmp, BITMAP, RESOURCENAME, 0 Ended   rc:0&lt;br /&gt;
 &amp;gt;Running:TYPE ResHacker.log&lt;br /&gt;
 [19 Jan 2010, 21:32:10]&lt;br /&gt;
 ResHacker.exe  -add C:\MyScript.exe, C:\MyScript.exe, MyPicture.bmp, BITMAP, RESOURCENAME, 0&lt;br /&gt;
 Error: &amp;quot;MyPicture.bmp&amp;quot; does not exist&lt;br /&gt;
 &amp;gt;TYPE ResHacker.log Ended   rc:0&lt;br /&gt;
&lt;br /&gt;
As you can see, Reshacker on its own returns rc: 0, usually indicating no error. This would have gone completely unnoticed except for the log file, which shows the error and an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Other Run_After and Run_Before Commands ===&lt;br /&gt;
&lt;br /&gt;
You can use any commands you like in the Run_After and Run_Before directives. Examples such as &amp;quot;TYPE&amp;quot; have been shown above. &lt;br /&gt;
&lt;br /&gt;
For a more complete list the following website is very useful: [http://ss64.com/nt An A-Z Index of the Windows CMD Line]&lt;br /&gt;
&lt;br /&gt;
== Other Wiki Pages ==&lt;br /&gt;
&lt;br /&gt;
[[Adding_utilities_to_the_SciTE_Tools_menu|Adding Utilities to the SciTE Tools Menu]]&lt;br /&gt;
&lt;br /&gt;
[[Adding_UDFs_to_AutoIt_and_SciTE|Adding UDFs to AutoIt and SciTE]]&lt;br /&gt;
&lt;br /&gt;
== Useful Lua links and scripts ==&lt;br /&gt;
&lt;br /&gt;
[http://www.scintilla.org/SciTELua.html SciTELua]&lt;br /&gt;
&lt;br /&gt;
[http://www.lua.org Lua Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.lua.org/pil/1.html Programming in Lua]&lt;br /&gt;
&lt;br /&gt;
[http://lua-users.org/wiki/ lua-users wiki]&lt;br /&gt;
&lt;br /&gt;
[http://lua-users.org/wiki/SciTEScripts SciTEScripts]&lt;br /&gt;
&lt;br /&gt;
[http://lua-users.org/wiki/SampleCode SampleCode]&lt;br /&gt;
&lt;br /&gt;
[http://www.AutoItscript.com/forum/topic/140881-mouse-hover-call-tips-update-03182013/ AutoIt3 Forum: MouseHoverCallTips]&lt;br /&gt;
&lt;br /&gt;
[http://www.AutoItscript.com/forum/topic/152960-SciTE-lua-tool-to-make-string-variable-from-selected-text/ AutoIt3 Forum: SciTE lua Tool To Make String Variable From Selected Text]&lt;br /&gt;
&lt;br /&gt;
[[Category:SciTE]]&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoIt3Wrapper_Directives&amp;diff=12767</id>
		<title>AutoIt3Wrapper Directives</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoIt3Wrapper_Directives&amp;diff=12767"/>
		<updated>2015-02-12T18:01:32Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: /* AU3Stripper */ Placed directives into a table.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== List of AutoIt3Wrapper Directives ==&lt;br /&gt;
&lt;br /&gt;
This is a list of compiler directives used by AutoIt3Wrapper.exe and their descriptions.&lt;br /&gt;
&lt;br /&gt;
== AutoIt3 ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
| #AutoIt3Wrapper_testing || (Y/N) || Skip Tidy, Obfuscator and cvsWrapper for speed while testing. || N &lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_UseX64 || (Y/N) || Use X64 versions for AutoIt3_x64 or AUT2EXE_x64. || N&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Version || (B/P) || Use Beta or Production for AutoIt3 and AUT2EXE. || P&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Run_Debug_Mode || (Y/N) || Run Script with console debugging. || N&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Run_SciTE_Minimized || (Y/N) || Minimize SciTE while script is running. || N&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Run_SciTE_OutputPane_Minimized || (Y/N) || Toggle SciTE output pane at run time so its not shown. || N&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Autoit3Dir || || Optionally override the base AutoIt3 install directory. || &lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Aut2exe || || Optionally override the Aut2exe.exe to use for this script || &lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_AutoIt3 || || Optionally override the Autoit3.exe to use for this script || &lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Add_Constants || || Add the needed standard constant include files. Will only run one time. || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== AUT2EXE ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Icon || || Filename of the Ico file to use ||&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_OutFile || || Target exe/a3x filename. ||&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_OutFile_Type || || a3x=small AutoIt3 file exe=Standalone executable || exe&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_OutFile_X64 || || Target exe filename for X64 compile. ||&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Compression || || Compression parameter 0-40=Low 2=normal 4=High. || 2&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_UseUpx || (Y/N) || Compress output program. || Y&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_UPX_Parameters || || Override the default setting for UPX. ||&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Change2CUI || (Y/N) || Change output program to CUI in stead of GUI. || N&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Compile_both || (Y/N) || Compile both X86 and X64 in one run. || N&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Target Program Resource Info ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_Comment || || Comment field || &lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_Description|| ||  Description field || &lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_Fileversion || || File Version || &lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_FileVersion_AutoIncrement || (Y/N/P) || AutoIncrement FileVersion After AUTEXE is finished. P=Prompt, Will ask at compilation time if you want to increase the version number || N&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_ProductVersion || || Product Version. || Default is the AutoIt3 version used.&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_Language || || Resource Language code. || 2057 which is English (United Kingdom)&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_LegalCopyright || || Copyright field || &lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_res_requestedExecutionLevel || || asInvoker, highestAvailable, requireAdministrator or None (remove the trustInfo section). || Default is the setting from AUT2EXE - asInvoker.&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_res_Compatibility || || Vista, Windows7 both allowed separated by a comma. ||  None&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Res_SaveSource || (Y/N) || Save a copy of the script source in the EXE resources.  If Y then the content of the script source depends on the #AutoIt3Wrapper_Run_Obfuscator and #obfuscator_parameters directives. || N&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Add Extra Files to The Resources ===&lt;br /&gt;
&lt;br /&gt;
A maximum of fifteen free form resource fields.The following variables are available:&lt;br /&gt;
&lt;br /&gt;
%AutoItVer% = will be replaced with the version of AutoIt3&lt;br /&gt;
	&lt;br /&gt;
%date% = PC date in short date format&lt;br /&gt;
&lt;br /&gt;
%longdate% = PC date in long date format&lt;br /&gt;
&lt;br /&gt;
%time% = PC timeformat&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
  #AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%&lt;br /&gt;
  #AutoIt3Wrapper_Res_Field=Free format fieldname|fieldvalue&lt;br /&gt;
  #AutoIt3Wrapper_Res_Field=Free format fieldname|fieldvalue&lt;br /&gt;
  #AutoIt3Wrapper_Res_Field=Free format fieldname|fieldvalue&lt;br /&gt;
&lt;br /&gt;
Add extra ICO files to the resources which can be used with TraySetIcon(@ScriptFullPath, 5) etc.&lt;br /&gt;
&lt;br /&gt;
list of filename of the Ico files to be added, First one will have number 5, then 6 etc.&lt;br /&gt;
&lt;br /&gt;
  #AutoIt3Wrapper_Res_Icon_AddFilename[,LanguageCode] of ICO to be added.&lt;br /&gt;
&lt;br /&gt;
  #AutoIt3Wrapper_Res_File_AddFilename[,Section [,ResName[,LanguageCode]]] to be added.&lt;br /&gt;
&lt;br /&gt;
== Tidy ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Run_Tidy || (Y/N)||  Run Tidy before compilation. || N&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Tidy_Stop_OnError || (Y/N) || Continue when only Warnings. || Y&lt;br /&gt;
|-&lt;br /&gt;
|  #Tidy_Parameters || || See the SciTE4AutoIt3 helpfile for options. ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== AU3Stripper ==&lt;br /&gt;
&lt;br /&gt;
The directives used within the script to control Au3Stripper are as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
| #AutoIt3Wrapper_Run_Au3Stripper || (y/n) || Run Au3Stripper before compilation. || n&lt;br /&gt;
|-&lt;br /&gt;
| #Au3Stripper_Parameters || || Use the parameters as listed below. ||&lt;br /&gt;
|-&lt;br /&gt;
| #Au3Stripper_Off ||  || Stop the Stripping process below this line. ||&lt;br /&gt;
|-&lt;br /&gt;
| #Au3Stripper_On ||  || Start the Stripping process below this line. ||&lt;br /&gt;
|-&lt;br /&gt;
| #Au3Stripper_Ignore_Funcs ||  || Do not Strip these functions. ||&lt;br /&gt;
|-&lt;br /&gt;
| #Au3Stripper_Ignore_Variables ||  || Do not Strip these variables. ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Parameters&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
| PreExpand ||  || Replace and reference to a Global Const variable with its actual value. || &lt;br /&gt;
|-&lt;br /&gt;
| StripOnly || (SF/SV) ||  || SV = 1&lt;br /&gt;
|-&lt;br /&gt;
| StripUnusedFunc ||  || Remove unused Funcs. || 0&lt;br /&gt;
|-&lt;br /&gt;
| StripUnusedVars ||  || Remove unused Global variable declarations. || 0&lt;br /&gt;
|-&lt;br /&gt;
| StripOnlyIncludes ||  || Same as /SO but leaves the main script untouched. ||&lt;br /&gt;
|-&lt;br /&gt;
| MergeOnly ||  || Will produce a scriptfile as AUT2EXE includes in the Compiled EXE. This allows you to find the proper linenumber when errors are reported. ||&lt;br /&gt;
|-&lt;br /&gt;
| RenameMinimum ||  || Generates a much smaller file by substituting function and variable names with unique 2+-character names. ||&lt;br /&gt;
|-&lt;br /&gt;
| ShowConsoleInfo || (0/1/9) || 0 = Minimal output to the console - only warnings and errors. 1 = Show more progress information 9 = Show all debug lines as found in the Au3Stripper.log. || 0&lt;br /&gt;
|-&lt;br /&gt;
| Beta ||  || Use the ...\AutoIt\Beta\Include files if installed. ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== AU3Check ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Run_AU3Check || (Y/N) || Run au3check before compilation. || Y&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_AU3Check_Parameters || || Au3Check parameters ||&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_AU3Check_Stop_OnWarning || (Y/N) || N=Continue on Warnings. || Y (Always stop on warnings.)&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_PlugIn_Funcs || || Define PlugIn function names separated by a comma to avoid AU3Check errors. ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
 | #AutoIt3Wrapper_Versioning || (Y/N/V) || Run versioning to update the script source. V=only run when fileversion is increased by #AutoIt3Wrapper_Res_FileVersion_AutoIncrement. || N&lt;br /&gt;
 |-&lt;br /&gt;
 | #AutoIt3Wrapper_Versioning_Parameters || || /NoPrompt: Will skip the Comments prompt /Comments: Text to added in the Comments. It can also contain the below variables. ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Run Before And After Directives ==&lt;br /&gt;
&lt;br /&gt;
The following directives can contain: these variables&lt;br /&gt;
&lt;br /&gt;
%in% , %out%, %outx64%, %icon% which will be replaced by the fullpath\filename.&lt;br /&gt;
&lt;br /&gt;
%scriptdir% same as @ScriptDir and %scriptfile% = filename without extension.&lt;br /&gt;
&lt;br /&gt;
%fileversion% is the information from the #AutoIt3Wrapper_Res_Fileversion directive&lt;br /&gt;
&lt;br /&gt;
%scitedir% will be replaced by the SciTE program directory&lt;br /&gt;
&lt;br /&gt;
%autoitdir% will be replaced by the AutoIt3 program directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#AutoIt3Wrapper_Run_Before process to run before compilation.  &lt;br /&gt;
You can have multiple records that will be processed in sequence.&lt;br /&gt;
&lt;br /&gt;
#AutoIt3Wrapper_Run_After process to run after compilation.  &lt;br /&gt;
You can have multiple records that will be processed in sequence.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conditional Directives ==&lt;br /&gt;
&lt;br /&gt;
Optional use this format for the supported directives to have seperate directive values for Run and Compile.&lt;br /&gt;
	&lt;br /&gt;
The GUI is not available when this format is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#AutoIt3Wrapper_If_Run&lt;br /&gt;
 #AutoIt3Wrapper_Run_AU3Check=y&lt;br /&gt;
 #AutoIt3Wrapper_Jump_To_First_Error=y&lt;br /&gt;
 #AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6&lt;br /&gt;
 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=n&lt;br /&gt;
 #AutoIt3Wrapper_Run_Tidy=n&lt;br /&gt;
 #Tidy_Parameters=&lt;br /&gt;
 #AutoIt3Wrapper_Tidy_Stop_onerror=n&lt;br /&gt;
#AutoIt3Wrapper_If_Compile&lt;br /&gt;
 #AutoIt3Wrapper_Run_AU3Check=y&lt;br /&gt;
 #AutoIt3Wrapper_Jump_To_First_Error=y&lt;br /&gt;
 #AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6&lt;br /&gt;
 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y&lt;br /&gt;
 #AutoIt3Wrapper_Run_Tidy=y&lt;br /&gt;
 #Tidy_Parameters=/gd /nsdp&lt;br /&gt;
 #AutoIt3Wrapper_Tidy_Stop_onerror=y&lt;br /&gt;
#AutoIt3Wrapper_EndIf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=SciTE4AutoIt3&amp;diff=12642</id>
		<title>SciTE4AutoIt3</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=SciTE4AutoIt3&amp;diff=12642"/>
		<updated>2014-09-20T11:25:12Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: /* Inline Errors */ Added note about using SciTEConfig to configure this setting.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SciTE4AutoIt3&#039;&#039;&#039; is a specialist editor package based on the excellent [http://www.scintilla.org/SciTE.html SciTE] editor.  &lt;br /&gt;
SciTE has been set up to compile AutoIt scripts and has been extended with a multitude of Lua scripts.  &lt;br /&gt;
SciTE4AutoIt3 may be downloaded here: [http://www.AutoItscript.com/site/AutoIt-script-editor/ SciTE4AutoIt3].&lt;br /&gt;
Keep in mind that SciTE4AutoIt3 is not an official package.&lt;br /&gt;
Direct any bug reports or feature requests to the AutoIt3 forum and not the bug tracker.&lt;br /&gt;
&lt;br /&gt;
== Syntax Highlighting ==&lt;br /&gt;
&lt;br /&gt;
[[File:Syntax_Highlighting.JPG|right|A demonstration of syntax highlighting using the default theme.]]&lt;br /&gt;
&lt;br /&gt;
SciTE4AutoIt3 comes with a customized AutoIt3 lexer which enables syntax highlighting.&lt;br /&gt;
Syntax highlighting enables the colorization of various code elements such as variables, strings, operators, comments etc.&lt;br /&gt;
Syntax highlighting allows one to differentiate the various code elements such as keywords, variables, strings, control flow structures etc. quickly without having to specifically identify the element.&lt;br /&gt;
To load a custom theme a user may press [Ctrl] + [1] to bring up [[SciTEConfig]].&lt;br /&gt;
When the &#039;&#039;Color Settings&#039;&#039; tab is selected a button labeled &#039;New Scheme&#039; will appear at the bottom. &lt;br /&gt;
Alternatively, the colors may be customized individually.&lt;br /&gt;
&lt;br /&gt;
Some options that are available for customization include: White Space, Comment Line, Comment Block, Number, Function, Keyword, Macro and String.&lt;br /&gt;
&lt;br /&gt;
== Quick Tips ==&lt;br /&gt;
&lt;br /&gt;
For anyone not familiar with SciTE, here are a few tips and tricks to help easily customize the installation. &lt;br /&gt;
For any advanced info, visit the [http://www.scintilla.org/SciTEDoc.html SciTE home page].&lt;br /&gt;
&lt;br /&gt;
=== Help Files ===&lt;br /&gt;
&lt;br /&gt;
To access the AutoIt3 helpfile the user may press [F1].  &lt;br /&gt;
To quickly access help information on a specific function, simply click or highlight the desired function and press the [F1] key to bring up the help file on the relevant page.&lt;br /&gt;
To access the SciTE4AutoIt3 helpfile the user may press [ctrl] + [F1].&lt;br /&gt;
For SciTE related help, use the key combination [Ctrl] + [F1] to bring up a help file detailing SciTE related help documentation.&lt;br /&gt;
&lt;br /&gt;
=== Properties Files ===&lt;br /&gt;
&lt;br /&gt;
Minor editing of SciTE&#039;s configuration files will be required to make use of the information in this section.&lt;br /&gt;
It is important to be familiar with the hierarchy of SciTE&#039;s configuration files.&lt;br /&gt;
&lt;br /&gt;
There are four properties files used:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| SciTE.properties || Local properties file which may be present in the same directory as the file being edited. This file overrides any other properties files settings below. This file is user created.&lt;br /&gt;
|-&lt;br /&gt;
| SciTEDirectory.properties || Directory properties file which may be present in the same or in a parent directory as the file being edited.&lt;br /&gt;
This file overrides all properties setting of the files below, but not the local properties settings aka &#039;&#039;SciTE.properties&#039;&#039;. &lt;br /&gt;
This file is user created.&lt;br /&gt;
|-&lt;br /&gt;
| SciTEUser.properties || User properties file, this file&#039;s settings override only the global properties settings aka &#039;&#039;SciTEGlobal.properties&#039;&#039;.&lt;br /&gt;
This file is found under the current logged on users profile directory.&lt;br /&gt;
|-&lt;br /&gt;
| SciTEGlobal.properties || All settings in this file can be overridden by any of the above files. &lt;br /&gt;
Typically this file should not be edited. &lt;br /&gt;
Use any of the above methods to implement a setting change.&lt;br /&gt;
This file can be found in SciTE&#039;s installation directory.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Inline Errors ===&lt;br /&gt;
&lt;br /&gt;
[[File:InlineError.JPG|234px|thumb|right|Intentional error prone code used to display the &amp;quot;Inline Error&amp;quot; feature.]]&lt;br /&gt;
&lt;br /&gt;
In the latest version of SciTE, there exists a new feature called &amp;quot;Inline Errors&amp;quot;.  &lt;br /&gt;
Inline Error marks are error messages that will appear in the source code within the Scintilla window.&lt;br /&gt;
&lt;br /&gt;
The feature may be toggled and customized by using SciTEConfig.&lt;br /&gt;
&lt;br /&gt;
=== Selection Highlighting ===&lt;br /&gt;
&lt;br /&gt;
Selection highlighting is a new feature which highlights other instances of the currently highlighted word or string.  &lt;br /&gt;
Due to the colors, sometimes it is hard to tell the selection apart.&lt;br /&gt;
The default colors may be changed.&lt;br /&gt;
&lt;br /&gt;
The feature may be toggled and customized by using SciTEConfig.&lt;br /&gt;
&lt;br /&gt;
=== Colors in the Output Pane ===&lt;br /&gt;
&lt;br /&gt;
SciTE has a console window which can be used to output information from running scripts.  &lt;br /&gt;
The function {{Help File|ConsoleWrite}} may be used in an AutoIt script to output text to the console.  &lt;br /&gt;
The colors of the text may be altered by prepending a string with special characters.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;AutoIt&amp;quot;&amp;gt;&lt;br /&gt;
ConsoleWrite(&amp;quot;This is plain text&amp;quot; &amp;amp; @LF)&lt;br /&gt;
ConsoleWrite(&amp;quot;&amp;gt; This text will have a different color.&amp;quot; &amp;amp; @LF)&lt;br /&gt;
ConsoleWrite(&amp;quot;+ This text will have a different color.&amp;quot; &amp;amp; @LF)&lt;br /&gt;
ConsoleWrite(&amp;quot;- This text will have a different color.&amp;quot; &amp;amp; @LF)&lt;br /&gt;
ConsoleWrite(&amp;quot;! This text will have a different color.&amp;quot; &amp;amp; @LF)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AutoIt3Wrapper ==&lt;br /&gt;
&lt;br /&gt;
AutoIt3Wrapper directives allow for in depth control of the compilation and interpretation of AutoIt scripts.  &lt;br /&gt;
Some of these can be very useful under different circumstances.&lt;br /&gt;
See [[AutoIt3Wrapper Directives]] for a full list of directives and their descriptions.&lt;br /&gt;
&lt;br /&gt;
== Au3Stripper ==&lt;br /&gt;
&lt;br /&gt;
[[Au3Stripper]] may be used to strip away unused [[Function|functions]] and [[Global|global]] [[Variable|variables]] from the script prior to compilation.  &lt;br /&gt;
Functions and variables may be renamed to shorter three character names to save space and to provide some measure of obscurity.  &lt;br /&gt;
&lt;br /&gt;
=== Stripping Excess Code ===&lt;br /&gt;
&lt;br /&gt;
For instance, in a script that has several includes Au3Stripper can often strip thousands of lines from the script.&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_Au3Stripper=y&lt;br /&gt;
 #Au3Stripper_Parameters=/sf /sv /rm&lt;br /&gt;
&lt;br /&gt;
On a medium sized script, results are often like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;Running Au3Stripper (1.2.0.6)  from:C:\Program Files\AutoIt3\SciTE cmdline:&lt;br /&gt;
 - Iteration 1 Strip Functions result: Output  2580 lines and stripped 6741 lines&lt;br /&gt;
 - Iteration 2 Strip Variables result: Output  1585 lines and stripped 950 lines&lt;br /&gt;
 - Iteration 3 Strip Variables result: Output  1566 lines and stripped 19 lines&lt;br /&gt;
 - Iteration 4 Start the actual Obfuscation.&lt;br /&gt;
 +&amp;gt; Source    26190 lines 1447980 Characters.&lt;br /&gt;
 +&amp;gt; Stripped  7710 Func/Var lines and  16862 comment lines, Total 1373871 Characters.&lt;br /&gt;
 +&amp;gt; Saved     93% lines 94% Characters.&lt;br /&gt;
 +&amp;gt; Au3Stripper v1.0.27.0 finished obfuscating 1566 lines, created:C:\MyScript_stripped.au3&lt;br /&gt;
&lt;br /&gt;
== Run_After and Run_Before Commands ==&lt;br /&gt;
&lt;br /&gt;
=== Running the exe On Build ===&lt;br /&gt;
&lt;br /&gt;
Often a build is performed as a testing procedure and so to have to continually open up Windows Explorer to find the exe is repetitive. &lt;br /&gt;
Furthermore, if the script writes to the console using the function {{Help File|ConsoleWrite}} then the messages will not be written to SciTE&#039;s console pane.  The solution is simple:&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=&amp;quot;%out%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This will run the program and read the console output to the SciTE debug frame.&lt;br /&gt;
&lt;br /&gt;
=== Creating a Version Directory ===&lt;br /&gt;
&lt;br /&gt;
When compiling, it is very possible that you want to go back to a previous version. &lt;br /&gt;
If so, then it is neat to have a directory which will store all previous builds, without the need for you to manually copy and paste every time.&lt;br /&gt;
Make sure you add these directives in last (after adding resources) as they might not be included in the copied result.&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=md &amp;quot;%scriptdir%\Versions\%fileversion%&amp;quot;&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=copy &amp;quot;%in%&amp;quot; &amp;quot;%scriptdir%\Versions\%fileversion%\%scriptfile%%fileversion%.au3&amp;quot;&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=copy &amp;quot;%out%&amp;quot; &amp;quot;%scriptdir%\Versions\%fileversion%\%scriptfile%%fileversion%.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Using ResHacker ===&lt;br /&gt;
&lt;br /&gt;
ResHacker is a very important programming tool for extracting and adding resources into executables. &lt;br /&gt;
It has a very simple command line interface that allows it to be used easily using the &amp;quot;Run_After&amp;quot; directive. &lt;br /&gt;
Adding a picture to an executable could be done like this:&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=ResHacker.exe -add %out%, %out%, MyPicture.bmp, BITMAP, RESOURCENAME, 0&lt;br /&gt;
&lt;br /&gt;
NB: Reshacker.exe &#039;&#039;must&#039;&#039; be copied into the script directory for this to work.&lt;br /&gt;
&lt;br /&gt;
If you then want to use the resources in your code, there is an excellent [http://www.AutoItscript.com/forum/index.php?showtopic=51103 Resources UDF] which will allow you to access the resources from within the exe.&lt;br /&gt;
&lt;br /&gt;
==== Adding Original Source Code ====&lt;br /&gt;
&lt;br /&gt;
When using the above tip on stripping excess code, the new source is not readable. &lt;br /&gt;
As a result, using the standard directive for saving the source:&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Res_SaveSource=y&lt;br /&gt;
&lt;br /&gt;
Would add the obfuscated code to the exe, which is not the desired result. &lt;br /&gt;
The solution is to add it in manually. &lt;br /&gt;
This code does not require any editing, so you can just copy and paste it in:&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=ResHacker.exe -add %out%, %out%, %scriptfile%.au3, RCDATA, SOURCE, 0&lt;br /&gt;
 &lt;br /&gt;
==== Extended Reshacker Info ====&lt;br /&gt;
&lt;br /&gt;
ResHacker doesn&#039;t always return with a return code (rc) of not 0 if it fails, to get that info you need to read the ResHacker.log file that is created. This is also pretty simple to do:&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=ResHacker.exe -add %out%, %out%, MyPicture.bmp, BITMAP, RESOURCENAME, 0&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=TYPE ResHacker.log&lt;br /&gt;
&lt;br /&gt;
The new output now looks like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;Running:ResHacker.exe -add C:\MyScript.exe, C:\MyScript.exe, MyPicture.bmp, BITMAP, RESOURCENAME, 0&lt;br /&gt;
 &amp;gt;ResHacker.exe -add C:\MyScript.exe, C:\MyScript.exe, MyPicture.bmp, BITMAP, RESOURCENAME, 0 Ended   rc:0&lt;br /&gt;
 &amp;gt;Running:TYPE ResHacker.log&lt;br /&gt;
 [19 Jan 2010, 21:26:22]&lt;br /&gt;
 ResHacker.exe  -add C:\MyScript.exe, C:\MyScript.exe, MyPicture.bmp, BITMAP, RESOURCENAME, 0&lt;br /&gt;
  Added: BITMAP,RESOURCENAME,0&lt;br /&gt;
 &lt;br /&gt;
 Commands completed&lt;br /&gt;
 &amp;gt;TYPE ResHacker.log Ended   rc:0&lt;br /&gt;
&lt;br /&gt;
And an example of it showing an error:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;ResHacker.exe -add C:\MyScript.exe, C:\MyScript.exe, MyPicture.bmp, BITMAP, RESOURCENAME, 0 Ended   rc:0&lt;br /&gt;
 &amp;gt;Running:TYPE ResHacker.log&lt;br /&gt;
 [19 Jan 2010, 21:32:10]&lt;br /&gt;
 ResHacker.exe  -add C:\MyScript.exe, C:\MyScript.exe, MyPicture.bmp, BITMAP, RESOURCENAME, 0&lt;br /&gt;
 Error: &amp;quot;MyPicture.bmp&amp;quot; does not exist&lt;br /&gt;
 &amp;gt;TYPE ResHacker.log Ended   rc:0&lt;br /&gt;
&lt;br /&gt;
As you can see, Reshacker on its own returns rc: 0, usually indicating no error. This would have gone completely unnoticed except for the log file, which shows the error and an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Other Run_After and Run_Before Commands ===&lt;br /&gt;
&lt;br /&gt;
You can use any commands you like in the Run_After and Run_Before directives. Examples such as &amp;quot;TYPE&amp;quot; have been shown above. &lt;br /&gt;
&lt;br /&gt;
For a more complete list the following website is very useful: [http://ss64.com/nt An A-Z Index of the Windows CMD Line]&lt;br /&gt;
&lt;br /&gt;
== Other Wiki Pages ==&lt;br /&gt;
&lt;br /&gt;
[[Adding_utilities_to_the_SciTE_Tools_menu|Adding Utilities to the SciTE Tools Menu]]&lt;br /&gt;
&lt;br /&gt;
[[Adding_UDFs_to_AutoIt_and_SciTE|Adding UDFs to AutoIt and SciTE]]&lt;br /&gt;
&lt;br /&gt;
== Useful Lua links and scripts ==&lt;br /&gt;
&lt;br /&gt;
[http://www.scintilla.org/SciTELua.html SciTELua]&lt;br /&gt;
&lt;br /&gt;
[http://www.lua.org Lua Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.lua.org/pil/1.html Programming in Lua]&lt;br /&gt;
&lt;br /&gt;
[http://lua-users.org/wiki/ lua-users wiki]&lt;br /&gt;
&lt;br /&gt;
[http://lua-users.org/wiki/SciTEScripts SciTEScripts]&lt;br /&gt;
&lt;br /&gt;
[http://lua-users.org/wiki/SampleCode SampleCode]&lt;br /&gt;
&lt;br /&gt;
[http://www.AutoItscript.com/forum/topic/140881-mouse-hover-call-tips-update-03182013/ AutoIt3 Forum: MouseHoverCallTips]&lt;br /&gt;
&lt;br /&gt;
[http://www.AutoItscript.com/forum/topic/152960-SciTE-lua-tool-to-make-string-variable-from-selected-text/ AutoIt3 Forum: SciTE lua Tool To Make String Variable From Selected Text]&lt;br /&gt;
&lt;br /&gt;
[[Category:SciTE]]&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=SciTE4AutoIt3&amp;diff=12436</id>
		<title>SciTE4AutoIt3</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=SciTE4AutoIt3&amp;diff=12436"/>
		<updated>2014-06-11T14:01:01Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: /* Selection Highlighting */  Added note about using SciTEConfig to alter selection highlighting settings.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SciTE4AutoIt3&#039;&#039;&#039; is a specialist editor package based on the excellent [http://www.scintilla.org/SciTE.html SciTE] editor.  &lt;br /&gt;
SciTE has been set up to compile AutoIt scripts and has been extended with a multitude of Lua scripts.  &lt;br /&gt;
SciTE4AutoIt3 may be downloaded here: [http://www.AutoItscript.com/site/AutoIt-script-editor/ SciTE4AutoIt3].&lt;br /&gt;
Keep in mind that SciTE4AutoIt3 is not an official package.&lt;br /&gt;
Direct any bug reports or feature requests to the AutoIt3 forum and not the bug tracker.&lt;br /&gt;
&lt;br /&gt;
== Syntax Highlighting ==&lt;br /&gt;
&lt;br /&gt;
[[File:Syntax_Highlighting.JPG|right|A demonstration of syntax highlighting using the default theme.]]&lt;br /&gt;
&lt;br /&gt;
SciTE4AutoIt3 comes with a customized AutoIt3 lexer which enables syntax highlighting.&lt;br /&gt;
Syntax highlighting enables the colorization of various code elements such as variables, strings, operators, comments etc.&lt;br /&gt;
Syntax highlighting allows one to differentiate the various code elements such as keywords, variables, strings, control flow structures etc. quickly without having to specifically identify the element.&lt;br /&gt;
To load a custom theme a user may press [Ctrl] + [1] to bring up [[SciTEConfig]].&lt;br /&gt;
When the &#039;&#039;Color Settings&#039;&#039; tab is selected a button labeled &#039;New Scheme&#039; will appear at the bottom. &lt;br /&gt;
Alternatively, the colors may be customized individually.&lt;br /&gt;
&lt;br /&gt;
Some options that are available for customization include: White Space, Comment Line, Comment Block, Number, Function, Keyword, Macro and String.&lt;br /&gt;
&lt;br /&gt;
== Quick Tips ==&lt;br /&gt;
&lt;br /&gt;
For anyone not familiar with SciTE, here are a few tips and tricks to help easily customize the installation. &lt;br /&gt;
For any advanced info, visit the [http://www.scintilla.org/SciTEDoc.html SciTE home page].&lt;br /&gt;
&lt;br /&gt;
=== Help Files ===&lt;br /&gt;
&lt;br /&gt;
To access the AutoIt3 helpfile the user may press [F1].  &lt;br /&gt;
To quickly access help information on a specific function, simply click or highlight the desired function and press the [F1] key to bring up the help file on the relevant page.&lt;br /&gt;
To access the SciTE4AutoIt3 helpfile the user may press [ctrl] + [F1].&lt;br /&gt;
For SciTE related help, use the key combination [Ctrl] + [F1] to bring up a help file detailing SciTE related help documentation.&lt;br /&gt;
&lt;br /&gt;
=== Properties Files ===&lt;br /&gt;
&lt;br /&gt;
Minor editing of SciTE&#039;s configuration files will be required to make use of the information in this section.&lt;br /&gt;
It is important to be familiar with the hierarchy of SciTE&#039;s configuration files.&lt;br /&gt;
&lt;br /&gt;
There are four properties files used:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| SciTE.properties || Local properties file which may be present in the same directory as the file being edited. This file overrides any other properties files settings below. This file is user created.&lt;br /&gt;
|-&lt;br /&gt;
| SciTEDirectory.properties || Directory properties file which may be present in the same or in a parent directory as the file being edited.&lt;br /&gt;
This file overrides all properties setting of the files below, but not the local properties settings aka &#039;&#039;SciTE.properties&#039;&#039;. &lt;br /&gt;
This file is user created.&lt;br /&gt;
|-&lt;br /&gt;
| SciTEUser.properties || User properties file, this file&#039;s settings override only the global properties settings aka &#039;&#039;SciTEGlobal.properties&#039;&#039;.&lt;br /&gt;
This file is found under the current logged on users profile directory.&lt;br /&gt;
|-&lt;br /&gt;
| SciTEGlobal.properties || All settings in this file can be overridden by any of the above files. &lt;br /&gt;
Typically this file should not be edited. &lt;br /&gt;
Use any of the above methods to implement a setting change.&lt;br /&gt;
This file can be found in SciTE&#039;s installation directory.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Inline Errors ===&lt;br /&gt;
&lt;br /&gt;
[[File:InlineError.JPG|234px|thumb|right|Intentional error prone code used to display the &amp;quot;Inline Error&amp;quot; feature.]]&lt;br /&gt;
&lt;br /&gt;
In the latest version of SciTE, there exists a new feature called &amp;quot;Inline Errors&amp;quot;.  &lt;br /&gt;
Inline Error marks are error messages that will appear in the source code within the Scintilla window.&lt;br /&gt;
Inline errors may be quickly toggled using &#039;&#039;SciTEUser.properties&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Open the SciTE user properties file in a text editor by selecting from the SciTE menu &#039;&#039;Options&#039;&#039;.  &lt;br /&gt;
Open &#039;&#039;User Options File&#039;&#039; and add the following code to the file.&lt;br /&gt;
&lt;br /&gt;
To disable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;properties&amp;quot;&amp;gt;error.inline=0&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To enable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;properties&amp;quot;&amp;gt;error.inline=1&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Selection Highlighting ===&lt;br /&gt;
&lt;br /&gt;
Selection highlighting is a new feature which highlights other instances of the currently highlighted word or string.  &lt;br /&gt;
Due to the colors, sometimes it is hard to tell the selection apart.&lt;br /&gt;
The default colors may be changed.&lt;br /&gt;
&lt;br /&gt;
The feature may be toggled and customized by using SciTEConfig.&lt;br /&gt;
&lt;br /&gt;
=== Colors in the Output Pane ===&lt;br /&gt;
&lt;br /&gt;
SciTE has a console window which can be used to output information from running scripts.  &lt;br /&gt;
The function {{Help File|ConsoleWrite}} may be used in an AutoIt script to output text to the console.  &lt;br /&gt;
The colors of the text may be altered by prepending a string with special characters.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;AutoIt&amp;quot;&amp;gt;&lt;br /&gt;
ConsoleWrite(&amp;quot;This is plain text&amp;quot; &amp;amp; @LF)&lt;br /&gt;
ConsoleWrite(&amp;quot;&amp;gt; This text will have a different color.&amp;quot; &amp;amp; @LF)&lt;br /&gt;
ConsoleWrite(&amp;quot;+ This text will have a different color.&amp;quot; &amp;amp; @LF)&lt;br /&gt;
ConsoleWrite(&amp;quot;- This text will have a different color.&amp;quot; &amp;amp; @LF)&lt;br /&gt;
ConsoleWrite(&amp;quot;! This text will have a different color.&amp;quot; &amp;amp; @LF)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AutoIt3Wrapper ==&lt;br /&gt;
&lt;br /&gt;
AutoIt3Wrapper directives allow for in depth control of the compilation and interpretation of AutoIt scripts.  &lt;br /&gt;
Some of these can be very useful under different circumstances.&lt;br /&gt;
See [[AutoIt3Wrapper Directives]] for a full list of directives and their descriptions.&lt;br /&gt;
&lt;br /&gt;
== Au3Stripper ==&lt;br /&gt;
&lt;br /&gt;
[[Au3Stripper]] may be used to strip away unused [[Function|functions]] and [[Global|global]] [[Variable|variables]] from the script prior to compilation.  &lt;br /&gt;
Functions and variables may be renamed to shorter three character names to save space and to provide some measure of obscurity.  &lt;br /&gt;
&lt;br /&gt;
=== Stripping Excess Code ===&lt;br /&gt;
&lt;br /&gt;
For instance, in a script that has several includes Au3Stripper can often strip thousands of lines from the script.&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_Au3Stripper=y&lt;br /&gt;
 #Au3Stripper_Parameters=/sf /sv /rm&lt;br /&gt;
&lt;br /&gt;
On a medium sized script, results are often like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;Running Au3Stripper (1.2.0.6)  from:C:\Program Files\AutoIt3\SciTE cmdline:&lt;br /&gt;
 - Iteration 1 Strip Functions result: Output  2580 lines and stripped 6741 lines&lt;br /&gt;
 - Iteration 2 Strip Variables result: Output  1585 lines and stripped 950 lines&lt;br /&gt;
 - Iteration 3 Strip Variables result: Output  1566 lines and stripped 19 lines&lt;br /&gt;
 - Iteration 4 Start the actual Obfuscation.&lt;br /&gt;
 +&amp;gt; Source    26190 lines 1447980 Characters.&lt;br /&gt;
 +&amp;gt; Stripped  7710 Func/Var lines and  16862 comment lines, Total 1373871 Characters.&lt;br /&gt;
 +&amp;gt; Saved     93% lines 94% Characters.&lt;br /&gt;
 +&amp;gt; Au3Stripper v1.0.27.0 finished obfuscating 1566 lines, created:C:\MyScript_stripped.au3&lt;br /&gt;
&lt;br /&gt;
== Run_After and Run_Before Commands ==&lt;br /&gt;
&lt;br /&gt;
=== Running the exe On Build ===&lt;br /&gt;
&lt;br /&gt;
Often a build is performed as a testing procedure and so to have to continually open up Windows Explorer to find the exe is repetitive. &lt;br /&gt;
Furthermore, if the script writes to the console using the function {{Help File|ConsoleWrite}} then the messages will not be written to SciTE&#039;s console pane.  The solution is simple:&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=&amp;quot;%out%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This will run the program and read the console output to the SciTE debug frame.&lt;br /&gt;
&lt;br /&gt;
=== Creating a Version Directory ===&lt;br /&gt;
&lt;br /&gt;
When compiling, it is very possible that you want to go back to a previous version. &lt;br /&gt;
If so, then it is neat to have a directory which will store all previous builds, without the need for you to manually copy and paste every time.&lt;br /&gt;
Make sure you add these directives in last (after adding resources) as they might not be included in the copied result.&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=md &amp;quot;%scriptdir%\Versions\%fileversion%&amp;quot;&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=copy &amp;quot;%in%&amp;quot; &amp;quot;%scriptdir%\Versions\%fileversion%\%scriptfile%%fileversion%.au3&amp;quot;&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=copy &amp;quot;%out%&amp;quot; &amp;quot;%scriptdir%\Versions\%fileversion%\%scriptfile%%fileversion%.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Using ResHacker ===&lt;br /&gt;
&lt;br /&gt;
ResHacker is a very important programming tool for extracting and adding resources into executables. &lt;br /&gt;
It has a very simple command line interface that allows it to be used easily using the &amp;quot;Run_After&amp;quot; directive. &lt;br /&gt;
Adding a picture to an executable could be done like this:&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=ResHacker.exe -add %out%, %out%, MyPicture.bmp, BITMAP, RESOURCENAME, 0&lt;br /&gt;
&lt;br /&gt;
NB: Reshacker.exe &#039;&#039;must&#039;&#039; be copied into the script directory for this to work.&lt;br /&gt;
&lt;br /&gt;
If you then want to use the resources in your code, there is an excellent [http://www.AutoItscript.com/forum/index.php?showtopic=51103 Resources UDF] which will allow you to access the resources from within the exe.&lt;br /&gt;
&lt;br /&gt;
==== Adding Original Source Code ====&lt;br /&gt;
&lt;br /&gt;
When using the above tip on stripping excess code, the new source is not readable. &lt;br /&gt;
As a result, using the standard directive for saving the source:&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Res_SaveSource=y&lt;br /&gt;
&lt;br /&gt;
Would add the obfuscated code to the exe, which is not the desired result. &lt;br /&gt;
The solution is to add it in manually. &lt;br /&gt;
This code does not require any editing, so you can just copy and paste it in:&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=ResHacker.exe -add %out%, %out%, %scriptfile%.au3, RCDATA, SOURCE, 0&lt;br /&gt;
 &lt;br /&gt;
==== Extended Reshacker Info ====&lt;br /&gt;
&lt;br /&gt;
ResHacker doesn&#039;t always return with a return code (rc) of not 0 if it fails, to get that info you need to read the ResHacker.log file that is created. This is also pretty simple to do:&lt;br /&gt;
&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=ResHacker.exe -add %out%, %out%, MyPicture.bmp, BITMAP, RESOURCENAME, 0&lt;br /&gt;
 #AutoIt3Wrapper_Run_After=TYPE ResHacker.log&lt;br /&gt;
&lt;br /&gt;
The new output now looks like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;Running:ResHacker.exe -add C:\MyScript.exe, C:\MyScript.exe, MyPicture.bmp, BITMAP, RESOURCENAME, 0&lt;br /&gt;
 &amp;gt;ResHacker.exe -add C:\MyScript.exe, C:\MyScript.exe, MyPicture.bmp, BITMAP, RESOURCENAME, 0 Ended   rc:0&lt;br /&gt;
 &amp;gt;Running:TYPE ResHacker.log&lt;br /&gt;
 [19 Jan 2010, 21:26:22]&lt;br /&gt;
 ResHacker.exe  -add C:\MyScript.exe, C:\MyScript.exe, MyPicture.bmp, BITMAP, RESOURCENAME, 0&lt;br /&gt;
  Added: BITMAP,RESOURCENAME,0&lt;br /&gt;
 &lt;br /&gt;
 Commands completed&lt;br /&gt;
 &amp;gt;TYPE ResHacker.log Ended   rc:0&lt;br /&gt;
&lt;br /&gt;
And an example of it showing an error:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;ResHacker.exe -add C:\MyScript.exe, C:\MyScript.exe, MyPicture.bmp, BITMAP, RESOURCENAME, 0 Ended   rc:0&lt;br /&gt;
 &amp;gt;Running:TYPE ResHacker.log&lt;br /&gt;
 [19 Jan 2010, 21:32:10]&lt;br /&gt;
 ResHacker.exe  -add C:\MyScript.exe, C:\MyScript.exe, MyPicture.bmp, BITMAP, RESOURCENAME, 0&lt;br /&gt;
 Error: &amp;quot;MyPicture.bmp&amp;quot; does not exist&lt;br /&gt;
 &amp;gt;TYPE ResHacker.log Ended   rc:0&lt;br /&gt;
&lt;br /&gt;
As you can see, Reshacker on its own returns rc: 0, usually indicating no error. This would have gone completely unnoticed except for the log file, which shows the error and an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Other Run_After and Run_Before Commands ===&lt;br /&gt;
&lt;br /&gt;
You can use any commands you like in the Run_After and Run_Before directives. Examples such as &amp;quot;TYPE&amp;quot; have been shown above. &lt;br /&gt;
&lt;br /&gt;
For a more complete list the following website is very useful: [http://ss64.com/nt An A-Z Index of the Windows CMD Line]&lt;br /&gt;
&lt;br /&gt;
== Other Wiki Pages ==&lt;br /&gt;
&lt;br /&gt;
[[Adding_utilities_to_the_SciTE_Tools_menu|Adding Utilities to the SciTE Tools Menu]]&lt;br /&gt;
&lt;br /&gt;
[[Adding_UDFs_to_AutoIt_and_SciTE|Adding UDFs to AutoIt and SciTE]]&lt;br /&gt;
&lt;br /&gt;
== Useful Lua links and scripts ==&lt;br /&gt;
&lt;br /&gt;
[http://www.scintilla.org/SciTELua.html SciTELua]&lt;br /&gt;
&lt;br /&gt;
[http://www.lua.org Lua Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.lua.org/pil/1.html Programming in Lua]&lt;br /&gt;
&lt;br /&gt;
[http://lua-users.org/wiki/ lua-users wiki]&lt;br /&gt;
&lt;br /&gt;
[http://lua-users.org/wiki/SciTEScripts SciTEScripts]&lt;br /&gt;
&lt;br /&gt;
[http://lua-users.org/wiki/SampleCode SampleCode]&lt;br /&gt;
&lt;br /&gt;
[http://www.AutoItscript.com/forum/topic/140881-mouse-hover-call-tips-update-03182013/ AutoIt3 Forum: MouseHoverCallTips]&lt;br /&gt;
&lt;br /&gt;
[http://www.AutoItscript.com/forum/topic/152960-SciTE-lua-tool-to-make-string-variable-from-selected-text/ AutoIt3 Forum: SciTE lua Tool To Make String Variable From Selected Text]&lt;br /&gt;
&lt;br /&gt;
[[Category:SciTE]]&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoIt3Wrapper_Directives&amp;diff=12435</id>
		<title>AutoIt3Wrapper Directives</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoIt3Wrapper_Directives&amp;diff=12435"/>
		<updated>2014-06-11T13:57:07Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: Added AU3Stripper section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== List of AutoIt3Wrapper Directives ==&lt;br /&gt;
&lt;br /&gt;
This is a list of compiler directives used by AutoIt3Wrapper.exe and their descriptions.&lt;br /&gt;
&lt;br /&gt;
== AutoIt3 ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
| #AutoIt3Wrapper_testing || (Y/N) || Skip Tidy, Obfuscator and cvsWrapper for speed while testing. || N &lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_UseX64 || (Y/N) || Use X64 versions for AutoIt3_x64 or AUT2EXE_x64. || N&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Version || (B/P) || Use Beta or Production for AutoIt3 and AUT2EXE. || P&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Run_Debug_Mode || (Y/N) || Run Script with console debugging. || N&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Run_SciTE_Minimized || (Y/N) || Minimize SciTE while script is running. || N&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Run_SciTE_OutputPane_Minimized || (Y/N) || Toggle SciTE output pane at run time so its not shown. || N&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Autoit3Dir || || Optionally override the base AutoIt3 install directory. || &lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Aut2exe || || Optionally override the Aut2exe.exe to use for this script || &lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_AutoIt3 || || Optionally override the Autoit3.exe to use for this script || &lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Add_Constants || || Add the needed standard constant include files. Will only run one time. || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== AUT2EXE ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Icon || || Filename of the Ico file to use ||&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_OutFile || || Target exe/a3x filename. ||&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_OutFile_Type || || a3x=small AutoIt3 file exe=Standalone executable || exe&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_OutFile_X64 || || Target exe filename for X64 compile. ||&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Compression || || Compression parameter 0-40=Low 2=normal 4=High. || 2&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_UseUpx || (Y/N) || Compress output program. || Y&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_UPX_Parameters || || Override the default setting for UPX. ||&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Change2CUI || (Y/N) || Change output program to CUI in stead of GUI. || N&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Compile_both || (Y/N) || Compile both X86 and X64 in one run. || N&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Target Program Resource Info ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_Comment || || Comment field || &lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_Description|| ||  Description field || &lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_Fileversion || || File Version || &lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_FileVersion_AutoIncrement || (Y/N/P) || AutoIncrement FileVersion After AUTEXE is finished. P=Prompt, Will ask at compilation time if you want to increase the version number || N&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_ProductVersion || || Product Version. || Default is the AutoIt3 version used.&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_Language || || Resource Language code. || 2057 which is English (United Kingdom)&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_LegalCopyright || || Copyright field || &lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_res_requestedExecutionLevel || || asInvoker, highestAvailable, requireAdministrator or None (remove the trustInfo section). || Default is the setting from AUT2EXE - asInvoker.&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_res_Compatibility || || Vista, Windows7 both allowed separated by a comma. ||  None&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Res_SaveSource || (Y/N) || Save a copy of the script source in the EXE resources.  If Y then the content of the script source depends on the #AutoIt3Wrapper_Run_Obfuscator and #obfuscator_parameters directives. || N&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Add Extra Files to The Resources ===&lt;br /&gt;
&lt;br /&gt;
A maximum of fifteen free form resource fields.The following variables are available:&lt;br /&gt;
&lt;br /&gt;
%AutoItVer% = will be replaced with the version of AutoIt3&lt;br /&gt;
	&lt;br /&gt;
%date% = PC date in short date format&lt;br /&gt;
&lt;br /&gt;
%longdate% = PC date in long date format&lt;br /&gt;
&lt;br /&gt;
%time% = PC timeformat&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
  #AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%&lt;br /&gt;
  #AutoIt3Wrapper_Res_Field=Free format fieldname|fieldvalue&lt;br /&gt;
  #AutoIt3Wrapper_Res_Field=Free format fieldname|fieldvalue&lt;br /&gt;
  #AutoIt3Wrapper_Res_Field=Free format fieldname|fieldvalue&lt;br /&gt;
&lt;br /&gt;
Add extra ICO files to the resources which can be used with TraySetIcon(@ScriptFullPath, 5) etc.&lt;br /&gt;
&lt;br /&gt;
list of filename of the Ico files to be added, First one will have number 5, then 6 etc.&lt;br /&gt;
&lt;br /&gt;
  #AutoIt3Wrapper_Res_Icon_AddFilename[,LanguageCode] of ICO to be added.&lt;br /&gt;
&lt;br /&gt;
  #AutoIt3Wrapper_Res_File_AddFilename[,Section [,ResName[,LanguageCode]]] to be added.&lt;br /&gt;
&lt;br /&gt;
== Tidy ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Run_Tidy || (Y/N)||  Run Tidy before compilation. || N&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Tidy_Stop_OnError || (Y/N) || Continue when only Warnings. || Y&lt;br /&gt;
|-&lt;br /&gt;
|  #Tidy_Parameters || || See the SciTE4AutoIt3 helpfile for options. ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== AU3Stripper ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
| PreExpand ||  || Replace and reference to a Global Const variable with its actual value. || &lt;br /&gt;
|-&lt;br /&gt;
| StripOnly || (SF/SV) ||  || SV = 1&lt;br /&gt;
|-&lt;br /&gt;
| StripUnusedFunc ||  || Remove unused Funcs. || 0&lt;br /&gt;
|-&lt;br /&gt;
| StripUnusedVars ||  || Remove unused Global variable declarations. || 0&lt;br /&gt;
|-&lt;br /&gt;
| StripOnlyIncludes ||  || Same as /SO but leaves the main script untouched. ||&lt;br /&gt;
|-&lt;br /&gt;
| MergeOnly ||  || Will produce a scriptfile as AUT2EXE includes in the Compiled EXE. This allows you to find the proper linenumber when errors are reported. ||&lt;br /&gt;
|-&lt;br /&gt;
| RenameMinimum ||  || Generates a much smaller file by substituting function and variable names with unique 2+-character names. ||&lt;br /&gt;
|-&lt;br /&gt;
| ShowConsoleInfo || (0/1/9) || 0 = Minimal output to the console - only warnings and errors. 1 = Show more progress information 9 = Show all debug lines as found in the Au3Stripper.log. || 0&lt;br /&gt;
|-&lt;br /&gt;
| Beta ||  || Use the ...\AutoIt\Beta\Include files if installed. ||&lt;br /&gt;
|}     &lt;br /&gt;
&lt;br /&gt;
The directives used within the script to control Au3Stripper are as follows:&lt;br /&gt;
&lt;br /&gt;
#AutoIt3Wrapper_Run_Au3Stripper=y    Run Au3Stripper before compilation (Default=n) &lt;br /&gt;
#Au3Stripper_Parameters=             Use the parameters as listed above &lt;br /&gt;
#Au3Stripper_Off                     Stop the Stripping process below this line &lt;br /&gt;
#Au3Stripper_On                      Start the Stripping process below this line &lt;br /&gt;
#Au3Stripper_Ignore_Funcs=           Do not Strip these functions &lt;br /&gt;
#Au3Stripper_Ignore_Variables=       Do not Strip these variables &lt;br /&gt;
&lt;br /&gt;
== AU3Check ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Run_AU3Check || (Y/N) || Run au3check before compilation. || Y&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_AU3Check_Parameters || || Au3Check parameters ||&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_AU3Check_Stop_OnWarning || (Y/N) || N=Continue on Warnings. || Y (Always stop on warnings.)&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_PlugIn_Funcs || || Define PlugIn function names separated by a comma to avoid AU3Check errors. ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
 | #AutoIt3Wrapper_Versioning || (Y/N/V) || Run versioning to update the script source. V=only run when fileversion is increased by #AutoIt3Wrapper_Res_FileVersion_AutoIncrement. || N&lt;br /&gt;
 |-&lt;br /&gt;
 | #AutoIt3Wrapper_Versioning_Parameters || || /NoPrompt: Will skip the Comments prompt /Comments: Text to added in the Comments. It can also contain the below variables. ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Run Before And After Directives ==&lt;br /&gt;
&lt;br /&gt;
The following directives can contain: these variables&lt;br /&gt;
&lt;br /&gt;
%in% , %out%, %outx64%, %icon% which will be replaced by the fullpath\filename.&lt;br /&gt;
&lt;br /&gt;
%scriptdir% same as @ScriptDir and %scriptfile% = filename without extension.&lt;br /&gt;
&lt;br /&gt;
%fileversion% is the information from the #AutoIt3Wrapper_Res_Fileversion directive&lt;br /&gt;
&lt;br /&gt;
%scitedir% will be replaced by the SciTE program directory&lt;br /&gt;
&lt;br /&gt;
%autoitdir% will be replaced by the AutoIt3 program directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#AutoIt3Wrapper_Run_Before process to run before compilation.  &lt;br /&gt;
You can have multiple records that will be processed in sequence.&lt;br /&gt;
&lt;br /&gt;
#AutoIt3Wrapper_Run_After process to run after compilation.  &lt;br /&gt;
You can have multiple records that will be processed in sequence.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conditional Directives ==&lt;br /&gt;
&lt;br /&gt;
Optional use this format for the supported directives to have seperate directive values for Run and Compile.&lt;br /&gt;
	&lt;br /&gt;
The GUI is not available when this format is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#AutoIt3Wrapper_If_Run&lt;br /&gt;
 #AutoIt3Wrapper_Run_AU3Check=y&lt;br /&gt;
 #AutoIt3Wrapper_Jump_To_First_Error=y&lt;br /&gt;
 #AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6&lt;br /&gt;
 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=n&lt;br /&gt;
 #AutoIt3Wrapper_Run_Tidy=n&lt;br /&gt;
 #Tidy_Parameters=&lt;br /&gt;
 #AutoIt3Wrapper_Tidy_Stop_onerror=n&lt;br /&gt;
#AutoIt3Wrapper_If_Compile&lt;br /&gt;
 #AutoIt3Wrapper_Run_AU3Check=y&lt;br /&gt;
 #AutoIt3Wrapper_Jump_To_First_Error=y&lt;br /&gt;
 #AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6&lt;br /&gt;
 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y&lt;br /&gt;
 #AutoIt3Wrapper_Run_Tidy=y&lt;br /&gt;
 #Tidy_Parameters=/gd /nsdp&lt;br /&gt;
 #AutoIt3Wrapper_Tidy_Stop_onerror=y&lt;br /&gt;
#AutoIt3Wrapper_EndIf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoIt3Wrapper_Directives&amp;diff=12434</id>
		<title>AutoIt3Wrapper Directives</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoIt3Wrapper_Directives&amp;diff=12434"/>
		<updated>2014-06-11T13:47:33Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: Removed Obfuscator section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== List of AutoIt3Wrapper Directives ==&lt;br /&gt;
&lt;br /&gt;
This is a list of compiler directives used by AutoIt3Wrapper.exe and their descriptions.&lt;br /&gt;
&lt;br /&gt;
== AutoIt3 ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
| #AutoIt3Wrapper_testing || (Y/N) || Skip Tidy, Obfuscator and cvsWrapper for speed while testing. || N &lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_UseX64 || (Y/N) || Use X64 versions for AutoIt3_x64 or AUT2EXE_x64. || N&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Version || (B/P) || Use Beta or Production for AutoIt3 and AUT2EXE. || P&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Run_Debug_Mode || (Y/N) || Run Script with console debugging. || N&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Run_SciTE_Minimized || (Y/N) || Minimize SciTE while script is running. || N&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Run_SciTE_OutputPane_Minimized || (Y/N) || Toggle SciTE output pane at run time so its not shown. || N&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Autoit3Dir || || Optionally override the base AutoIt3 install directory. || &lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Aut2exe || || Optionally override the Aut2exe.exe to use for this script || &lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_AutoIt3 || || Optionally override the Autoit3.exe to use for this script || &lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Add_Constants || || Add the needed standard constant include files. Will only run one time. || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== AUT2EXE ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Icon || || Filename of the Ico file to use ||&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_OutFile || || Target exe/a3x filename. ||&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_OutFile_Type || || a3x=small AutoIt3 file exe=Standalone executable || exe&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_OutFile_X64 || || Target exe filename for X64 compile. ||&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Compression || || Compression parameter 0-40=Low 2=normal 4=High. || 2&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_UseUpx || (Y/N) || Compress output program. || Y&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_UPX_Parameters || || Override the default setting for UPX. ||&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Change2CUI || (Y/N) || Change output program to CUI in stead of GUI. || N&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Compile_both || (Y/N) || Compile both X86 and X64 in one run. || N&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Target Program Resource Info ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_Comment || || Comment field || &lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_Description|| ||  Description field || &lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_Fileversion || || File Version || &lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_FileVersion_AutoIncrement || (Y/N/P) || AutoIncrement FileVersion After AUTEXE is finished. P=Prompt, Will ask at compilation time if you want to increase the version number || N&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_ProductVersion || || Product Version. || Default is the AutoIt3 version used.&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_Language || || Resource Language code. || 2057 which is English (United Kingdom)&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Res_LegalCopyright || || Copyright field || &lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_res_requestedExecutionLevel || || asInvoker, highestAvailable, requireAdministrator or None (remove the trustInfo section). || Default is the setting from AUT2EXE - asInvoker.&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_res_Compatibility || || Vista, Windows7 both allowed separated by a comma. ||  None&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_Res_SaveSource || (Y/N) || Save a copy of the script source in the EXE resources.  If Y then the content of the script source depends on the #AutoIt3Wrapper_Run_Obfuscator and #obfuscator_parameters directives. || N&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Add Extra Files to The Resources ===&lt;br /&gt;
&lt;br /&gt;
A maximum of fifteen free form resource fields.The following variables are available:&lt;br /&gt;
&lt;br /&gt;
%AutoItVer% = will be replaced with the version of AutoIt3&lt;br /&gt;
	&lt;br /&gt;
%date% = PC date in short date format&lt;br /&gt;
&lt;br /&gt;
%longdate% = PC date in long date format&lt;br /&gt;
&lt;br /&gt;
%time% = PC timeformat&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
  #AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%&lt;br /&gt;
  #AutoIt3Wrapper_Res_Field=Free format fieldname|fieldvalue&lt;br /&gt;
  #AutoIt3Wrapper_Res_Field=Free format fieldname|fieldvalue&lt;br /&gt;
  #AutoIt3Wrapper_Res_Field=Free format fieldname|fieldvalue&lt;br /&gt;
&lt;br /&gt;
Add extra ICO files to the resources which can be used with TraySetIcon(@ScriptFullPath, 5) etc.&lt;br /&gt;
&lt;br /&gt;
list of filename of the Ico files to be added, First one will have number 5, then 6 etc.&lt;br /&gt;
&lt;br /&gt;
  #AutoIt3Wrapper_Res_Icon_AddFilename[,LanguageCode] of ICO to be added.&lt;br /&gt;
&lt;br /&gt;
  #AutoIt3Wrapper_Res_File_AddFilename[,Section [,ResName[,LanguageCode]]] to be added.&lt;br /&gt;
&lt;br /&gt;
== Tidy ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Run_Tidy || (Y/N)||  Run Tidy before compilation. || N&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Tidy_Stop_OnError || (Y/N) || Continue when only Warnings. || Y&lt;br /&gt;
|-&lt;br /&gt;
|  #Tidy_Parameters || || See the SciTE4AutoIt3 helpfile for options. ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== AU3Check ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_Run_AU3Check || (Y/N) || Run au3check before compilation. || Y&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_AU3Check_Parameters || || Au3Check parameters ||&lt;br /&gt;
|-&lt;br /&gt;
|   #AutoIt3Wrapper_AU3Check_Stop_OnWarning || (Y/N) || N=Continue on Warnings. || Y (Always stop on warnings.)&lt;br /&gt;
|-&lt;br /&gt;
|  #AutoIt3Wrapper_PlugIn_Funcs || || Define PlugIn function names separated by a comma to avoid AU3Check errors. ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Directive &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Options &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Description &lt;br /&gt;
!! scope=&amp;quot;col&amp;quot; | Default&lt;br /&gt;
|-&lt;br /&gt;
 | #AutoIt3Wrapper_Versioning || (Y/N/V) || Run versioning to update the script source. V=only run when fileversion is increased by #AutoIt3Wrapper_Res_FileVersion_AutoIncrement. || N&lt;br /&gt;
 |-&lt;br /&gt;
 | #AutoIt3Wrapper_Versioning_Parameters || || /NoPrompt: Will skip the Comments prompt /Comments: Text to added in the Comments. It can also contain the below variables. ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Run Before And After Directives ==&lt;br /&gt;
&lt;br /&gt;
The following directives can contain: these variables&lt;br /&gt;
&lt;br /&gt;
%in% , %out%, %outx64%, %icon% which will be replaced by the fullpath\filename.&lt;br /&gt;
&lt;br /&gt;
%scriptdir% same as @ScriptDir and %scriptfile% = filename without extension.&lt;br /&gt;
&lt;br /&gt;
%fileversion% is the information from the #AutoIt3Wrapper_Res_Fileversion directive&lt;br /&gt;
&lt;br /&gt;
%scitedir% will be replaced by the SciTE program directory&lt;br /&gt;
&lt;br /&gt;
%autoitdir% will be replaced by the AutoIt3 program directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#AutoIt3Wrapper_Run_Before process to run before compilation.  &lt;br /&gt;
You can have multiple records that will be processed in sequence.&lt;br /&gt;
&lt;br /&gt;
#AutoIt3Wrapper_Run_After process to run after compilation.  &lt;br /&gt;
You can have multiple records that will be processed in sequence.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conditional Directives ==&lt;br /&gt;
&lt;br /&gt;
Optional use this format for the supported directives to have seperate directive values for Run and Compile.&lt;br /&gt;
	&lt;br /&gt;
The GUI is not available when this format is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#AutoIt3Wrapper_If_Run&lt;br /&gt;
 #AutoIt3Wrapper_Run_AU3Check=y&lt;br /&gt;
 #AutoIt3Wrapper_Jump_To_First_Error=y&lt;br /&gt;
 #AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6&lt;br /&gt;
 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=n&lt;br /&gt;
 #AutoIt3Wrapper_Run_Tidy=n&lt;br /&gt;
 #Tidy_Parameters=&lt;br /&gt;
 #AutoIt3Wrapper_Tidy_Stop_onerror=n&lt;br /&gt;
#AutoIt3Wrapper_If_Compile&lt;br /&gt;
 #AutoIt3Wrapper_Run_AU3Check=y&lt;br /&gt;
 #AutoIt3Wrapper_Jump_To_First_Error=y&lt;br /&gt;
 #AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6&lt;br /&gt;
 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y&lt;br /&gt;
 #AutoIt3Wrapper_Run_Tidy=y&lt;br /&gt;
 #Tidy_Parameters=/gd /nsdp&lt;br /&gt;
 #AutoIt3Wrapper_Tidy_Stop_onerror=y&lt;br /&gt;
#AutoIt3Wrapper_EndIf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=GUICreate&amp;diff=11922</id>
		<title>GUICreate</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=GUICreate&amp;diff=11922"/>
		<updated>2013-08-27T10:33:17Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile or in my script. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039; or to my post if it is my script that is in error. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Create a GUI window.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:GUICreate ( &amp;quot;title&amp;quot; [, width [, height [, left = -1 [, top = -1 [, style = -1 [, exStyle = -1 [, parent = 0]]]]]]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| title || The title of the dialog box.&lt;br /&gt;
|-&lt;br /&gt;
| width || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The width of the window.&lt;br /&gt;
|-&lt;br /&gt;
| height || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The height of the window.&lt;br /&gt;
|-&lt;br /&gt;
| left || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The left side of the dialog box.  By default (-1), the window is centered. If defined, top must also be defined.&lt;br /&gt;
|-&lt;br /&gt;
| top || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The top of the dialog box. Default (-1) is centered&lt;br /&gt;
|-&lt;br /&gt;
| style || &#039;&#039;&#039;[optional]&#039;&#039;&#039; defines the style of the window. See [http://www.autoitscript.com/autoit3/docs/appendix/GUIStyles.htm GUI Control Styles Appendix].&lt;br /&gt;
&lt;br /&gt;
Use -1 for the default style which includes a combination of $WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU styles.&lt;br /&gt;
&lt;br /&gt;
Some styles are always included: $WS_CLIPSIBLINGS, and $WS_SYSMENU if $WS_MAXIMIZEBOX or $WS_SIZEBOX is specified.&lt;br /&gt;
|-&lt;br /&gt;
| exStyle || &#039;&#039;&#039;[optional]&#039;&#039;&#039; defines the extended style of the window. See the &#039;&#039;&#039;Extended Style Table&#039;&#039;&#039; below.&lt;br /&gt;
&lt;br /&gt;
Use -1 for the default, which is no extended styles.&lt;br /&gt;
&lt;br /&gt;
Forced styles: $WS_EX_WINDOWEDGE&lt;br /&gt;
|-&lt;br /&gt;
| parent || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The handle of another previously created window - this new window then becomes a child of that window.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| Success: || 	Returns a windows handle.&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	Returns 0 if the window cannot be created and sets @error to 1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
By default the dialog box is non sizable and non maximizable. So WS_SIZEBOX or WS_MAXIMIZEBOX can be used in the style parameter.&lt;br /&gt;
As defining only one style just set this style don&#039;t forget to combine it with default ones, i.e. just defining WS_SIZEBOX will not set WS_MINIMIZEBOX, WS_CAPTION, WS_POPUP, WS_SYSMENU. So the best method to define a resizeable window is to use WS_OVERLAPPEDWINDOW.&lt;br /&gt;
When using $WS_EX_MDICHILD the position is relative to client area of the parent window. With $WS_EX_LAYERED it is possible to have a transparent picture on a background picture defined in the parent window.&lt;br /&gt;
Adding $WS_CLIPCHILDREN style can avoid some flickering when resizing GUI containing Edit control for example.&lt;br /&gt;
You can enable window dragging for GUI without $WS_CAPTION by using $WS_EX_CONTROLPARENT in the exStyle parameter.&lt;br /&gt;
&lt;br /&gt;
To combine styles with the default style use &#039;&#039;&#039;[[BitOR]]&#039;&#039;&#039;($GUI_SS_DEFAULT_GUI, newstyle,...).&lt;br /&gt;
The size specified is the size of the client area of the window.  The border and title bar will make the window slightly larger than specified. Using menu controls will also change the windows height.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Extended Style table&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | Extended Style&lt;br /&gt;
! | result&lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_ACCEPTFILES || Allow an edit or input control within the created GUI window to receive filenames via drag and drop. The control must have also the $GUI_DROPACCEPTED state set by [[GUICtrlSetState]]. for other controls the drag&amp;amp;drop info  can be retrieved with @GUI_DragId, @GUI_DragFile, @GUI_DropId. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_APPWINDOW || Forces a top-level window onto the taskbar when the window is visible. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_CLIENTEDGE || Specifies that a window has a border with a sunken edge. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_CONTEXTHELP || Includes a question mark in the title bar of the window. Cannot be used with the WS_MAXIMIZEBOX or WS_MINIMIZEBOX. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_DLGMODALFRAME || Creates a window that has a double border; the window can, optionally, be created with a title bar by specifying the WS_CAPTION style in the style parameter. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_MDICHILD || Create a child window included in its parent window (simulation not real MDI). &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_OVERLAPPEDWINDOW || Combines the WS_EX_CLIENTEDGE and WS_EX_WINDOWEDGE styles. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_STATICEDGE || Creates a window with a three-dimensional border style intended to be used for items that do not accept user input. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_TOPMOST || Specifies that a window created with this style should be placed above all non-topmost windows and should stay above them, even when the window is deactivated. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_TRANSPARENT || The window appears transparent because the bits of underlying sibling windows have already been painted. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_TOOLWINDOW || Creates a tool window; that is, a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog box that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by typing ALT+SPACE. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_WINDOWEDGE || Specifies that a window has a border with a raised edge. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_LAYERED || Creates a layered window. Note that this cannot be used for child windows. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To use the values specified above you must #include &amp;lt;WindowsConstants.au3&amp;gt; in your script.&lt;br /&gt;
&lt;br /&gt;
Note: The handle returned from this function is a real windows handle, which means it can be used in the same way as the result of [[WinGetHandle]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
[[GUISetParameters...]], [[GUICtrlCreate...]], [[GUIGetMsg]], [[GUISwitch]], [[GUIGetStyle]], [[GUIDelete]], [[WinGetHandle]], [[GUICtrlSetDefBkColor]], [[GUICtrlSetDefColor]], [[GUIGetCursorInfo]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font style=&#039;color:#000080;&#039;&amp;gt;&#039;&#039;&#039;Example 1&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;GUIConstantsEx.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	; Create a GUI with various controls.&lt;br /&gt;
	Local $hGUI = GUICreate(&amp;quot;Example&amp;quot;)&lt;br /&gt;
	Local $iOK = GUICtrlCreateButton(&amp;quot;OK&amp;quot;, 310, 370, 85, 25)&lt;br /&gt;
&lt;br /&gt;
	; Display the GUI.&lt;br /&gt;
	GUISetState(@SW_SHOW, $hGUI)&lt;br /&gt;
&lt;br /&gt;
	While 1&lt;br /&gt;
		Switch GUIGetMsg()&lt;br /&gt;
			Case $GUI_EVENT_CLOSE, $iOK&lt;br /&gt;
				ExitLoop&lt;br /&gt;
&lt;br /&gt;
		EndSwitch&lt;br /&gt;
	WEnd&lt;br /&gt;
&lt;br /&gt;
	; Delete the previous GUI and all controls.&lt;br /&gt;
	GUIDelete($hGUI)&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;font style=&#039;color:#000080;&#039;&amp;gt;&#039;&#039;&#039;Example 2&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;GUIConstantsEx.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;WindowsConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	Local $sFilePath = &amp;quot;..\GUI\logo4.gif&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	; Create a GUI with various controls.&lt;br /&gt;
	Local $hGUI = GUICreate(&amp;quot;Example&amp;quot;, 400, 100)&lt;br /&gt;
	GUICtrlCreatePic(&amp;quot;..\GUI\msoobe.jpg&amp;quot;, 0, 0, 400, 100)&lt;br /&gt;
&lt;br /&gt;
	; Display the GUI.&lt;br /&gt;
	GUISetState(@SW_SHOW, $hGUI)&lt;br /&gt;
&lt;br /&gt;
	Local $hChild = GUICreate(&amp;quot;&amp;quot;, 169, 68, 20, 20, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $hGUI)&lt;br /&gt;
&lt;br /&gt;
	; Create a picture control with a transparent image.&lt;br /&gt;
	GUICtrlCreatePic($sFilePath, 0, 0, 169, 68)&lt;br /&gt;
&lt;br /&gt;
	; Display the child GUI.&lt;br /&gt;
	GUISetState(@SW_SHOW)&lt;br /&gt;
&lt;br /&gt;
	While 1&lt;br /&gt;
		Switch GUIGetMsg()&lt;br /&gt;
			Case $GUI_EVENT_CLOSE&lt;br /&gt;
				ExitLoop&lt;br /&gt;
&lt;br /&gt;
		EndSwitch&lt;br /&gt;
	WEnd&lt;br /&gt;
&lt;br /&gt;
	; Delete the previous GUIs and all controls.&lt;br /&gt;
	GUIDelete($hGUI)&lt;br /&gt;
	GUIDelete($hChild)&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=User:Jaberwocky6669/Sandbox&amp;diff=11921</id>
		<title>User:Jaberwocky6669/Sandbox</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=User:Jaberwocky6669/Sandbox&amp;diff=11921"/>
		<updated>2013-08-25T14:06:11Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: Created page with &amp;quot;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt; &amp;lt;!-- Not meant to be user editable. --&amp;gt; &amp;lt;!-- If there is an error here then that means that there is an error in the helpfile or in my script...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile or in my script. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039; or to my post if it is my script that is in error. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Retrieves text from the clipboard.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:ClipGet (  )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| Success: || 	Returns a string containing the text on the clipboard.&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	Sets @error to 1 if clipboard is empty&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
 | || to 2 if contains a non-text entry.&lt;br /&gt;
|-&lt;br /&gt;
 | || to 3 or 4 if cannot access the clipboard.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
When multiple selecting file/dir are stored in the clipboard, the filename/dirname are returned as texts separated by @LF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
[[ClipPut]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	; Retrieve the data stored in the clipboard.&lt;br /&gt;
	Local $sData = ClipGet()&lt;br /&gt;
&lt;br /&gt;
	; Display the data returned by ClipGet.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;The following data is stored in the clipboard: &amp;quot; &amp;amp; @CRLF &amp;amp; $sData)&lt;br /&gt;
&lt;br /&gt;
	; Add new data to the clipboard.&lt;br /&gt;
	ClipPut(&amp;quot;A new string added to the clipboard.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	; Retrieve the data stored in the clipboard.&lt;br /&gt;
	$sData = ClipGet()&lt;br /&gt;
&lt;br /&gt;
	; Display the data returned by ClipGet.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;The following data is now stored in the clipboard: &amp;quot; &amp;amp; @CRLF &amp;amp; $sData)&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11920</id>
		<title>AutoItSetOption</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11920"/>
		<updated>2013-08-25T12:41:58Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile or in my script. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039; or to my post if it is my script that is in error. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Changes the operation of various AutoIt functions/parameters.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:AutoItSetOption ( &amp;quot;option&amp;quot; [, param] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| option || The option to change. See Remarks.&lt;br /&gt;
|-&lt;br /&gt;
| param || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The value to assign to the option. The type and meaning vary by option. See remarks below. If the param is not provided, then the function just returns the value already assigned to the option. The keyword [http://www.autoitscript.com/autoit3/docs/keywords/Default.htm Default] can be used for the parameter to reset the option to its default value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| Success: || 	Returns the value of the previous setting for the option.&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	Sets @error to non-zero. Failure will occur if the parameters are invalid (such as an option that doesn&#039;t exist).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
You may use Opt as an alternative to [[AutoItSetOption]].&lt;br /&gt;
&lt;br /&gt;
Options are as follows:&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Option&#039;&#039;&#039; || &#039;&#039;&#039;Param&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || Sets the way coords are used in the caret functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
&lt;br /&gt;
0 = relative coords to the active window&lt;br /&gt;
&lt;br /&gt;
1 = absolute screen coordinates (default)&lt;br /&gt;
&lt;br /&gt;
2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || Changes how literal strings and % symbols are interpreted. By default strings are treated literally, this option allows you to use %environment% variables inside strings, e.g., &amp;quot;The temp directory is: %temp%&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
0 = do not expand environment variables (default)&lt;br /&gt;
&lt;br /&gt;
1 = expand environment variables&lt;br /&gt;
&lt;br /&gt;
Without this option the usual way would be: 	&amp;quot;The temp directory is: &amp;quot; &amp;amp; [[EnvGet]](&amp;quot;temp&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || Changes how literal strings and variable/macro ($ and @) symbols are interpreted. By default strings are treated literally, this option allows you to use variables and macros inside strings, e.g., &amp;quot;The value of var1 is $var1$&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
0 = do not expand variables (default)&lt;br /&gt;
&lt;br /&gt;
1 = expand variables (when in this mode and you want to use a literal $ or @ then double it up: &amp;quot;This is a single dollar $$ sign&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || When ESC is pressed on a GUI the $GUI_EVENT_CLOSE message is sent. This option toggles this behavior on and off.&lt;br /&gt;
&lt;br /&gt;
0 = Don&#039;t send the $GUI_EVENT_CLOSE message when ESC is pressed.&lt;br /&gt;
&lt;br /&gt;
1 = [[Send]] the $GUI_EVENT_CLOSE message when ESC is pressed (default).&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || Alters the position of a control defined by [[GUICtrlSetPos]].&lt;br /&gt;
&lt;br /&gt;
0 = relative position to the start of the last control (upper left corner).&lt;br /&gt;
&lt;br /&gt;
1 = absolute coordinates (default) still relative to the dialog box.&lt;br /&gt;
&lt;br /&gt;
2 = cell positioning relative to current cell. A -1 for left or top parameter don&#039;t increment the start.&lt;br /&gt;
&lt;br /&gt;
So next line is -1, offset; next cell is offset,-1; current cell is -1,-1.&lt;br /&gt;
&lt;br /&gt;
Obviously &amp;quot;offset&amp;quot; cannot be -1 which reserved to indicate the no increment. But if you can use a multiple of the width you choose to skip or go back.&lt;br /&gt;
|-&lt;br /&gt;
| GUIDataSeparatorChar || Define the character which delimits subitems in [[GUICtrlSetData]].&lt;br /&gt;
&lt;br /&gt;
The default character is &#039;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || Enable/disable OnEvent functions notifications.&lt;br /&gt;
&lt;br /&gt;
0 = (default) disable.&lt;br /&gt;
&lt;br /&gt;
1 = enable.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || Change default resizing for a control.&lt;br /&gt;
&lt;br /&gt;
0 = (default) keep default control resizing.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;1024 = any type of resizing see [[GUICtrlSetResizing]].&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || Change special event behavior or GUI function return values.&lt;br /&gt;
&lt;br /&gt;
0 = (default) Windows behavior on click on Minimize,Restore, Maximize, Resize.&lt;br /&gt;
&lt;br /&gt;
1 = suppress windows behavior on minimize, restore or maximize click button or window resize. Just sends the notification.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDelay || Alters the length of the brief pause in between mouse clicks.&lt;br /&gt;
&lt;br /&gt;
Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDownDelay || Alters the length a click is held down before release.&lt;br /&gt;
&lt;br /&gt;
Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDragDelay || Alters the length of the brief pause at the start and end of a mouse drag operation.&lt;br /&gt;
&lt;br /&gt;
Time in milliseconds to pause (default=250).&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
&lt;br /&gt;
0 = relative coords to the active window&lt;br /&gt;
&lt;br /&gt;
1 = absolute screen coordinates (default)&lt;br /&gt;
&lt;br /&gt;
2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || If this option is used then all variables must be pre-declared with Local, Global or in some cases Dim before they can be used - removes the chance for misspelled variables causing bugs.&lt;br /&gt;
&lt;br /&gt;
0 = Variables don&#039;t need to be pre-declared (default)&lt;br /&gt;
&lt;br /&gt;
1 = Variables must be pre-declared. See [http://www.autoitscript.com/autoit3/docs/keywords/Dim.htm Dim / Global / Local / Const] for details on declaring variables.&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || Sets the way coords are used in the pixel functions, either absolute coords or coords relative to the window defined by hwnd (default active window):&lt;br /&gt;
&lt;br /&gt;
0 = relative coords to the defined window&lt;br /&gt;
&lt;br /&gt;
1 = absolute screen coordinates (default)&lt;br /&gt;
&lt;br /&gt;
2 = relative coords to the client area of the defined window&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || Specifies if AutoIt attaches input threads when using [[Send]] function. When not attaching (default mode=0) detecting the state of capslock/scrolllock and numlock can be unreliable under NT4. However, when you specify attach mode=1 the [[Send]](&amp;quot;{... down/up}&amp;quot;) syntax will not work and there may be problems with sending keys to &amp;quot;hung&amp;quot; windows. [[ControlSend]] ALWAYS attaches and is not affected by this mode.&lt;br /&gt;
&lt;br /&gt;
0 = don&#039;t attach (default)&lt;br /&gt;
&lt;br /&gt;
1 = attach&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || Specifies if AutoIt should store the state of capslock before a [[Send]] function and restore it afterwards.&lt;br /&gt;
&lt;br /&gt;
0 = don&#039;t store/restore&lt;br /&gt;
&lt;br /&gt;
1 = store and restore (default)&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDelay || Alters the length of the brief pause in between sent keystrokes. A value of 0 removes the delay completely.&lt;br /&gt;
&lt;br /&gt;
Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDownDelay || Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses you may need to raise this value from the default. A value of 0 removes the delay completely.&lt;br /&gt;
&lt;br /&gt;
Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| TCPTimeout || Defines the time before TCP functions stop if no communication.&lt;br /&gt;
&lt;br /&gt;
Time in milliseconds before timeout (default=100).&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || Script pauses when click on tray icon.&lt;br /&gt;
&lt;br /&gt;
0 = no pause&lt;br /&gt;
&lt;br /&gt;
1 = pause (default). If there is no DefaultMenu no pause will occurs.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || If enabled shows the current script line in the tray icon tip to help debugging.&lt;br /&gt;
&lt;br /&gt;
0 = no debug information (default)&lt;br /&gt;
&lt;br /&gt;
1 = show debug&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || Hides the AutoIt tray icon. Note: The icon will still initially appear ~750 milliseconds.&lt;br /&gt;
&lt;br /&gt;
0 = show icon (default)&lt;br /&gt;
&lt;br /&gt;
1 = hide icon&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || Extend the behaviour of the script tray icon/menu. This can be done with a combination (adding) of the following values.&lt;br /&gt;
&lt;br /&gt;
0 = default menu items (Script Paused/Exit) are appended to the usercreated menu; usercreated checked items will automatically unchecked; if you double click the tray icon then the controlid is returned which has the &amp;quot;Default&amp;quot;-style (default).&lt;br /&gt;
&lt;br /&gt;
1 = no default menu&lt;br /&gt;
&lt;br /&gt;
2 = user created checked items will not automatically unchecked if you click it&lt;br /&gt;
&lt;br /&gt;
4 = don&#039;t return the menuitemID which has the &amp;quot;default&amp;quot;-style in the main contextmenu if you double click the tray icon&lt;br /&gt;
&lt;br /&gt;
8 = turn off auto check of radio item groups&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || Enable/disable OnEvent functions notifications for the tray.&lt;br /&gt;
&lt;br /&gt;
0 = (default) disable&lt;br /&gt;
&lt;br /&gt;
1 = enable&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || Specifies if hidden window text can be &amp;quot;seen&amp;quot; by the window matching functions.&lt;br /&gt;
&lt;br /&gt;
0 = Do not detect hidden text (default)&lt;br /&gt;
&lt;br /&gt;
1 = Detect hidden text&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || Allows the window search routines to search child windows as well as top-level windows.&lt;br /&gt;
&lt;br /&gt;
0 = Only search top-level windows (default)&lt;br /&gt;
&lt;br /&gt;
1 = Search top-level and child windows&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || Alters the method that is used to match window text during search operations.&lt;br /&gt;
&lt;br /&gt;
1 = Complete / Slow mode (default)&lt;br /&gt;
&lt;br /&gt;
2 = Quick mode&lt;br /&gt;
&lt;br /&gt;
In quick mode AutoIt can usually only &amp;quot;see&amp;quot; dialog text, button text and the captions of some controls. In the default mode much more text can be seen (for instance the contents of the Notepad window).&lt;br /&gt;
&lt;br /&gt;
If you are having performance problems when performing many window searches then changing to the &amp;quot;quick&amp;quot; mode may help.&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || Alters the method that is used to match window titles during search operations.&lt;br /&gt;
&lt;br /&gt;
1 = Match the title from the start (default)&lt;br /&gt;
&lt;br /&gt;
2 = Match any substring in the title&lt;br /&gt;
&lt;br /&gt;
3 = Exact title match&lt;br /&gt;
&lt;br /&gt;
4 = Advanced mode, see [http://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm Window Titles &amp;amp; Text (Advanced)]&lt;br /&gt;
&lt;br /&gt;
-1 to -4 = Case insensitive match according to the other type of match.&lt;br /&gt;
|-&lt;br /&gt;
| WinWaitDelay || Alters how long a script should briefly pause after a successful window-related operation.&lt;br /&gt;
&lt;br /&gt;
Time in milliseconds to pause (default=250).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
; copy any you want to change   ;default value is listed first&lt;br /&gt;
&lt;br /&gt;
Opt(&amp;quot;CaretCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;ExpandEnvStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;ExpandVarStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;GUICloseOnESC&amp;quot;, 1) ;1=ESC  closes, 0=ESC won&#039;t close&lt;br /&gt;
Opt(&amp;quot;GUICoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=cell&lt;br /&gt;
Opt(&amp;quot;GUIDataSeparatorChar&amp;quot;, &amp;quot;|&amp;quot;) ;&amp;quot;|&amp;quot; is the default&lt;br /&gt;
Opt(&amp;quot;GUIOnEventMode&amp;quot;, 0) ;0=disabled, 1=OnEvent mode enabled&lt;br /&gt;
Opt(&amp;quot;GUIResizeMode&amp;quot;, 0) ;0=no resizing, &amp;lt;1024 special resizing&lt;br /&gt;
Opt(&amp;quot;GUIEventOptions&amp;quot;, 0) ;0=default, 1=just notification, 2=GUICtrlRead tab index&lt;br /&gt;
Opt(&amp;quot;MouseClickDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDownDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDragDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;MustDeclareVars&amp;quot;, 0) ;0=no, 1=require pre-declaration&lt;br /&gt;
Opt(&amp;quot;PixelCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;SendAttachMode&amp;quot;, 0) ;0=don&#039;t attach, 1=do attach&lt;br /&gt;
Opt(&amp;quot;SendCapslockMode&amp;quot;, 1) ;1=store and restore, 0=don&#039;t&lt;br /&gt;
Opt(&amp;quot;SendKeyDelay&amp;quot;, 5) ;5 milliseconds&lt;br /&gt;
Opt(&amp;quot;SendKeyDownDelay&amp;quot;, 1) ;1 millisecond&lt;br /&gt;
Opt(&amp;quot;TCPTimeout&amp;quot;, 100) ;100 milliseconds&lt;br /&gt;
Opt(&amp;quot;TrayAutoPause&amp;quot;, 1) ;0=no pause, 1=Pause&lt;br /&gt;
Opt(&amp;quot;TrayIconDebug&amp;quot;, 0) ;0=no info, 1=debug line info&lt;br /&gt;
Opt(&amp;quot;TrayIconHide&amp;quot;, 0) ;0=show, 1=hide tray icon&lt;br /&gt;
Opt(&amp;quot;TrayMenuMode&amp;quot;, 0) ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID  not return&lt;br /&gt;
Opt(&amp;quot;TrayOnEventMode&amp;quot;, 0) ;0=disable, 1=enable&lt;br /&gt;
Opt(&amp;quot;WinDetectHiddenText&amp;quot;, 0) ;0=don&#039;t detect, 1=do detect&lt;br /&gt;
Opt(&amp;quot;WinSearchChildren&amp;quot;, 1) ;0=no, 1=search children also&lt;br /&gt;
Opt(&amp;quot;WinTextMatchMode&amp;quot;, 1) ;1=complete, 2=quick&lt;br /&gt;
Opt(&amp;quot;WinTitleMatchMode&amp;quot;, 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase&lt;br /&gt;
Opt(&amp;quot;WinWaitDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11919</id>
		<title>AutoItSetOption</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11919"/>
		<updated>2013-08-25T05:22:44Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile or in my script. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039; or to my post if it is my script that is in error. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Changes the operation of various AutoIt functions/parameters.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:AutoItSetOption ( &amp;quot;option&amp;quot; [, param] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| option || The option to change. See Remarks.&lt;br /&gt;
|-&lt;br /&gt;
| param || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The value to assign to the option. The type and meaning vary by option. See remarks below. If the param is not provided, then the function just returns the value already assigned to the option. The keyword [http://www.autoitscript.com/autoit3/docs/keywords/Default.htm Default] can be used for the parameter to reset the option to its default value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| Success: || 	Returns the value of the previous setting for the option.&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	Sets @error to non-zero. Failure will occur if the parameters are invalid (such as an option that doesn&#039;t exist).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
You may use [[Opt]] as an alternative to [[AutoItSetOption]].&lt;br /&gt;
&lt;br /&gt;
Options are as follows:&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Option&#039;&#039;&#039; || &#039;&#039;&#039;Param&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || Sets the way coords are used in the caret functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
&lt;br /&gt;
0 = relative coords to the active window&lt;br /&gt;
&lt;br /&gt;
1 = absolute screen coordinates (default)&lt;br /&gt;
&lt;br /&gt;
2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || Changes how literal strings and % symbols are interpreted. By default strings are treated literally, this option allows you to use %environment% variables inside strings, e.g., &amp;quot;The temp directory is: %temp%&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
0 = do not expand environment variables (default)&lt;br /&gt;
&lt;br /&gt;
1 = expand environment variables&lt;br /&gt;
&lt;br /&gt;
Without this option the usual way would be: 	&amp;quot;The temp directory is: &amp;quot; &amp;amp; [[EnvGet]](&amp;quot;temp&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || Changes how literal strings and variable/macro ($ and @) symbols are interpreted. By default strings are treated literally, this option allows you to use variables and macros inside strings, e.g., &amp;quot;The value of var1 is $var1$&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
0 = do not expand variables (default)&lt;br /&gt;
&lt;br /&gt;
1 = expand variables (when in this mode and you want to use a literal $ or @ then double it up: &amp;quot;This is a single dollar $$ sign&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || When ESC is pressed on a GUI the $GUI_EVENT_CLOSE message is sent. This option toggles this behavior on and off.&lt;br /&gt;
&lt;br /&gt;
0 = Don&#039;t send the $GUI_EVENT_CLOSE message when ESC is pressed.&lt;br /&gt;
&lt;br /&gt;
1 = [[Send]] the $GUI_EVENT_CLOSE message when ESC is pressed (default).&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || Alters the position of a control defined by [[GUICtrlSetPos]].&lt;br /&gt;
&lt;br /&gt;
0 = relative position to the start of the last control (upper left corner).&lt;br /&gt;
&lt;br /&gt;
1 = absolute coordinates (default) still relative to the dialog box.&lt;br /&gt;
&lt;br /&gt;
2 = cell positioning relative to current cell. A -1 for left or top parameter don&#039;t increment the start.&lt;br /&gt;
&lt;br /&gt;
So next line is -1, offset; next cell is offset,-1; current cell is -1,-1.&lt;br /&gt;
&lt;br /&gt;
Obviously &amp;quot;offset&amp;quot; cannot be -1 which reserved to indicate the no increment. But if you can use a multiple of the width you choose to skip or go back.&lt;br /&gt;
|-&lt;br /&gt;
| GUIDataSeparatorChar || Define the character which delimits subitems in [[GUICtrlSetData]].&lt;br /&gt;
&lt;br /&gt;
The default character is &#039;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || Enable/disable OnEvent functions notifications.&lt;br /&gt;
&lt;br /&gt;
0 = (default) disable.&lt;br /&gt;
&lt;br /&gt;
1 = enable.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || Change default resizing for a control.&lt;br /&gt;
&lt;br /&gt;
0 = (default) keep default control resizing.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;1024 = any type of resizing see [[GUICtrlSetResizing]].&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || Change special event behavior or GUI function return values.&lt;br /&gt;
&lt;br /&gt;
0 = (default) Windows behavior on click on Minimize,Restore, Maximize, Resize.&lt;br /&gt;
&lt;br /&gt;
1 = suppress windows behavior on minimize, restore or maximize click button or window resize. Just sends the notification.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDelay || Alters the length of the brief pause in between mouse clicks.&lt;br /&gt;
&lt;br /&gt;
Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDownDelay || Alters the length a click is held down before release.&lt;br /&gt;
&lt;br /&gt;
Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDragDelay || Alters the length of the brief pause at the start and end of a mouse drag operation.&lt;br /&gt;
&lt;br /&gt;
Time in milliseconds to pause (default=250).&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
&lt;br /&gt;
0 = relative coords to the active window&lt;br /&gt;
&lt;br /&gt;
1 = absolute screen coordinates (default)&lt;br /&gt;
&lt;br /&gt;
2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || If this option is used then all variables must be pre-declared with Local, Global or in some cases Dim before they can be used - removes the chance for misspelled variables causing bugs.&lt;br /&gt;
&lt;br /&gt;
0 = Variables don&#039;t need to be pre-declared (default)&lt;br /&gt;
&lt;br /&gt;
1 = Variables must be pre-declared. See [http://www.autoitscript.com/autoit3/docs/keywords/Dim.htm Dim / Global / Local / Const] for details on declaring variables.&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || Sets the way coords are used in the pixel functions, either absolute coords or coords relative to the window defined by hwnd (default active window):&lt;br /&gt;
&lt;br /&gt;
0 = relative coords to the defined window&lt;br /&gt;
&lt;br /&gt;
1 = absolute screen coordinates (default)&lt;br /&gt;
&lt;br /&gt;
2 = relative coords to the client area of the defined window&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || Specifies if AutoIt attaches input threads when using [[Send]] function. When not attaching (default mode=0) detecting the state of capslock/scrolllock and numlock can be unreliable under NT4. However, when you specify attach mode=1 the [[Send]](&amp;quot;{... down/up}&amp;quot;) syntax will not work and there may be problems with sending keys to &amp;quot;hung&amp;quot; windows. [[ControlSend]] ALWAYS attaches and is not affected by this mode.&lt;br /&gt;
&lt;br /&gt;
0 = don&#039;t attach (default)&lt;br /&gt;
&lt;br /&gt;
1 = attach&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || Specifies if AutoIt should store the state of capslock before a [[Send]] function and restore it afterwards.&lt;br /&gt;
&lt;br /&gt;
0 = don&#039;t store/restore&lt;br /&gt;
&lt;br /&gt;
1 = store and restore (default)&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDelay || Alters the length of the brief pause in between sent keystrokes. A value of 0 removes the delay completely.&lt;br /&gt;
&lt;br /&gt;
Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDownDelay || Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses you may need to raise this value from the default. A value of 0 removes the delay completely.&lt;br /&gt;
&lt;br /&gt;
Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| TCPTimeout || Defines the time before TCP functions stop if no communication.&lt;br /&gt;
&lt;br /&gt;
Time in milliseconds before timeout (default=100).&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || Script pauses when click on tray icon.&lt;br /&gt;
&lt;br /&gt;
0 = no pause&lt;br /&gt;
&lt;br /&gt;
1 = pause (default). If there is no DefaultMenu no pause will occurs.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || If enabled shows the current script line in the tray icon tip to help debugging.&lt;br /&gt;
&lt;br /&gt;
0 = no debug information (default)&lt;br /&gt;
&lt;br /&gt;
1 = show debug&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || Hides the AutoIt tray icon. Note: The icon will still initially appear ~750 milliseconds.&lt;br /&gt;
&lt;br /&gt;
0 = show icon (default)&lt;br /&gt;
&lt;br /&gt;
1 = hide icon&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || Extend the behaviour of the script tray icon/menu. This can be done with a combination (adding) of the following values.&lt;br /&gt;
&lt;br /&gt;
0 = default menu items (Script Paused/Exit) are appended to the usercreated menu; usercreated checked items will automatically unchecked; if you double click the tray icon then the controlid is returned which has the &amp;quot;Default&amp;quot;-style (default).&lt;br /&gt;
&lt;br /&gt;
1 = no default menu&lt;br /&gt;
&lt;br /&gt;
2 = user created checked items will not automatically unchecked if you click it&lt;br /&gt;
&lt;br /&gt;
4 = don&#039;t return the menuitemID which has the &amp;quot;default&amp;quot;-style in the main contextmenu if you double click the tray icon&lt;br /&gt;
&lt;br /&gt;
8 = turn off auto check of radio item groups&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || Enable/disable OnEvent functions notifications for the tray.&lt;br /&gt;
&lt;br /&gt;
0 = (default) disable&lt;br /&gt;
&lt;br /&gt;
1 = enable&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || Specifies if hidden window text can be &amp;quot;seen&amp;quot; by the window matching functions.&lt;br /&gt;
&lt;br /&gt;
0 = Do not detect hidden text (default)&lt;br /&gt;
&lt;br /&gt;
1 = Detect hidden text&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || Allows the window search routines to search child windows as well as top-level windows.&lt;br /&gt;
&lt;br /&gt;
0 = Only search top-level windows (default)&lt;br /&gt;
&lt;br /&gt;
1 = Search top-level and child windows&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || Alters the method that is used to match window text during search operations.&lt;br /&gt;
&lt;br /&gt;
1 = Complete / Slow mode (default)&lt;br /&gt;
&lt;br /&gt;
2 = Quick mode&lt;br /&gt;
&lt;br /&gt;
In quick mode AutoIt can usually only &amp;quot;see&amp;quot; dialog text, button text and the captions of some controls. In the default mode much more text can be seen (for instance the contents of the Notepad window).&lt;br /&gt;
&lt;br /&gt;
If you are having performance problems when performing many window searches then changing to the &amp;quot;quick&amp;quot; mode may help.&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || Alters the method that is used to match window titles during search operations.&lt;br /&gt;
&lt;br /&gt;
1 = Match the title from the start (default)&lt;br /&gt;
&lt;br /&gt;
2 = Match any substring in the title&lt;br /&gt;
&lt;br /&gt;
3 = Exact title match&lt;br /&gt;
&lt;br /&gt;
4 = Advanced mode, see [http://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm Window Titles &amp;amp; Text (Advanced)]&lt;br /&gt;
&lt;br /&gt;
-1 to -4 = Case insensitive match according to the other type of match.&lt;br /&gt;
|-&lt;br /&gt;
| WinWaitDelay || Alters how long a script should briefly pause after a successful window-related operation.&lt;br /&gt;
&lt;br /&gt;
Time in milliseconds to pause (default=250).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
; copy any you want to change   ;default value is listed first&lt;br /&gt;
&lt;br /&gt;
Opt(&amp;quot;CaretCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;ExpandEnvStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;ExpandVarStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;GUICloseOnESC&amp;quot;, 1) ;1=ESC  closes, 0=ESC won&#039;t close&lt;br /&gt;
Opt(&amp;quot;GUICoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=cell&lt;br /&gt;
Opt(&amp;quot;GUIDataSeparatorChar&amp;quot;, &amp;quot;|&amp;quot;) ;&amp;quot;|&amp;quot; is the default&lt;br /&gt;
Opt(&amp;quot;GUIOnEventMode&amp;quot;, 0) ;0=disabled, 1=OnEvent mode enabled&lt;br /&gt;
Opt(&amp;quot;GUIResizeMode&amp;quot;, 0) ;0=no resizing, &amp;lt;1024 special resizing&lt;br /&gt;
Opt(&amp;quot;GUIEventOptions&amp;quot;, 0) ;0=default, 1=just notification, 2=GUICtrlRead tab index&lt;br /&gt;
Opt(&amp;quot;MouseClickDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDownDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDragDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;MustDeclareVars&amp;quot;, 0) ;0=no, 1=require pre-declaration&lt;br /&gt;
Opt(&amp;quot;PixelCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;SendAttachMode&amp;quot;, 0) ;0=don&#039;t attach, 1=do attach&lt;br /&gt;
Opt(&amp;quot;SendCapslockMode&amp;quot;, 1) ;1=store and restore, 0=don&#039;t&lt;br /&gt;
Opt(&amp;quot;SendKeyDelay&amp;quot;, 5) ;5 milliseconds&lt;br /&gt;
Opt(&amp;quot;SendKeyDownDelay&amp;quot;, 1) ;1 millisecond&lt;br /&gt;
Opt(&amp;quot;TCPTimeout&amp;quot;, 100) ;100 milliseconds&lt;br /&gt;
Opt(&amp;quot;TrayAutoPause&amp;quot;, 1) ;0=no pause, 1=Pause&lt;br /&gt;
Opt(&amp;quot;TrayIconDebug&amp;quot;, 0) ;0=no info, 1=debug line info&lt;br /&gt;
Opt(&amp;quot;TrayIconHide&amp;quot;, 0) ;0=show, 1=hide tray icon&lt;br /&gt;
Opt(&amp;quot;TrayMenuMode&amp;quot;, 0) ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID  not return&lt;br /&gt;
Opt(&amp;quot;TrayOnEventMode&amp;quot;, 0) ;0=disable, 1=enable&lt;br /&gt;
Opt(&amp;quot;WinDetectHiddenText&amp;quot;, 0) ;0=don&#039;t detect, 1=do detect&lt;br /&gt;
Opt(&amp;quot;WinSearchChildren&amp;quot;, 1) ;0=no, 1=search children also&lt;br /&gt;
Opt(&amp;quot;WinTextMatchMode&amp;quot;, 1) ;1=complete, 2=quick&lt;br /&gt;
Opt(&amp;quot;WinTitleMatchMode&amp;quot;, 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase&lt;br /&gt;
Opt(&amp;quot;WinWaitDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11918</id>
		<title>AutoItSetOption</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11918"/>
		<updated>2013-08-24T20:40:05Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile or in my script. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039; or to my post if it is my script that is in error. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Changes the operation of various AutoIt functions/parameters.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:AutoItSetOption ( &amp;quot;option&amp;quot; [, param] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| option || The option to change. See Remarks.&lt;br /&gt;
|-&lt;br /&gt;
| param || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The value to assign to the option. The type and meaning vary by option. See remarks below. If the param is not provided, then the function just returns the value already assigned to the option. The keyword [http://www.autoitscript.com/autoit3/docs/keywords/Default.htm Default] can be used for the parameter to reset the option to its default value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| Success: || 	Returns the value of the previous setting for the option.&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	Sets @error to non-zero. Failure will occur if the parameters are invalid (such as an option that doesn&#039;t exist).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
You may use [[Opt]] as an alternative to [[AutoItSetOption]].&lt;br /&gt;
&lt;br /&gt;
Options are as follows:&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Option&#039;&#039;&#039; || &#039;&#039;&#039;Param&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || Sets the way coords are used in the caret functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
0 = relative coords to the active window&lt;br /&gt;
1 = absolute screen coordinates (default)&lt;br /&gt;
2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || Changes how literal strings and % symbols are interpreted. By default strings are treated literally, this option allows you to use %environment% variables inside strings, e.g., &amp;quot;The temp directory is: %temp%&amp;quot;.&lt;br /&gt;
0 = do not expand environment variables (default)&lt;br /&gt;
1 = expand environment variables&lt;br /&gt;
Without this option the usual way would be: 	&amp;quot;The temp directory is: &amp;quot; &amp;amp; [[EnvGet]](&amp;quot;temp&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || Changes how literal strings and variable/macro ($ and @) symbols are interpreted. By default strings are treated literally, this option allows you to use variables and macros inside strings, e.g., &amp;quot;The value of var1 is $var1$&amp;quot;.&lt;br /&gt;
0 = do not expand variables (default)&lt;br /&gt;
1 = expand variables (when in this mode and you want to use a literal $ or @ then double it up: &amp;quot;This is a single dollar $$ sign&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || When ESC is pressed on a GUI the $GUI_EVENT_CLOSE message is sent. This option toggles this behavior on and off.&lt;br /&gt;
0 = Don&#039;t send the $GUI_EVENT_CLOSE message when ESC is pressed.&lt;br /&gt;
1 = [[Send]] the $GUI_EVENT_CLOSE message when ESC is pressed (default).&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || Alters the position of a control defined by [[GUICtrlSetPos]].&lt;br /&gt;
0 = relative position to the start of the last control (upper left corner).&lt;br /&gt;
1 = absolute coordinates (default) still relative to the dialog box.&lt;br /&gt;
2 = cell positioning relative to current cell. A -1 for left or top parameter don&#039;t increment the start.&lt;br /&gt;
So next line is -1, offset; next cell is offset,-1; current cell is -1,-1.&lt;br /&gt;
Obviously &amp;quot;offset&amp;quot; cannot be -1 which reserved to indicate the no increment. But if you can use a multiple of the width you choose to skip or go back.&lt;br /&gt;
|-&lt;br /&gt;
| GUIDataSeparatorChar || Define the character which delimits subitems in [[GUICtrlSetData]].&lt;br /&gt;
The default character is &#039;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || Enable/disable OnEvent functions notifications.&lt;br /&gt;
0 = (default) disable.&lt;br /&gt;
1 = enable.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || Change default resizing for a control.&lt;br /&gt;
0 = (default) keep default control resizing.&lt;br /&gt;
&amp;amp;lt;1024 = any type of resizing see [[GUICtrlSetResizing]].&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || Change special event behavior or GUI function return values.&lt;br /&gt;
0 = (default) Windows behavior on click on Minimize,Restore, Maximize, Resize.&lt;br /&gt;
1 = suppress windows behavior on minimize, restore or maximize click button or window resize. Just sends the notification.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDelay || Alters the length of the brief pause in between mouse clicks.&lt;br /&gt;
Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDownDelay || Alters the length a click is held down before release.&lt;br /&gt;
Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDragDelay || Alters the length of the brief pause at the start and end of a mouse drag operation.&lt;br /&gt;
Time in milliseconds to pause (default=250).&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
0 = relative coords to the active window&lt;br /&gt;
1 = absolute screen coordinates (default)&lt;br /&gt;
2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || If this option is used then all variables must be pre-declared with Local, Global or in some cases Dim before they can be used - removes the chance for misspelled variables causing bugs.&lt;br /&gt;
0 = Variables don&#039;t need to be pre-declared (default)&lt;br /&gt;
1 = Variables must be pre-declared. See [http://www.autoitscript.com/autoit3/docs/keywords/Dim.htm Dim / Global / Local / Const] for details on declaring variables.&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || Sets the way coords are used in the pixel functions, either absolute coords or coords relative to the window defined by hwnd (default active window):&lt;br /&gt;
0 = relative coords to the defined window&lt;br /&gt;
1 = absolute screen coordinates (default)&lt;br /&gt;
2 = relative coords to the client area of the defined window&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || Specifies if AutoIt attaches input threads when using [[Send]] function. When not attaching (default mode=0) detecting the state of capslock/scrolllock and numlock can be unreliable under NT4. However, when you specify attach mode=1 the [[Send]](&amp;quot;{... down/up}&amp;quot;) syntax will not work and there may be problems with sending keys to &amp;quot;hung&amp;quot; windows. [[ControlSend]] ALWAYS attaches and is not affected by this mode.&lt;br /&gt;
0 = don&#039;t attach (default)&lt;br /&gt;
1 = attach&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || Specifies if AutoIt should store the state of capslock before a [[Send]] function and restore it afterwards.&lt;br /&gt;
0 = don&#039;t store/restore&lt;br /&gt;
1 = store and restore (default)&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDelay || Alters the length of the brief pause in between sent keystrokes. A value of 0 removes the delay completely.&lt;br /&gt;
Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDownDelay || Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses you may need to raise this value from the default. A value of 0 removes the delay completely.&lt;br /&gt;
Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| TCPTimeout || Defines the time before TCP functions stop if no communication.&lt;br /&gt;
Time in milliseconds before timeout (default=100).&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || Script pauses when click on tray icon.&lt;br /&gt;
0 = no pause&lt;br /&gt;
1 = pause (default). If there is no DefaultMenu no pause will occurs.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || If enabled shows the current script line in the tray icon tip to help debugging.&lt;br /&gt;
0 = no debug information (default)&lt;br /&gt;
1 = show debug&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || Hides the AutoIt tray icon. Note: The icon will still initially appear ~750 milliseconds.&lt;br /&gt;
0 = show icon (default)&lt;br /&gt;
1 = hide icon&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || Extend the behaviour of the script tray icon/menu. This can be done with a combination (adding) of the following values.&lt;br /&gt;
0 = default menu items (Script Paused/Exit) are appended to the usercreated menu; usercreated checked items will automatically unchecked; if you double click the tray icon then the controlid is returned which has the &amp;quot;Default&amp;quot;-style (default).&lt;br /&gt;
1 = no default menu&lt;br /&gt;
2 = user created checked items will not automatically unchecked if you click it&lt;br /&gt;
4 = don&#039;t return the menuitemID which has the &amp;quot;default&amp;quot;-style in the main contextmenu if you double click the tray icon&lt;br /&gt;
8 = turn off auto check of radio item groups&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || Enable/disable OnEvent functions notifications for the tray.&lt;br /&gt;
0 = (default) disable&lt;br /&gt;
1 = enable&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || Specifies if hidden window text can be &amp;quot;seen&amp;quot; by the window matching functions.&lt;br /&gt;
0 = Do not detect hidden text (default)&lt;br /&gt;
1 = Detect hidden text&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || Allows the window search routines to search child windows as well as top-level windows.&lt;br /&gt;
0 = Only search top-level windows (default)&lt;br /&gt;
1 = Search top-level and child windows&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || Alters the method that is used to match window text during search operations.&lt;br /&gt;
1 = Complete / Slow mode (default)&lt;br /&gt;
2 = Quick mode&lt;br /&gt;
In quick mode AutoIt can usually only &amp;quot;see&amp;quot; dialog text, button text and the captions of some controls. In the default mode much more text can be seen (for instance the contents of the Notepad window).&lt;br /&gt;
If you are having performance problems when performing many window searches then changing to the &amp;quot;quick&amp;quot; mode may help.&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || Alters the method that is used to match window titles during search operations.&lt;br /&gt;
1 = Match the title from the start (default)&lt;br /&gt;
2 = Match any substring in the title&lt;br /&gt;
3 = Exact title match&lt;br /&gt;
4 = Advanced mode, see [http://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm Window Titles &amp;amp; Text (Advanced)]&lt;br /&gt;
-1 to -4 = Case insensitive match according to the other type of match.&lt;br /&gt;
|-&lt;br /&gt;
| WinWaitDelay || Alters how long a script should briefly pause after a successful window-related operation.&lt;br /&gt;
Time in milliseconds to pause (default=250).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
; copy any you want to change   ;default value is listed first&lt;br /&gt;
&lt;br /&gt;
Opt(&amp;quot;CaretCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;ExpandEnvStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;ExpandVarStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;GUICloseOnESC&amp;quot;, 1) ;1=ESC  closes, 0=ESC won&#039;t close&lt;br /&gt;
Opt(&amp;quot;GUICoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=cell&lt;br /&gt;
Opt(&amp;quot;GUIDataSeparatorChar&amp;quot;, &amp;quot;|&amp;quot;) ;&amp;quot;|&amp;quot; is the default&lt;br /&gt;
Opt(&amp;quot;GUIOnEventMode&amp;quot;, 0) ;0=disabled, 1=OnEvent mode enabled&lt;br /&gt;
Opt(&amp;quot;GUIResizeMode&amp;quot;, 0) ;0=no resizing, &amp;lt;1024 special resizing&lt;br /&gt;
Opt(&amp;quot;GUIEventOptions&amp;quot;, 0) ;0=default, 1=just notification, 2=GUICtrlRead tab index&lt;br /&gt;
Opt(&amp;quot;MouseClickDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDownDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDragDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;MustDeclareVars&amp;quot;, 0) ;0=no, 1=require pre-declaration&lt;br /&gt;
Opt(&amp;quot;PixelCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;SendAttachMode&amp;quot;, 0) ;0=don&#039;t attach, 1=do attach&lt;br /&gt;
Opt(&amp;quot;SendCapslockMode&amp;quot;, 1) ;1=store and restore, 0=don&#039;t&lt;br /&gt;
Opt(&amp;quot;SendKeyDelay&amp;quot;, 5) ;5 milliseconds&lt;br /&gt;
Opt(&amp;quot;SendKeyDownDelay&amp;quot;, 1) ;1 millisecond&lt;br /&gt;
Opt(&amp;quot;TCPTimeout&amp;quot;, 100) ;100 milliseconds&lt;br /&gt;
Opt(&amp;quot;TrayAutoPause&amp;quot;, 1) ;0=no pause, 1=Pause&lt;br /&gt;
Opt(&amp;quot;TrayIconDebug&amp;quot;, 0) ;0=no info, 1=debug line info&lt;br /&gt;
Opt(&amp;quot;TrayIconHide&amp;quot;, 0) ;0=show, 1=hide tray icon&lt;br /&gt;
Opt(&amp;quot;TrayMenuMode&amp;quot;, 0) ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID  not return&lt;br /&gt;
Opt(&amp;quot;TrayOnEventMode&amp;quot;, 0) ;0=disable, 1=enable&lt;br /&gt;
Opt(&amp;quot;WinDetectHiddenText&amp;quot;, 0) ;0=don&#039;t detect, 1=do detect&lt;br /&gt;
Opt(&amp;quot;WinSearchChildren&amp;quot;, 1) ;0=no, 1=search children also&lt;br /&gt;
Opt(&amp;quot;WinTextMatchMode&amp;quot;, 1) ;1=complete, 2=quick&lt;br /&gt;
Opt(&amp;quot;WinTitleMatchMode&amp;quot;, 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase&lt;br /&gt;
Opt(&amp;quot;WinWaitDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11917</id>
		<title>AutoItSetOption</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11917"/>
		<updated>2013-08-24T19:26:52Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile or in my script. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039; or to my post if it is my script that is in error. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Changes the operation of various AutoIt functions/parameters.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:AutoItSetOption ( &amp;quot;option&amp;quot; [, param] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| option || 	The option to change. See Remarks.&lt;br /&gt;
|-&lt;br /&gt;
| param || 	&#039;&#039;&#039;[optional]&#039;&#039;&#039; The value to assign to the option. The type and meaning vary by option. See remarks below. If the param is not provided, then the function just returns the value already assigned to the option. The keyword [http://www.autoitscript.com/autoit3/docs/keywords/Default.htm Default] can be used for the parameter to reset the option to its default value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| Success: || 	Returns the value of the previous setting for the option.&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	Sets @error to non-zero. Failure will occur if the parameters are invalid (such as an option that doesn&#039;t exist).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
You may use [[Opt]] as an alternative to [[AutoItSetOption]].&lt;br /&gt;
&lt;br /&gt;
Options are as follows:&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Option&#039;&#039;&#039; || 	&#039;&#039;&#039;Param&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || 	Sets the way coords are used in the caret functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = relative coords to the active window&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || 	Changes how literal strings and % symbols are interpreted. By default strings are treated literally, this option allows you to use %environment% variables inside strings, e.g., &amp;quot;The temp directory is: %temp%&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = do not expand environment variables (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = expand environment variables&lt;br /&gt;
|-&lt;br /&gt;
| || 	Without this option the usual way would be: 	&amp;quot;The temp directory is: &amp;quot; &amp;amp; [[EnvGet]](&amp;quot;temp&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || 	Changes how literal strings and variable/macro ($ and @) symbols are interpreted. By default strings are treated literally, this option allows you to use variables and macros inside strings, e.g., &amp;quot;The value of var1 is $var1$&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = do not expand variables (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = expand variables (when in this mode and you want to use a literal $ or @ then double it up: &amp;quot;This is a single dollar $$ sign&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || 	When ESC is pressed on a GUI the $GUI_EVENT_CLOSE message is sent. This option toggles this behavior on and off.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = Don&#039;t send the $GUI_EVENT_CLOSE message when ESC is pressed.&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = [[Send]] the $GUI_EVENT_CLOSE message when ESC is pressed (default).&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || 	Alters the position of a control defined by [[GUICtrlSetPos]].&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = relative position to the start of the last control (upper left corner).&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = absolute coordinates (default) still relative to the dialog box.&lt;br /&gt;
|-&lt;br /&gt;
| || 	2 = cell positioning relative to current cell. A -1 for left or top parameter don&#039;t increment the start.&lt;br /&gt;
|-&lt;br /&gt;
| || 	So next line is -1, offset; next cell is offset,-1; current cell is -1,-1.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Obviously &amp;quot;offset&amp;quot; cannot be -1 which reserved to indicate the no increment. But if you can use a multiple of the width you choose to skip or go back.&lt;br /&gt;
|-&lt;br /&gt;
| GUIDataSeparatorChar || 	Define the character which delimits subitems in [[GUICtrlSetData]].&lt;br /&gt;
|-&lt;br /&gt;
| || 	The default character is &#039;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || 	Enable/disable OnEvent functions notifications.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = (default) disable.&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = enable.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || 	Change default resizing for a control.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = (default) keep default control resizing.&lt;br /&gt;
|-&lt;br /&gt;
| || 	&amp;amp;lt;1024 = any type of resizing see [[GUICtrlSetResizing]].&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || 	Change special event behavior or GUI function return values.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = (default) Windows behavior on click on Minimize,Restore, Maximize, Resize.&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = suppress windows behavior on minimize, restore or maximize click button or window resize. Just sends the notification.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDelay || 	Alters the length of the brief pause in between mouse clicks.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDownDelay || 	Alters the length a click is held down before release.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDragDelay || 	Alters the length of the brief pause at the start and end of a mouse drag operation.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Time in milliseconds to pause (default=250).&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || 	Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = relative coords to the active window&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || 	If this option is used then all variables must be pre-declared with Local, Global or in some cases Dim before they can be used - removes the chance for misspelled variables causing bugs.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = Variables don&#039;t need to be pre-declared (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = Variables must be pre-declared. See [http://www.autoitscript.com/autoit3/docs/keywords/Dim.htm Dim / Global / Local / Const] for details on declaring variables.&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || 	Sets the way coords are used in the pixel functions, either absolute coords or coords relative to the window defined by hwnd (default active window):&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = relative coords to the defined window&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	2 = relative coords to the client area of the defined window&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || 	Specifies if AutoIt attaches input threads when using [[Send]] function. When not attaching (default mode=0) detecting the state of capslock/scrolllock and numlock can be unreliable under NT4. However, when you specify attach mode=1 the [[Send]](&amp;quot;{... down/up}&amp;quot;) syntax will not work and there may be problems with sending keys to &amp;quot;hung&amp;quot; windows. [[ControlSend]] ALWAYS attaches and is not affected by this mode.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = don&#039;t attach (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = attach&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || 	Specifies if AutoIt should store the state of capslock before a [[Send]] function and restore it afterwards.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = don&#039;t store/restore&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = store and restore (default)&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDelay || 	Alters the length of the brief pause in between sent keystrokes. A value of 0 removes the delay completely.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDownDelay || 	Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses you may need to raise this value from the default. A value of 0 removes the delay completely.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| TCPTimeout || 	Defines the time before TCP functions stop if no communication.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Time in milliseconds before timeout (default=100).&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || 	Script pauses when click on tray icon.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = no pause&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = pause (default). If there is no DefaultMenu no pause will occurs.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || 	If enabled shows the current script line in the tray icon tip to help debugging.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = no debug information (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = show debug&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || 	Hides the AutoIt tray icon. Note: The icon will still initially appear ~750 milliseconds.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = show icon (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = hide icon&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 	Extend the behaviour of the script tray icon/menu. This can be done with a combination (adding) of the following values.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = default menu items (Script Paused/Exit) are appended to the usercreated menu; usercreated checked items will automatically unchecked; if you double click the tray icon then the controlid is returned which has the &amp;quot;Default&amp;quot;-style (default).&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = no default menu&lt;br /&gt;
|-&lt;br /&gt;
| || 	2 = user created checked items will not automatically unchecked if you click it&lt;br /&gt;
|-&lt;br /&gt;
| || 	4 = don&#039;t return the menuitemID which has the &amp;quot;default&amp;quot;-style in the main contextmenu if you double click the tray icon&lt;br /&gt;
|-&lt;br /&gt;
| || 	8 = turn off auto check of radio item groups&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || 	Enable/disable OnEvent functions notifications for the tray.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = (default) disable&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = enable&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || 	Specifies if hidden window text can be &amp;quot;seen&amp;quot; by the window matching functions.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = Do not detect hidden text (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = Detect hidden text&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || 	Allows the window search routines to search child windows as well as top-level windows.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = Only search top-level windows (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = Search top-level and child windows&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || 	Alters the method that is used to match window text during search operations.&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = Complete / Slow mode (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	2 = Quick mode&lt;br /&gt;
|-&lt;br /&gt;
| || 	In quick mode AutoIt can usually only &amp;quot;see&amp;quot; dialog text, button text and the captions of some controls. In the default mode much more text can be seen (for instance the contents of the Notepad window).&lt;br /&gt;
|-&lt;br /&gt;
| || 	If you are having performance problems when performing many window searches then changing to the &amp;quot;quick&amp;quot; mode may help.&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 	Alters the method that is used to match window titles during search operations.&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = Match the title from the start (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	2 = Match any substring in the title&lt;br /&gt;
|-&lt;br /&gt;
| || 	3 = Exact title match&lt;br /&gt;
|-&lt;br /&gt;
| || 	4 = Advanced mode, see [http://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm Window Titles &amp;amp; Text (Advanced)]&lt;br /&gt;
|-&lt;br /&gt;
| || 	-1 to -4 = Case insensitive match according to the other type of match.&lt;br /&gt;
|-&lt;br /&gt;
| WinWaitDelay || 	Alters how long a script should briefly pause after a successful window-related operation.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Time in milliseconds to pause (default=250).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
; copy any you want to change   ;default value is listed first&lt;br /&gt;
&lt;br /&gt;
Opt(&amp;quot;CaretCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;ExpandEnvStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;ExpandVarStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;GUICloseOnESC&amp;quot;, 1) ;1=ESC  closes, 0=ESC won&#039;t close&lt;br /&gt;
Opt(&amp;quot;GUICoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=cell&lt;br /&gt;
Opt(&amp;quot;GUIDataSeparatorChar&amp;quot;, &amp;quot;|&amp;quot;) ;&amp;quot;|&amp;quot; is the default&lt;br /&gt;
Opt(&amp;quot;GUIOnEventMode&amp;quot;, 0) ;0=disabled, 1=OnEvent mode enabled&lt;br /&gt;
Opt(&amp;quot;GUIResizeMode&amp;quot;, 0) ;0=no resizing, &amp;lt;1024 special resizing&lt;br /&gt;
Opt(&amp;quot;GUIEventOptions&amp;quot;, 0) ;0=default, 1=just notification, 2=GUICtrlRead tab index&lt;br /&gt;
Opt(&amp;quot;MouseClickDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDownDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDragDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;MustDeclareVars&amp;quot;, 0) ;0=no, 1=require pre-declaration&lt;br /&gt;
Opt(&amp;quot;PixelCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;SendAttachMode&amp;quot;, 0) ;0=don&#039;t attach, 1=do attach&lt;br /&gt;
Opt(&amp;quot;SendCapslockMode&amp;quot;, 1) ;1=store and restore, 0=don&#039;t&lt;br /&gt;
Opt(&amp;quot;SendKeyDelay&amp;quot;, 5) ;5 milliseconds&lt;br /&gt;
Opt(&amp;quot;SendKeyDownDelay&amp;quot;, 1) ;1 millisecond&lt;br /&gt;
Opt(&amp;quot;TCPTimeout&amp;quot;, 100) ;100 milliseconds&lt;br /&gt;
Opt(&amp;quot;TrayAutoPause&amp;quot;, 1) ;0=no pause, 1=Pause&lt;br /&gt;
Opt(&amp;quot;TrayIconDebug&amp;quot;, 0) ;0=no info, 1=debug line info&lt;br /&gt;
Opt(&amp;quot;TrayIconHide&amp;quot;, 0) ;0=show, 1=hide tray icon&lt;br /&gt;
Opt(&amp;quot;TrayMenuMode&amp;quot;, 0) ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID  not return&lt;br /&gt;
Opt(&amp;quot;TrayOnEventMode&amp;quot;, 0) ;0=disable, 1=enable&lt;br /&gt;
Opt(&amp;quot;WinDetectHiddenText&amp;quot;, 0) ;0=don&#039;t detect, 1=do detect&lt;br /&gt;
Opt(&amp;quot;WinSearchChildren&amp;quot;, 1) ;0=no, 1=search children also&lt;br /&gt;
Opt(&amp;quot;WinTextMatchMode&amp;quot;, 1) ;1=complete, 2=quick&lt;br /&gt;
Opt(&amp;quot;WinTitleMatchMode&amp;quot;, 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase&lt;br /&gt;
Opt(&amp;quot;WinWaitDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=GUICreate&amp;diff=11912</id>
		<title>GUICreate</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=GUICreate&amp;diff=11912"/>
		<updated>2013-08-23T16:16:08Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039;. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Create a GUI window.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:GUICreate ( &amp;quot;title&amp;quot; [, width [, height [, left = -1 [, top = -1 [, style = -1 [, exStyle = -1 [, parent = 0]]]]]]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| title || 	The title of the dialog box.&lt;br /&gt;
|-&lt;br /&gt;
| width || 	&#039;&#039;&#039;[optional]&#039;&#039;&#039; The width of the window.&lt;br /&gt;
|-&lt;br /&gt;
| height || 	&#039;&#039;&#039;[optional]&#039;&#039;&#039; The height of the window.&lt;br /&gt;
|-&lt;br /&gt;
| left || 	&#039;&#039;&#039;[optional]&#039;&#039;&#039; The left side of the dialog box.  By default (-1), the window is centered. If defined, top must also be defined.&lt;br /&gt;
|-&lt;br /&gt;
| top || 	&#039;&#039;&#039;[optional]&#039;&#039;&#039; The top of the dialog box. Default (-1) is centered&lt;br /&gt;
|-&lt;br /&gt;
| style || 	&#039;&#039;&#039;[optional]&#039;&#039;&#039; defines the style of the window. See [http://www.autoitscript.com/autoit3/docs/appendix/GUIStyles.htm GUI Control Styles Appendix].&lt;br /&gt;
|-&lt;br /&gt;
| || 	Use -1 for the default style which includes a combination of $WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU styles.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Some styles are always included: $WS_CLIPSIBLINGS, and $WS_SYSMENU if $WS_MAXIMIZEBOX or $WS_SIZEBOX is specified.&lt;br /&gt;
|-&lt;br /&gt;
| exStyle || 	&#039;&#039;&#039;[optional]&#039;&#039;&#039; defines the extended style of the window. See the [GUICreate.htm#Extended Style Table Extended Style Table] below.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Use -1 for the default, which is no extended styles.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Forced styles: $WS_EX_WINDOWEDGE&lt;br /&gt;
|-&lt;br /&gt;
| parent || 	&#039;&#039;&#039;[optional]&#039;&#039;&#039; The handle of another previously created window - this new window then becomes a child of that window.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| Success: || 	Returns a windows handle.&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	Returns 0 if the window cannot be created and sets @error to 1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
By default the dialog box is non sizable and non maximizable. So WS_SIZEBOX or WS_MAXIMIZEBOX can be used in the style parameter.&lt;br /&gt;
As defining only one style just set this style don&#039;t forget to combine it with default ones, i.e. just defining WS_SIZEBOX will not set WS_MINIMIZEBOX, WS_CAPTION, WS_POPUP, WS_SYSMENU. So the best method to define a resizeable window is to use WS_OVERLAPPEDWINDOW.&lt;br /&gt;
When using $WS_EX_MDICHILD the position is relative to client area of the parent window. With $WS_EX_LAYERED it is possible to have a transparent picture on a background picture defined in the parent window.&lt;br /&gt;
Adding $WS_CLIPCHILDREN style can avoid some flickering when resizing GUI containing Edit control for example.&lt;br /&gt;
You can enable window dragging for GUI without $WS_CAPTION by using $WS_EX_CONTROLPARENT in the exStyle parameter.&lt;br /&gt;
&lt;br /&gt;
To combine styles with the default style use &#039;&#039;&#039;[[BitOR]]&#039;&#039;&#039;($GUI_SS_DEFAULT_GUI, newstyle,...).&lt;br /&gt;
The size specified is the size of the client area of the window.  The border and title bar will make the window slightly larger than specified. Using menu controls will also change the windows height.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Extended Style table&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | Extended Style&lt;br /&gt;
! | result&lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_ACCEPTFILES || Allow an edit or input control within the created GUI window to receive filenames via drag and drop. The control must have also the $GUI_DROPACCEPTED state set by [[GUICtrlSetState]]. for other controls the drag&amp;amp;drop info  can be retrieved with @GUI_DragId, @GUI_DragFile, @GUI_DropId. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_APPWINDOW || Forces a top-level window onto the taskbar when the window is visible. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_CLIENTEDGE || Specifies that a window has a border with a sunken edge. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_CONTEXTHELP || Includes a question mark in the title bar of the window. Cannot be used with the WS_MAXIMIZEBOX or WS_MINIMIZEBOX. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_DLGMODALFRAME || Creates a window that has a double border; the window can, optionally, be created with a title bar by specifying the WS_CAPTION style in the style parameter. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_MDICHILD || Create a child window included in its parent window (simulation not real MDI). &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_OVERLAPPEDWINDOW || Combines the WS_EX_CLIENTEDGE and WS_EX_WINDOWEDGE styles. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_STATICEDGE || Creates a window with a three-dimensional border style intended to be used for items that do not accept user input. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_TOPMOST || Specifies that a window created with this style should be placed above all non-topmost windows and should stay above them, even when the window is deactivated. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_TRANSPARENT || The window appears transparent because the bits of underlying sibling windows have already been painted. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_TOOLWINDOW || Creates a tool window; that is, a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog box that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by typing ALT+SPACE. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_WINDOWEDGE || Specifies that a window has a border with a raised edge. &lt;br /&gt;
|-&lt;br /&gt;
| $WS_EX_LAYERED || Creates a layered window. Note that this cannot be used for child windows. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To use the values specified above you must #include &amp;lt;WindowsConstants.au3&amp;gt; in your script.&lt;br /&gt;
&lt;br /&gt;
Note: The handle returned from this function is a real windows handle, which means it can be used in the same way as the result of [[WinGetHandle]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
[[GUISetParameters...]], [[GUICtrlCreate...]], [[GUIGetMsg]], [[GUISwitch]], [[GUIGetStyle]], [[GUIDelete]], [[WinGetHandle]], [[GUICtrlSetDefBkColor]], [[GUICtrlSetDefColor]], [[GUIGetCursorInfo]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;GUIConstantsEx.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	; Create a GUI with various controls.&lt;br /&gt;
	Local $hGUI = GUICreate(&amp;quot;Example&amp;quot;)&lt;br /&gt;
	Local $iOK = GUICtrlCreateButton(&amp;quot;OK&amp;quot;, 310, 370, 85, 25)&lt;br /&gt;
&lt;br /&gt;
	; Display the GUI.&lt;br /&gt;
	GUISetState(@SW_SHOW, $hGUI)&lt;br /&gt;
&lt;br /&gt;
	While 1&lt;br /&gt;
		Switch GUIGetMsg()&lt;br /&gt;
			Case $GUI_EVENT_CLOSE, $iOK&lt;br /&gt;
				ExitLoop&lt;br /&gt;
&lt;br /&gt;
		EndSwitch&lt;br /&gt;
	WEnd&lt;br /&gt;
&lt;br /&gt;
	; Delete the previous GUI and all controls.&lt;br /&gt;
	GUIDelete($hGUI)&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;GUIConstantsEx.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;WindowsConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	Local $sFilePath = &amp;quot;..\GUI\logo4.gif&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	; Create a GUI with various controls.&lt;br /&gt;
	Local $hGUI = GUICreate(&amp;quot;Example&amp;quot;, 400, 100)&lt;br /&gt;
	GUICtrlCreatePic(&amp;quot;..\GUI\msoobe.jpg&amp;quot;, 0, 0, 400, 100)&lt;br /&gt;
&lt;br /&gt;
	; Display the GUI.&lt;br /&gt;
	GUISetState(@SW_SHOW, $hGUI)&lt;br /&gt;
&lt;br /&gt;
	Local $hChild = GUICreate(&amp;quot;&amp;quot;, 169, 68, 20, 20, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $hGUI)&lt;br /&gt;
&lt;br /&gt;
	; Create a picture control with a transparent image.&lt;br /&gt;
	GUICtrlCreatePic($sFilePath, 0, 0, 169, 68)&lt;br /&gt;
&lt;br /&gt;
	; Display the child GUI.&lt;br /&gt;
	GUISetState(@SW_SHOW)&lt;br /&gt;
&lt;br /&gt;
	While 1&lt;br /&gt;
		Switch GUIGetMsg()&lt;br /&gt;
			Case $GUI_EVENT_CLOSE&lt;br /&gt;
				ExitLoop&lt;br /&gt;
&lt;br /&gt;
		EndSwitch&lt;br /&gt;
	WEnd&lt;br /&gt;
&lt;br /&gt;
	; Delete the previous GUIs and all controls.&lt;br /&gt;
	GUIDelete($hGUI)&lt;br /&gt;
	GUIDelete($hChild)&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=ControlTreeView&amp;diff=11911</id>
		<title>ControlTreeView</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=ControlTreeView&amp;diff=11911"/>
		<updated>2013-08-23T16:15:23Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039;. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Sends a command to a TreeView32 control.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:ControlTreeView ( &amp;quot;title&amp;quot;, &amp;quot;text&amp;quot;, controlID, &amp;quot;command&amp;quot; [, option1 [, option2]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| title || 	The title/hWnd/class of the window to access. See [http://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm Title special definition].&lt;br /&gt;
|-&lt;br /&gt;
| text || 	The text of the window to access.&lt;br /&gt;
|-&lt;br /&gt;
| controlID || 	The control to interact with.  See [http://www.autoitscript.com/autoit3/docs/intro/controls.htm Controls].&lt;br /&gt;
|-&lt;br /&gt;
| command || 	The command to send to the control (see below).&lt;br /&gt;
|-&lt;br /&gt;
| option1 || 	&#039;&#039;&#039;[optional]&#039;&#039;&#039; Additional parameter required by some commands.&lt;br /&gt;
|-&lt;br /&gt;
| option2 || 	&#039;&#039;&#039;[optional]&#039;&#039;&#039; Additional parameter required by some commands.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
Depends on the command as table below shows.  In case of an error (such as an invalid command or window/control could not be found) then @error is set to 1.&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Command&#039;&#039;&#039;, &#039;&#039;&#039;Option1&#039;&#039;&#039;, &#039;&#039;&#039;Option2&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;item&amp;quot; parameter is a string-based parameter that is used to reference a particular treeview item using a combination of text and indices.  Indices are 0-based.  For example:&lt;br /&gt;
&lt;br /&gt;
Heading1&lt;br /&gt;
----&amp;gt; H1SubItem1&lt;br /&gt;
----&amp;gt; H1SubItem2&lt;br /&gt;
----&amp;gt; H1SubItem3&lt;br /&gt;
----&amp;gt; ----&amp;gt; H1S1SubItem1&lt;br /&gt;
Heading2&lt;br /&gt;
Heading3&lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;level&amp;quot; is separated by |. An index is preceded with #.  Examples:&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Item&#039;&#039;&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Item Reference&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Heading2 || &amp;quot;Heading2&amp;quot; or &amp;quot;#1&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
| H1SubItem2 || &amp;quot;Heading1|H1SubItem2&amp;quot; or &amp;quot;#0|#1&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
| H1S1SubItem1 || &amp;quot;Heading1|H1SubItem3|H1S1SubItem1&amp;quot; or &amp;quot;#0|#2|#0&amp;quot; &lt;br /&gt;
|}&lt;br /&gt;
References can also be mixed like &amp;quot;Heading1|#1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
As AutoIt is a 32-bit application some commands are not available when referencing a 64-bit application as Explorer when running on 64-bit Windows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
[[ControlCommand]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;GUIConstantsEx.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;TreeViewConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;WindowsConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	Local $hGUI = GUICreate(&amp;quot;ControlTreeView Example&amp;quot;, 212, 212)&lt;br /&gt;
	Local $iTreeView_1 = GUICtrlCreateTreeView(6, 6, 200, 160, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_CHECKBOXES), $WS_EX_CLIENTEDGE)&lt;br /&gt;
	Local $hTreeView_1 = ControlGetHandle($hGUI, &amp;quot;&amp;quot;, $iTreeView_1)&lt;br /&gt;
&lt;br /&gt;
	Local $iRoot = GUICtrlCreateTreeViewItem(&amp;quot;Root&amp;quot;, $iTreeView_1)&lt;br /&gt;
	GUICtrlCreateTreeViewItem(&amp;quot;Item 1&amp;quot;, $iRoot)&lt;br /&gt;
	GUICtrlCreateTreeViewItem(&amp;quot;Item 2&amp;quot;, $iRoot)&lt;br /&gt;
	GUICtrlCreateTreeViewItem(&amp;quot;Item 3&amp;quot;, $iRoot)&lt;br /&gt;
	Local $iItem_4 = GUICtrlCreateTreeViewItem(&amp;quot;Item 4&amp;quot;, $iRoot)&lt;br /&gt;
	GUICtrlCreateTreeViewItem(&amp;quot;Item 4.1&amp;quot;, $iItem_4)&lt;br /&gt;
	GUICtrlCreateTreeViewItem(&amp;quot;Item 4.2&amp;quot;, $iItem_4)&lt;br /&gt;
	GUICtrlCreateTreeViewItem(&amp;quot;Item 5&amp;quot;, $iRoot)&lt;br /&gt;
&lt;br /&gt;
	GUISetState(@SW_SHOW, $hGUI)&lt;br /&gt;
&lt;br /&gt;
	ControlTreeView($hGUI, &amp;quot;&amp;quot;, $hTreeView_1, &amp;quot;Expand&amp;quot;, &amp;quot;Root&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	ControlTreeView($hGUI, &amp;quot;&amp;quot;, $hTreeView_1, &amp;quot;Exists&amp;quot;, &amp;quot;Root|Item 4&amp;quot;)&lt;br /&gt;
	ControlTreeView($hGUI, &amp;quot;&amp;quot;, $hTreeView_1, &amp;quot;Check&amp;quot;, &amp;quot;Root|Item 4&amp;quot;)&lt;br /&gt;
	ControlTreeView($hGUI, &amp;quot;&amp;quot;, $hTreeView_1, &amp;quot;Select&amp;quot;, &amp;quot;Root|Item 4&amp;quot;)&lt;br /&gt;
	ControlTreeView($hGUI, &amp;quot;&amp;quot;, $hTreeView_1, &amp;quot;Expand&amp;quot;, &amp;quot;Root|Item 4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	While 1&lt;br /&gt;
		Switch GUIGetMsg()&lt;br /&gt;
			Case $GUI_EVENT_CLOSE&lt;br /&gt;
				ExitLoop&lt;br /&gt;
		EndSwitch&lt;br /&gt;
	WEnd&lt;br /&gt;
&lt;br /&gt;
	GUIDelete($hGUI)&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=StringSplit&amp;diff=11910</id>
		<title>StringSplit</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=StringSplit&amp;diff=11910"/>
		<updated>2013-08-23T16:14:43Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039;. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Splits up a string into substrings depending on the given delimiters.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:StringSplit ( &amp;quot;string&amp;quot;, &amp;quot;delimiters&amp;quot; [, flag = 0] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| string || 	The string to evaluate.&lt;br /&gt;
|-&lt;br /&gt;
| delimiters || 	One or more characters to use as delimiters (case sensitive).&lt;br /&gt;
|-&lt;br /&gt;
| flag || 	&#039;&#039;&#039;[optional]&#039;&#039;&#039; Changes how the string split works, add multiple flag values together if required:&lt;br /&gt;
|-&lt;br /&gt;
| || 	$STR_CHRSPLIT (0) = each character in the delimiter string will mark where to split the string (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	$STR_ENTIRESPLIT (1) = entire delimiter string is needed to mark the split&lt;br /&gt;
|-&lt;br /&gt;
| || 	$STR_NOCOUNT (2) = disable the return count in the first element - effectively makes the array 0-based (must use UBound() to get the size of the array in this case).&lt;br /&gt;
|-&lt;br /&gt;
| || 	Constants are defined in Constants.au3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
Returns an array, by default the first element ($aArray[0]) contains the number of strings returned, the remaining elements ($aArray[1], $aArray[2], etc.) contain the delimited strings. If the flag parameter is set to $STR_NOCOUNT (2) then the count is not returned in the first element.&lt;br /&gt;
&lt;br /&gt;
If no delimiters were found then @error is set to 1, count is equal to 1 ($aArray[0]) and the full string is returned ($aArray[1]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
If you use an empty string &amp;quot;&amp;quot; for the delimiters, each character will be returned as an element.&lt;br /&gt;
&lt;br /&gt;
If the delimiter you wish to use is a substring instead of individual single characters, see the example below.&lt;br /&gt;
&lt;br /&gt;
[[StringSplit]] is very useful as an alternative to [[StringInStr]] as well as a means to populate an array.&lt;br /&gt;
&lt;br /&gt;
Note that if you use the macro @CRLF you are referring to a 2 character string, so this will generate extra blanks lines. Therefore it is recommended to set the flag parameter to $STR_ENTIRESPLIT (1).&lt;br /&gt;
&lt;br /&gt;
To use the values specified above you must #include &amp;lt;StringConstants.au3&amp;gt; in your script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
[[StringInStr]], [[StringLeft]], [[StringLen]], [[StringLower]], [[StringMid]], [[StringRight]], [[StringTrimLeft]], [[StringTrimRight]], [[StringUpper]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	Local $aDays = StringSplit(&amp;quot;Mon,Tues,Wed,Thur,Fri,Sat,Sun&amp;quot;, &amp;quot;,&amp;quot;) ; Split the string of days using the delimeter &amp;quot;,&amp;quot; and the default flag value.&lt;br /&gt;
	#cs&lt;br /&gt;
		The array returned will contain the following values:&lt;br /&gt;
		$aDays[1] = &amp;quot;Mon&amp;quot;&lt;br /&gt;
		$aDays[2] = &amp;quot;Tues&amp;quot;&lt;br /&gt;
		$aDays[3] = &amp;quot;Wed&amp;quot;&lt;br /&gt;
		...&lt;br /&gt;
		$aDays[7] = &amp;quot;Sun&amp;quot;&lt;br /&gt;
	#ce&lt;br /&gt;
&lt;br /&gt;
	For $i = 1 To $aDays[0] ; Loop through the array returned by StringSplit to display the individual values.&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;$aDays[&amp;quot; &amp;amp; $i &amp;amp; &amp;quot;] - &amp;quot; &amp;amp; $aDays[$i])&lt;br /&gt;
	Next&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;StringConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	Local $sText = &amp;quot;This\nline\ncontains\nC-style breaks.&amp;quot; ; Define a variable with a string of text.&lt;br /&gt;
	Local $aArray = StringSplit($sText, &#039;\n&#039;, $STR_ENTIRESPLIT) ; Pass the variable to StringSplit and using the delimeter &amp;quot;\n&amp;quot;.&lt;br /&gt;
	; Note that flag paramter is set to $STR_ENTIRESPLIT (1) as it would split at \ or n otherwise.&lt;br /&gt;
	#cs&lt;br /&gt;
		The array returned will contain the following values:&lt;br /&gt;
		$aArray[1] = &amp;quot;This&amp;quot;&lt;br /&gt;
		$aArray[2] = &amp;quot;line&amp;quot;&lt;br /&gt;
		...&lt;br /&gt;
		$aArray[4] = &amp;quot;C-style breaks.&amp;quot;&lt;br /&gt;
	#ce&lt;br /&gt;
&lt;br /&gt;
	For $i = 1 To $aArray[0] ; Loop through the array returned by StringSplit to display the individual values.&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;$aArray[&amp;quot; &amp;amp; $i &amp;amp; &amp;quot;] - &amp;quot; &amp;amp; $aArray[$i])&lt;br /&gt;
	Next&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;StringConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	Local $sText = &amp;quot;This\nline\ncontains\nC-style breaks.&amp;quot; ; Define a variable with a string of text.&lt;br /&gt;
&lt;br /&gt;
	; Pass the variable to StringSplit and using the delimeter &amp;quot;\n&amp;quot;.&lt;br /&gt;
	; Note that flag paramter is set to $STR_ENTIRESPLIT (1) as it would split at \ or n otherwise.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, StringSplit($sText, &#039;\n&#039;, $STR_ENTIRESPLIT)[2]) ; Directly access the array index by using array access on expression.&lt;br /&gt;
	#cs&lt;br /&gt;
		An internal temporary array is used to return a string that may contain one of the following values:&lt;br /&gt;
		$aArray[1] = &amp;quot;This&amp;quot;&lt;br /&gt;
		$aArray[2] = &amp;quot;line&amp;quot;&lt;br /&gt;
		...&lt;br /&gt;
		$aArray[4] = &amp;quot;C-style breaks.&amp;quot;&lt;br /&gt;
	#ce&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=GUIRegisterMsg&amp;diff=11909</id>
		<title>GUIRegisterMsg</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=GUIRegisterMsg&amp;diff=11909"/>
		<updated>2013-08-23T16:13:54Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039;. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Register a user defined function for a known Windows Message ID (WM_MSG).&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:GUIRegisterMsg ( msgID, &amp;quot;function&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| msgID || 	A Windows Message ID (see Appendix: [http://www.autoitscript.com/autoit3/docs/appendix/WinMsgCodes.htm Windows Message Codes]).&lt;br /&gt;
|-&lt;br /&gt;
| function || 	The name of the user function to call when the message appears or an empty string &amp;quot;&amp;quot; to unregister a message.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| Success: || 	1&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
To make the user function workable you have to define it with &#039;&#039;&#039;maximum 4 function parameters&#039;&#039;&#039; otherwise the function won&#039;t be called!&lt;br /&gt;
&lt;br /&gt;
i.e:&lt;br /&gt;
Func MyUserFunction($hWndGUI, $MsgID, $WParam, $LParam)&lt;br /&gt;
...&lt;br /&gt;
EndFunc&lt;br /&gt;
&lt;br /&gt;
Or&lt;br /&gt;
&lt;br /&gt;
Func MyUserFunction($hWndGUI, $MsgID)&lt;br /&gt;
...&lt;br /&gt;
EndFunc&lt;br /&gt;
&lt;br /&gt;
When the user function is called then these 4 parameters have the following values:&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Position&#039;&#039;&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || hWnd || The Window handle of the GUI in which the message appears. &lt;br /&gt;
|-&lt;br /&gt;
| 2 || Msg || The Windows message ID. &lt;br /&gt;
|-&lt;br /&gt;
| 3 || wParam || The first message parameter as hex value. &lt;br /&gt;
|-&lt;br /&gt;
| 4 || lParam || The second message parameter as hex value. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Up to 256 user functions can be registered for message IDs.&lt;br /&gt;
&lt;br /&gt;
By default after finishing the user function the AutoIt internal message handler will be proceed.&lt;br /&gt;
That won&#039;t be if your &#039;&#039;&#039;Return&#039;&#039;&#039; a value (See WM_COMMAND in example) or if you use the keyword &#039;Return&#039; without any value.&lt;br /&gt;
By using &#039;Return&#039; without any return value the AutoIt internal message handler (if there is one for this message) will NOT be proceed!&lt;br /&gt;
&lt;br /&gt;
If you want AutoIt to run its internal handler for a message, return the variable &#039;&#039;&#039;$GUI_RUNDEFMSG&#039;&#039;&#039; (in GUIConstantsEx.au3) from the function (see also examples)!&lt;br /&gt;
&lt;br /&gt;
I.e. if you want to return earlier than the user function ends and also proceed the AutoIt internal message handler.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; blocking of running user functions which executes window messages with commands such as &amp;quot;[[MsgBox]]&amp;quot; can lead to unexpected behavior, the return to the system should be as fast as possible!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some controls consume internally specific Windows Message ID, so registering them will have no effect, e.g; WM_CHAR, WM_KEYDOWN, WM_KEYUP are consumed by an edit control.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
[[GUICtrlGetHandle]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
; Create an ownerdrawn/colored button&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;GUIConstantsEx.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;WindowsConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;ButtonConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	Local Const $BS_OWNERDRAW = 0x0000000B&lt;br /&gt;
	Local $iButton = 0, $iButton2 = 0, $iMsg = 0&lt;br /&gt;
&lt;br /&gt;
	GUICreate(&amp;quot;My Ownerdrawn Created Button&amp;quot;, 300, 200)&lt;br /&gt;
&lt;br /&gt;
	$iButton = GUICtrlCreateButton(&amp;quot;&amp;quot;, 90, 50, 120, 30)&lt;br /&gt;
	GUICtrlSetStyle($iButton, BitOR($WS_TABSTOP, $BS_NOTIFY, $BS_OWNERDRAW)) ; Set the ownerdrawn flag&lt;br /&gt;
&lt;br /&gt;
	$iButton2 = GUICtrlCreateButton(&amp;quot;Normal Button&amp;quot;, 90, 110, 120, 30)&lt;br /&gt;
&lt;br /&gt;
	GUIRegisterMsg($WM_COMMAND, &amp;quot;MY_WM_COMMAND&amp;quot;)&lt;br /&gt;
	; WM_DRAWITEM has to registered before showing GUI otherwise the initial drawing isn&#039;t done&lt;br /&gt;
	GUIRegisterMsg($WM_DRAWITEM, &amp;quot;MY_WM_DRAWITEM&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	GUISetState()&lt;br /&gt;
&lt;br /&gt;
	While 1&lt;br /&gt;
		$iMsg = GUIGetMsg()&lt;br /&gt;
&lt;br /&gt;
		Switch $iMsg&lt;br /&gt;
			Case $GUI_EVENT_CLOSE&lt;br /&gt;
				ExitLoop&lt;br /&gt;
&lt;br /&gt;
			Case $iButton&lt;br /&gt;
				; Normally should not run through cause of our MY_WM_COMMAND function&lt;br /&gt;
				MsgBox($MB_SYSTEMMODAL, &amp;quot;Info&amp;quot;, &amp;quot;Button pressed&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
			Case $iButton2&lt;br /&gt;
				; Normally should not run through cause of our MY_WM_COMMAND function&lt;br /&gt;
				MsgBox($MB_SYSTEMMODAL, &amp;quot;Info&amp;quot;, &amp;quot;Button2 pressed&amp;quot;)&lt;br /&gt;
		EndSwitch&lt;br /&gt;
	WEnd&lt;br /&gt;
&lt;br /&gt;
	GUIDelete()&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&lt;br /&gt;
; React on a button click&lt;br /&gt;
Func MY_WM_COMMAND($hWnd, $Msg, $wParam, $lParam)&lt;br /&gt;
	Local $nNotifyCode = BitShift($wParam, 16)&lt;br /&gt;
	Local $nID = BitAND($wParam, 0x0000FFFF)&lt;br /&gt;
	Local $hCtrl = $lParam&lt;br /&gt;
&lt;br /&gt;
	If $nID &amp;lt;&amp;gt; 2 And $nNotifyCode = 0 Then ; Check for IDCANCEL - 2&lt;br /&gt;
		; Ownerdrawn buttons don&#039;t send something by pressing ENTER&lt;br /&gt;
		; So IDOK - 1 comes up, now check for the control that has the current focus&lt;br /&gt;
		If $nID = 1 Then&lt;br /&gt;
			Local $hFocus = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;GetFocus&amp;quot;)&lt;br /&gt;
			Local $nCtrlID = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;GetDlgCtrlID&amp;quot;, &amp;quot;hwnd&amp;quot;, $hFocus[0])&lt;br /&gt;
			PostButtonClick($hWnd, $nCtrlID[0])&lt;br /&gt;
		Else&lt;br /&gt;
			MsgBox($MB_SYSTEMMODAL, &amp;quot;MY_WM_COMMAND&amp;quot;, &amp;quot;GUIHWnd&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $hWnd &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;MsgID&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $Msg &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;wParam&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $wParam &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;lParam&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $lParam &amp;amp; @CRLF &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;WM_COMMAND - Infos:&amp;quot; &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;-----------------------------&amp;quot; &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;Code&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $nNotifyCode &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;CtrlID&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $nID &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;CtrlHWnd&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $hCtrl)&lt;br /&gt;
		EndIf&lt;br /&gt;
		Return 0 ; Only workout clicking on the button&lt;br /&gt;
	EndIf&lt;br /&gt;
	; Proceed the default AutoIt3 internal message commands.&lt;br /&gt;
	; You also can complete let the line out.&lt;br /&gt;
	;!&lt;br /&gt;
 But only &#039;Return&#039; (without any value) will not proceed&lt;br /&gt;
	; the default AutoIt3-message in the future!&lt;br /&gt;
&lt;br /&gt;
	Return $GUI_RUNDEFMSG&lt;br /&gt;
EndFunc   ;==&amp;gt;MY_WM_COMMAND&lt;br /&gt;
&lt;br /&gt;
; RePost a WM_COMMAND message to a ctrl in a gui window&lt;br /&gt;
Func PostButtonClick($hWnd, $nCtrlID)&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;PostMessage&amp;quot;, _&lt;br /&gt;
			&amp;quot;hwnd&amp;quot;, $hWnd, _&lt;br /&gt;
			&amp;quot;int&amp;quot;, $WM_COMMAND, _&lt;br /&gt;
			&amp;quot;int&amp;quot;, BitAND($nCtrlID, 0x0000FFFF), _&lt;br /&gt;
			&amp;quot;hwnd&amp;quot;, GUICtrlGetHandle($nCtrlID))&lt;br /&gt;
EndFunc   ;==&amp;gt;PostButtonClick&lt;br /&gt;
&lt;br /&gt;
; Draw the button&lt;br /&gt;
Func MY_WM_DRAWITEM($hWnd, $Msg, $wParam, $lParam)&lt;br /&gt;
	#forceref $Msg, $wParam, $lParam&lt;br /&gt;
	Local $stDrawItem = DllStructCreate(&amp;quot;uint;uint;uint;uint;uint;uint;uint;int[4];dword&amp;quot;, $lParam)&lt;br /&gt;
	Local Const $ODT_BUTTON = 4&lt;br /&gt;
&lt;br /&gt;
	Local $nCtlType = DllStructGetData($stDrawItem, 1)&lt;br /&gt;
	If $nCtlType = $ODT_BUTTON Then&lt;br /&gt;
		; Local $nCtrlID = DllStructGetData($stDrawItem, 2)&lt;br /&gt;
		Local $nItemState = DllStructGetData($stDrawItem, 5)&lt;br /&gt;
		Local $hCtrl = DllStructGetData($stDrawItem, 6)&lt;br /&gt;
		Local $hDC = DllStructGetData($stDrawItem, 7)&lt;br /&gt;
		Local $nLeft = DllStructGetData($stDrawItem, 8, 1)&lt;br /&gt;
		Local $nTop = DllStructGetData($stDrawItem, 8, 2)&lt;br /&gt;
		Local $nRight = DllStructGetData($stDrawItem, 8, 3)&lt;br /&gt;
		Local $nBottom = DllStructGetData($stDrawItem, 8, 4)&lt;br /&gt;
		Local $sText = &amp;quot;Ownerdrawn Button&amp;quot;&lt;br /&gt;
		Local $nTextColor = 0x5555DD&lt;br /&gt;
		Local $nBackColor = 0xFFEEDD&lt;br /&gt;
		DrawButton($hWnd, $hCtrl, $hDC, $nLeft, $nTop, $nRight, $nBottom, $nItemState, $sText, $nTextColor, $nBackColor)&lt;br /&gt;
		$stDrawItem = 0&lt;br /&gt;
		Return 1&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	$stDrawItem = 0&lt;br /&gt;
	Return $GUI_RUNDEFMSG ; Proceed the default AutoIt3 internal message commands&lt;br /&gt;
EndFunc   ;==&amp;gt;MY_WM_DRAWITEM&lt;br /&gt;
&lt;br /&gt;
; The main drawing procedure&lt;br /&gt;
Func DrawButton($hWnd, $hCtrl, $hDC, $nLeft, $nTop, $nRight, $nBottom, $nItemState, $sText, $nTextColor, $nBackColor)&lt;br /&gt;
	#forceref $hWnd&lt;br /&gt;
	;Local $bDefault	= FALSE&lt;br /&gt;
	Local Const $GWL_STYLE = -16&lt;br /&gt;
	Local Const $ODS_SELECTED = 0x0001&lt;br /&gt;
	Local Const $ODS_GRAYED = 0x0002&lt;br /&gt;
	Local Const $ODS_DISABLED = 0x0004&lt;br /&gt;
	; Local Const $ODS_CHECKED = 0x0008&lt;br /&gt;
	Local Const $ODS_FOCUS = 0x0010&lt;br /&gt;
	; Local Const $ODS_HOTLIGHT = 0x0040&lt;br /&gt;
	; Local Const $ODS_INACTIVE = 0x0080&lt;br /&gt;
	; Local Const $ODS_NOACCEL = 0x0100&lt;br /&gt;
	; Local Const $ODS_NOFOCUSRECT = 0x0200&lt;br /&gt;
	Local Const $DFC_BUTTON = 4&lt;br /&gt;
	Local Const $DFCS_BUTTONPUSH = 0x0010&lt;br /&gt;
	; Local $bChecked = BitAND($nItemState, $ODS_CHECKED)&lt;br /&gt;
	Local $bFocused = BitAND($nItemState, $ODS_FOCUS)&lt;br /&gt;
	Local $bGrayed = BitAND($nItemState, BitOR($ODS_GRAYED, $ODS_DISABLED))&lt;br /&gt;
	Local $bSelected = BitAND($nItemState, $ODS_SELECTED)&lt;br /&gt;
&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	Local $nClrTxt&lt;br /&gt;
	If $bGrayed Then&lt;br /&gt;
		$nClrTxt = SetTextColor($hDC, GetSysColor($COLOR_HIGHLIGHTTEXT))&lt;br /&gt;
	ElseIf $nTextColor = -1 Then&lt;br /&gt;
		$nClrTxt = SetTextColor($hDC, GetSysColor($COLOR_BTNTEXT))&lt;br /&gt;
	Else&lt;br /&gt;
		$nClrTxt = SetTextColor($hDC, $nTextColor)&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	Local $hBrush, $nClrSel&lt;br /&gt;
	If $nBackColor = -1 Then&lt;br /&gt;
		$hBrush = GetSysColorBrush($COLOR_BTNFACE)&lt;br /&gt;
		$nClrSel = GetSysColor($COLOR_BTNFACE)&lt;br /&gt;
	Else&lt;br /&gt;
		$hBrush = CreateSolidBrush($nBackColor)&lt;br /&gt;
		$nClrSel = $nBackColor;&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	Local $nClrBk = SetBkColor($hDC, $nClrSel)&lt;br /&gt;
	Local $hOldBrush = SelectObject($hDC, $hBrush)&lt;br /&gt;
&lt;br /&gt;
	Local $nTmpLeft = $nLeft&lt;br /&gt;
	Local $nTmpTop = $nTop&lt;br /&gt;
	Local $nTmpRight = $nRight&lt;br /&gt;
	Local $nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
	If $bSelected Then&lt;br /&gt;
		InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -1, -1)&lt;br /&gt;
		Local $hBrushSel = CreateSolidBrush(GetSysColor($COLOR_BTNSHADOW))&lt;br /&gt;
		FrameRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $hBrushSel)&lt;br /&gt;
		DeleteObject($hBrushSel)&lt;br /&gt;
	Else&lt;br /&gt;
		If $bFocused And Not $bSelected Then InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -1, -1)&lt;br /&gt;
		DrawFrameControl($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $DFC_BUTTON, $DFCS_BUTTONPUSH)&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	$nTmpLeft = $nLeft&lt;br /&gt;
	$nTmpTop = $nTop&lt;br /&gt;
	$nTmpRight = $nRight&lt;br /&gt;
	$nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
	If $bSelected Then&lt;br /&gt;
		InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -2, -2)&lt;br /&gt;
	Else&lt;br /&gt;
		If $bFocused And Not $bSelected Then&lt;br /&gt;
			InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -3, -3)&lt;br /&gt;
			$nTmpLeft -= 1&lt;br /&gt;
			$nTmpTop -= 1&lt;br /&gt;
		Else&lt;br /&gt;
			InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -2, -2)&lt;br /&gt;
			$nTmpLeft -= 1&lt;br /&gt;
			$nTmpTop -= 1&lt;br /&gt;
		EndIf&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	FillRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $hBrush)&lt;br /&gt;
&lt;br /&gt;
	If $bSelected Or $bGrayed Then&lt;br /&gt;
		$nTmpLeft = $nTmpLeft + 2&lt;br /&gt;
		$nTmpTop = $nTmpTop + 2&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	Local $uFlags = BitOR($DT_NOCLIP, $DT_CENTER, $DT_VCENTER)&lt;br /&gt;
&lt;br /&gt;
	If Not BitAND(GetWindowLong($hCtrl, $GWL_STYLE), $BS_MULTILINE) Then $uFlags = BitOR($uFlags, $DT_SINGLELINE)&lt;br /&gt;
&lt;br /&gt;
	DrawText($hDC, $sText, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $uFlags)&lt;br /&gt;
&lt;br /&gt;
	If $bGrayed Then&lt;br /&gt;
		$nTmpLeft = $nLeft&lt;br /&gt;
		$nTmpTop = $nTop&lt;br /&gt;
		$nTmpRight = $nRight&lt;br /&gt;
		$nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
		$nTmpLeft -= 1&lt;br /&gt;
&lt;br /&gt;
		$nClrTxt = SetTextColor($hDC, GetSysColor($COLOR_GRAYTEXT))&lt;br /&gt;
		DrawText($hDC, $sText, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, BitOR($DT_NOCLIP, $DT_CENTER, $DT_VCENTER, $DT_SINGLELINE))&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	$nTmpLeft = $nLeft&lt;br /&gt;
	$nTmpTop = $nTop&lt;br /&gt;
	$nTmpRight = $nRight&lt;br /&gt;
	$nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
	If $bFocused Then&lt;br /&gt;
		$hBrush = CreateSolidBrush(0)&lt;br /&gt;
		FrameRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $hBrush)&lt;br /&gt;
&lt;br /&gt;
		$nTmpLeft = $nLeft&lt;br /&gt;
		$nTmpTop = $nTop&lt;br /&gt;
		$nTmpRight = $nRight&lt;br /&gt;
		$nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
		InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -4, -4)&lt;br /&gt;
		DrawFocusRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom)&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	SelectObject($hDC, $hOldBrush)&lt;br /&gt;
	DeleteObject($hBrush)&lt;br /&gt;
	SetTextColor($hDC, $nClrTxt)&lt;br /&gt;
	SetBkColor($hDC, $nClrBk)&lt;br /&gt;
&lt;br /&gt;
	Return 1&lt;br /&gt;
EndFunc   ;==&amp;gt;DrawButton&lt;br /&gt;
&lt;br /&gt;
; Some graphic / windows functions&lt;br /&gt;
Func CreateSolidBrush($nColor)&lt;br /&gt;
	Local $hBrush = DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;CreateSolidBrush&amp;quot;, &amp;quot;int&amp;quot;, $nColor)&lt;br /&gt;
	Return $hBrush[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;CreateSolidBrush&lt;br /&gt;
&lt;br /&gt;
Func GetSysColor($nIndex)&lt;br /&gt;
	Local $nColor = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;GetSysColor&amp;quot;, &amp;quot;int&amp;quot;, $nIndex)&lt;br /&gt;
	Return $nColor[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;GetSysColor&lt;br /&gt;
&lt;br /&gt;
Func GetSysColorBrush($nIndex)&lt;br /&gt;
	Local $hBrush = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;GetSysColorBrush&amp;quot;, &amp;quot;int&amp;quot;, $nIndex)&lt;br /&gt;
	Return $hBrush[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;GetSysColorBrush&lt;br /&gt;
&lt;br /&gt;
Func DrawFrameControl($hDC, $nLeft, $nTop, $nRight, $nBottom, $nType, $nState)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;DrawFrameControl&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;int&amp;quot;, $nType, &amp;quot;int&amp;quot;, $nState)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;DrawFrameControl&lt;br /&gt;
&lt;br /&gt;
Func DrawFocusRect($hDC, $nLeft, $nTop, $nRight, $nBottom)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;DrawFocusRect&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect))&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;DrawFocusRect&lt;br /&gt;
&lt;br /&gt;
Func DrawText($hDC, $sText, $nLeft, $nTop, $nRight, $nBottom, $nFormat)&lt;br /&gt;
	Local $nLen = StringLen($sText)&lt;br /&gt;
&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	Local $stText = DllStructCreate(&amp;quot;char[260]&amp;quot;)&lt;br /&gt;
	DllStructSetData($stText, 1, $sText)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;DrawText&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stText), &amp;quot;int&amp;quot;, $nLen, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;int&amp;quot;, $nFormat)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
	$stText = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;DrawText&lt;br /&gt;
&lt;br /&gt;
Func FillRect($hDC, $nLeft, $nTop, $nRight, $nBottom, $hBrush)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;FillRect&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;hwnd&amp;quot;, $hBrush)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;FillRect&lt;br /&gt;
&lt;br /&gt;
Func FrameRect($hDC, $nLeft, $nTop, $nRight, $nBottom, $hBrush)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;FrameRect&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;hwnd&amp;quot;, $hBrush)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;FrameRect&lt;br /&gt;
&lt;br /&gt;
Func InflateRect(ByRef $nLeft, ByRef $nTop, ByRef $nRight, ByRef $nBottom, $nX, $nY)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;InflateRect&amp;quot;, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;int&amp;quot;, $nX, &amp;quot;int&amp;quot;, $nY)&lt;br /&gt;
&lt;br /&gt;
	$nLeft = DllStructGetData($stRect, 1)&lt;br /&gt;
	$nTop = DllStructGetData($stRect, 2)&lt;br /&gt;
	$nRight = DllStructGetData($stRect, 3)&lt;br /&gt;
	$nBottom = DllStructGetData($stRect, 4)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;InflateRect&lt;br /&gt;
&lt;br /&gt;
Func SetBkColor($hDC, $nColor)&lt;br /&gt;
	Local $nOldColor = DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;SetBkColor&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;int&amp;quot;, $nColor)&lt;br /&gt;
	Return $nOldColor[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;SetBkColor&lt;br /&gt;
&lt;br /&gt;
Func SetTextColor($hDC, $nColor)&lt;br /&gt;
	Local $nOldColor = DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;SetTextColor&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;int&amp;quot;, $nColor)&lt;br /&gt;
	Return $nOldColor[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;SetTextColor&lt;br /&gt;
&lt;br /&gt;
Func SelectObject($hDC, $hObj)&lt;br /&gt;
	Local $hOldObj = DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;SelectObject&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;hwnd&amp;quot;, $hObj)&lt;br /&gt;
	Return $hOldObj[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;SelectObject&lt;br /&gt;
&lt;br /&gt;
Func DeleteObject($hObj)&lt;br /&gt;
	DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;DeleteObject&amp;quot;, &amp;quot;hwnd&amp;quot;, $hObj)&lt;br /&gt;
EndFunc   ;==&amp;gt;DeleteObject&lt;br /&gt;
&lt;br /&gt;
Func GetWindowLong($hWnd, $nIndex)&lt;br /&gt;
	Local $nVal = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;GetWindowLong&amp;quot;, &amp;quot;hwnd&amp;quot;, $hWnd, &amp;quot;int&amp;quot;, $nIndex)&lt;br /&gt;
	Return $nVal[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;GetWindowLong&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=ControlCommand&amp;diff=11908</id>
		<title>ControlCommand</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=ControlCommand&amp;diff=11908"/>
		<updated>2013-08-23T16:13:03Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039;. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Sends a command to a control.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:ControlCommand ( &amp;quot;title&amp;quot;, &amp;quot;text&amp;quot;, controlID, &amp;quot;command&amp;quot; [, &amp;quot;option&amp;quot;] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| title || 	The title/hWnd/class of the window to access. See [http://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm Title special definition].&lt;br /&gt;
|-&lt;br /&gt;
| text || 	The text of the window to access.&lt;br /&gt;
|-&lt;br /&gt;
| controlID || 	The control to interact with.  See [http://www.autoitscript.com/autoit3/docs/intro/controls.htm Controls].&lt;br /&gt;
|-&lt;br /&gt;
| command || 	The command to send to the control.&lt;br /&gt;
|-&lt;br /&gt;
| option || 	&#039;&#039;&#039;[optional]&#039;&#039;&#039; Additional parameter required by some commands.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
Depends on command as table below shows.  In case of an error (such as an invalid command or window/control), @error=1.&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Command&#039;&#039;&#039;, &#039;&#039;&#039;Option&#039;&#039;&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsVisible&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Control is visible, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsEnabled&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Control is enabled, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;ShowDropDown&amp;quot;, &amp;quot;&amp;quot; || Displays the ComboBox dropdown&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;HideDropDown&amp;quot;, &amp;quot;&amp;quot; || Hides the ComboBox dropdown&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;AddString&amp;quot;, &#039;string&#039; || Adds a string to the end in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;DelString&amp;quot;, occurrence || Deletes a string according to occurrence in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;FindString&amp;quot;, &#039;string&#039; || Returns occurrence ref of the exact string in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SetCurrentSelection&amp;quot;, &#039;&#039;occurrence&#039;&#039; || Sets selection to occurrence ref in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SelectString&amp;quot;, &#039;string&#039; || Sets selection according to string in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsChecked&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Button is checked, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;Check&amp;quot;, &amp;quot;&amp;quot; || Checks radio or check Button&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;UnCheck&amp;quot;, &amp;quot;&amp;quot; || Unchecks radio or check Button&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentLine&amp;quot;, &amp;quot;&amp;quot; || Returns the line # where the caret is in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentCol&amp;quot;, &amp;quot;&amp;quot; || Returns the column # where the caret is in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentSelection&amp;quot;, &amp;quot;&amp;quot; || Returns name of the currently selected item in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetLineCount&amp;quot;, &amp;quot;&amp;quot; || Returns # of lines in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetLine&amp;quot;, &#039;&#039;line&#039;&#039;# || Returns text at line # passed of an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetSelected&amp;quot;, &amp;quot;&amp;quot; || Returns selected text of an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;EditPaste&amp;quot;, &#039;string&#039; || Pastes the &#039;string&#039; at the Edit&#039;s caret position&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;CurrentTab&amp;quot;, &amp;quot;&amp;quot; || Returns the current Tab shown of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;TabRight&amp;quot;, &amp;quot;&amp;quot; || Moves to the next tab to the right of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;TabLeft&amp;quot;, &amp;quot;&amp;quot; || Moves to the next tab to the left of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SendCommandID&amp;quot;, &#039;&#039;Command ID&#039;&#039; || Simulates the WM_COMMAND message. Usually used for ToolbarWindow32 controls - use the ToolBar tab of Au3Info to get the Command ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
Some controls will resist automation unless they are the active window. Use the [[WinActivate]] function to force the control&#039;s window to the top before using [[ControlCommand]] on these controls.&lt;br /&gt;
&lt;br /&gt;
Certain commands that work on normal Combo and ListBoxes do not work on &amp;quot;ComboLBox&amp;quot; controls.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
[[ControlClick]], [[ControlDisable]], [[ControlEnable]], [[ControlFocus]], [[ControlGetPos]], [[ControlGetText]], [[ControlHide]], [[ControlMove]], [[ControlSetText]], [[ControlShow]], [[StatusbarGetText]], [[WinActivate]], [[WinMenuSelectItem]], [[WinGetClassList]], [[ControlGetFocus]], [[ControlListView]], [[ControlSend]], [[ControlTreeView]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	; Run Notepad&lt;br /&gt;
	Run(&amp;quot;notepad.exe&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	; Wait 10 seconds for the Notepad window to appear.&lt;br /&gt;
	Local $hWnd = WinWait(&amp;quot;[CLASS:Notepad]&amp;quot;, &amp;quot;&amp;quot;, 10)&lt;br /&gt;
&lt;br /&gt;
	; Send a command to the edit control of Notepad to find the number of lines. The handle returned by WinWait is used for the &amp;quot;title&amp;quot; parameter of ControlCommand.&lt;br /&gt;
	Local $iCount = ControlCommand($hWnd, &amp;quot;&amp;quot;, &amp;quot;Edit1&amp;quot;, &amp;quot;GetLineCount&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	; Display the number of lines.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;The number of lines in Notepad are: &amp;quot; &amp;amp; $iCount)&lt;br /&gt;
&lt;br /&gt;
	; Close the Notepad window using the handle returned by WinWait.&lt;br /&gt;
	WinClose($hWnd)&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11907</id>
		<title>AutoItSetOption</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11907"/>
		<updated>2013-08-23T16:10:47Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039;. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Changes the operation of various AutoIt functions/parameters.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:AutoItSetOption ( &amp;quot;option&amp;quot; [, param] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| option || 	The option to change. See Remarks.&lt;br /&gt;
|-&lt;br /&gt;
| param || 	&#039;&#039;&#039;[optional]&#039;&#039;&#039; The value to assign to the option. The type and meaning vary by option. See remarks below. If the param is not provided, then the function just returns the value already assigned to the option. The keyword [http://www.autoitscript.com/autoit3/docs/keywords/Default.htm Default] can be used for the parameter to reset the option to its default value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| Success: || 	Returns the value of the previous setting for the option.&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	Sets @error to non-zero. Failure will occur if the parameters are invalid (such as an option that doesn&#039;t exist).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
You may use [[Opt]] as an alternative to [[AutoItSetOption]].&lt;br /&gt;
&lt;br /&gt;
Options are as follows:&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Option&#039;&#039;&#039; || 	&#039;&#039;&#039;Param&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || 	Sets the way coords are used in the caret functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = relative coords to the active window&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || 	Changes how literal strings and % symbols are interpreted. By default strings are treated literally, this option allows you to use %environment% variables inside strings, e.g., &amp;quot;The temp directory is: %temp%&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = do not expand environment variables (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = expand environment variables&lt;br /&gt;
|-&lt;br /&gt;
| || 	Without this option the usual way would be: 	&amp;quot;The temp directory is: &amp;quot; &amp;amp; [[EnvGet]](&amp;quot;temp&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || 	Changes how literal strings and variable/macro ($ and @) symbols are interpreted. By default strings are treated literally, this option allows you to use variables and macros inside strings, e.g., &amp;quot;The value of var1 is $var1$&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = do not expand variables (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = expand variables (when in this mode and you want to use a literal $ or @ then double it up: &amp;quot;This is a single dollar $$ sign&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || 	When ESC is pressed on a GUI the $GUI_EVENT_CLOSE message is sent. This option toggles this behavior on and off.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = Don&#039;t send the $GUI_EVENT_CLOSE message when ESC is pressed.&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = [[Send]] the $GUI_EVENT_CLOSE message when ESC is pressed (default).&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || 	Alters the position of a control defined by [[GUICtrlSetPos]].&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = relative position to the start of the last control (upper left corner).&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = absolute coordinates (default) still relative to the dialog box.&lt;br /&gt;
|-&lt;br /&gt;
| || 	2 = cell positioning relative to current cell. A -1 for left or top parameter don&#039;t increment the start.&lt;br /&gt;
|-&lt;br /&gt;
| || 	So next line is -1, offset; next cell is offset,-1; current cell is -1,-1.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Obviously &amp;quot;offset&amp;quot; cannot be -1 which reserved to indicate the no increment. But if you can use a multiple of the width you choose to skip or go back.&lt;br /&gt;
|-&lt;br /&gt;
| GUIDataSeparatorChar || 	Define the character which delimits subitems in [[GUICtrlSetData]].&lt;br /&gt;
|-&lt;br /&gt;
| || 	The default character is &#039;|&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || 	Enable/disable OnEvent functions notifications.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = (default) disable.&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = enable.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || 	Change default resizing for a control.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = (default) keep default control resizing.&lt;br /&gt;
|-&lt;br /&gt;
| || 	&amp;amp;lt;1024 = any type of resizing see [[GUICtrlSetResizing]].&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || 	Change special event behavior or GUI function return values.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = (default) Windows behavior on click on Minimize,Restore, Maximize, Resize.&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = suppress windows behavior on minimize, restore or maximize click button or window resize. Just sends the notification.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDelay || 	Alters the length of the brief pause in between mouse clicks.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDownDelay || 	Alters the length a click is held down before release.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDragDelay || 	Alters the length of the brief pause at the start and end of a mouse drag operation.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Time in milliseconds to pause (default=250).&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || 	Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = relative coords to the active window&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || 	If this option is used then all variables must be pre-declared with Local, Global or in some cases Dim before they can be used - removes the chance for misspelled variables causing bugs.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = Variables don&#039;t need to be pre-declared (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = Variables must be pre-declared. See [http://www.autoitscript.com/autoit3/docs/keywords/Dim.htm Dim / Global / Local / Const] for details on declaring variables.&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || 	Sets the way coords are used in the pixel functions, either absolute coords or coords relative to the window defined by hwnd (default active window):&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = relative coords to the defined window&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	2 = relative coords to the client area of the defined window&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || 	Specifies if AutoIt attaches input threads when using [[Send]] function. When not attaching (default mode=0) detecting the state of capslock/scrolllock and numlock can be unreliable under NT4. However, when you specify attach mode=1 the [[Send]](&amp;quot;{... down/up}&amp;quot;) syntax will not work and there may be problems with sending keys to &amp;quot;hung&amp;quot; windows. [[ControlSend]] ALWAYS attaches and is not affected by this mode.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = don&#039;t attach (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = attach&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || 	Specifies if AutoIt should store the state of capslock before a [[Send]] function and restore it afterwards.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = don&#039;t store/restore&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = store and restore (default)&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDelay || 	Alters the length of the brief pause in between sent keystrokes. A value of 0 removes the delay completely.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDownDelay || 	Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses you may need to raise this value from the default. A value of 0 removes the delay completely.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| TCPTimeout || 	Defines the time before TCP functions stop if no communication.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Time in milliseconds before timeout (default=100).&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || 	Script pauses when click on tray icon.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = no pause&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = pause (default). If there is no DefaultMenu no pause will occurs.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || 	If enabled shows the current script line in the tray icon tip to help debugging.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = no debug information (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = show debug&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || 	Hides the AutoIt tray icon. Note: The icon will still initially appear ~750 milliseconds.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = show icon (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = hide icon&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 	Extend the behaviour of the script tray icon/menu. This can be done with a combination (adding) of the following values.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = default menu items (Script Paused/Exit) are appended to the usercreated menu; usercreated checked items will automatically unchecked; if you double click the tray icon then the controlid is returned which has the &amp;quot;Default&amp;quot;-style (default).&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = no default menu&lt;br /&gt;
|-&lt;br /&gt;
| || 	2 = user created checked items will not automatically unchecked if you click it&lt;br /&gt;
|-&lt;br /&gt;
| || 	4 = don&#039;t return the menuitemID which has the &amp;quot;default&amp;quot;-style in the main contextmenu if you double click the tray icon&lt;br /&gt;
|-&lt;br /&gt;
| || 	8 = turn off auto check of radio item groups&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || 	Enable/disable OnEvent functions notifications for the tray.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = (default) disable&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = enable&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || 	Specifies if hidden window text can be &amp;quot;seen&amp;quot; by the window matching functions.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = Do not detect hidden text (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = Detect hidden text&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || 	Allows the window search routines to search child windows as well as top-level windows.&lt;br /&gt;
|-&lt;br /&gt;
| || 	0 = Only search top-level windows (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = Search top-level and child windows&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || 	Alters the method that is used to match window text during search operations.&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = Complete / Slow mode (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	2 = Quick mode&lt;br /&gt;
|-&lt;br /&gt;
| || 	In quick mode AutoIt can usually only &amp;quot;see&amp;quot; dialog text, button text and the captions of some controls. In the default mode much more text can be seen (for instance the contents of the Notepad window).&lt;br /&gt;
|-&lt;br /&gt;
| || 	If you are having performance problems when performing many window searches then changing to the &amp;quot;quick&amp;quot; mode may help.&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 	Alters the method that is used to match window titles during search operations.&lt;br /&gt;
|-&lt;br /&gt;
| || 	1 = Match the title from the start (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 	2 = Match any substring in the title&lt;br /&gt;
|-&lt;br /&gt;
| || 	3 = Exact title match&lt;br /&gt;
|-&lt;br /&gt;
| || 	4 = Advanced mode, see [http://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm Window Titles &amp;amp; Text (Advanced)]&lt;br /&gt;
|-&lt;br /&gt;
| || 	-1 to -4 = Case insensitive match according to the other type of match.&lt;br /&gt;
|-&lt;br /&gt;
| WinWaitDelay || 	Alters how long a script should briefly pause after a successful window-related operation.&lt;br /&gt;
|-&lt;br /&gt;
| || 	Time in milliseconds to pause (default=250).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
; copy any you want to change   ;default value is listed first&lt;br /&gt;
&lt;br /&gt;
Opt(&amp;quot;CaretCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;ExpandEnvStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;ExpandVarStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;GUICloseOnESC&amp;quot;, 1) ;1=ESC  closes, 0=ESC won&#039;t close&lt;br /&gt;
Opt(&amp;quot;GUICoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=cell&lt;br /&gt;
Opt(&amp;quot;GUIDataSeparatorChar&amp;quot;, &amp;quot;|&amp;quot;) ;&amp;quot;|&amp;quot; is the default&lt;br /&gt;
Opt(&amp;quot;GUIOnEventMode&amp;quot;, 0) ;0=disabled, 1=OnEvent mode enabled&lt;br /&gt;
Opt(&amp;quot;GUIResizeMode&amp;quot;, 0) ;0=no resizing, &amp;lt;1024 special resizing&lt;br /&gt;
Opt(&amp;quot;GUIEventOptions&amp;quot;, 0) ;0=default, 1=just notification, 2=GUICtrlRead tab index&lt;br /&gt;
Opt(&amp;quot;MouseClickDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDownDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDragDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;MustDeclareVars&amp;quot;, 0) ;0=no, 1=require pre-declaration&lt;br /&gt;
Opt(&amp;quot;PixelCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;SendAttachMode&amp;quot;, 0) ;0=don&#039;t attach, 1=do attach&lt;br /&gt;
Opt(&amp;quot;SendCapslockMode&amp;quot;, 1) ;1=store and restore, 0=don&#039;t&lt;br /&gt;
Opt(&amp;quot;SendKeyDelay&amp;quot;, 5) ;5 milliseconds&lt;br /&gt;
Opt(&amp;quot;SendKeyDownDelay&amp;quot;, 1) ;1 millisecond&lt;br /&gt;
Opt(&amp;quot;TCPTimeout&amp;quot;, 100) ;100 milliseconds&lt;br /&gt;
Opt(&amp;quot;TrayAutoPause&amp;quot;, 1) ;0=no pause, 1=Pause&lt;br /&gt;
Opt(&amp;quot;TrayIconDebug&amp;quot;, 0) ;0=no info, 1=debug line info&lt;br /&gt;
Opt(&amp;quot;TrayIconHide&amp;quot;, 0) ;0=show, 1=hide tray icon&lt;br /&gt;
Opt(&amp;quot;TrayMenuMode&amp;quot;, 0) ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID  not return&lt;br /&gt;
Opt(&amp;quot;TrayOnEventMode&amp;quot;, 0) ;0=disable, 1=enable&lt;br /&gt;
Opt(&amp;quot;WinDetectHiddenText&amp;quot;, 0) ;0=don&#039;t detect, 1=do detect&lt;br /&gt;
Opt(&amp;quot;WinSearchChildren&amp;quot;, 1) ;0=no, 1=search children also&lt;br /&gt;
Opt(&amp;quot;WinTextMatchMode&amp;quot;, 1) ;1=complete, 2=quick&lt;br /&gt;
Opt(&amp;quot;WinTitleMatchMode&amp;quot;, 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase&lt;br /&gt;
Opt(&amp;quot;WinWaitDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11906</id>
		<title>AutoItSetOption</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11906"/>
		<updated>2013-08-23T15:43:54Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039;. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Changes the operation of various AutoIt functions/parameters.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:AutoItSetOption ( &amp;quot;option&amp;quot; [, param] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| option || The option to change. See Remarks.&lt;br /&gt;
|-&lt;br /&gt;
| param || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The value to assign to the option. The type and meaning vary by option. See remarks below. If the param is not provided, then the function just returns the value already assigned to the option. The keyword [http://www.autoitscript.com/autoit3/docs/keywords/Default.htm Default] can be used for the parameter to reset the option to its default value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| Success: || 	Returns the value of the previous setting for the option.&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	Sets @error to non-zero. Failure will occur if the parameters are invalid (such as an option that doesn&#039;t exist).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
You may use [[Opt]] as an alternative to [[AutoItSetOption]].&lt;br /&gt;
&lt;br /&gt;
Options are as follows:&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Option&#039;&#039;&#039; || &#039;&#039;&#039;Param&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || Sets the way coords are used in the caret functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || 0 = relative coords to the active window&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || 2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || Changes how literal strings and % symbols are interpreted. By default strings are treated literally, this option allows you to use %environment% variables inside strings, e.g., &amp;quot;The temp directory is: %temp%&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || 0 = do not expand environment variables (default)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || 1 = expand environment variables&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || Without this option the usual way would be: 	&amp;quot;The temp directory is: &amp;quot; &amp;amp; [[EnvGet]](&amp;quot;temp&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || Changes how literal strings and variable/macro ($ and @) symbols are interpreted. By default strings are treated literally, this option allows you to use variables and macros inside strings, e.g., &amp;quot;The value of var1 is $var1$&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || 0 = do not expand variables (default)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || 1 = expand variables (when in this mode and you want to use a literal $ or @ then double it up: &amp;quot;This is a single dollar $$ sign&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || When ESC is pressed on a GUI the $GUI_EVENT_CLOSE message is sent. This option toggles this behavior on and off.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || 0 = Don&#039;t send the $GUI_EVENT_CLOSE message when ESC is pressed.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || 1 = [[Send]] the $GUI_EVENT_CLOSE message when ESC is pressed (default).&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || Alters the position of a control defined by [[GUICtrlSetPos]].&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || 0 = relative position to the start of the last control (upper left corner).&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || 1 = absolute coordinates (default) still relative to the dialog box.&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || 2 = cell positioning relative to current cell. A -1 for left or top parameter don&#039;t increment the start.&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || So next line is -1, offset; next cell is offset,-1; current cell is -1,-1.&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || Obviously &amp;quot;offset&amp;quot; cannot be -1 which reserved to indicate the no increment. But if you can use a multiple of the width you choose to skip or go back.&lt;br /&gt;
|-&lt;br /&gt;
| GUIDataSeparatorChar || Define the character which delimits subitems in [[GUICtrlSetData]].&lt;br /&gt;
|-&lt;br /&gt;
| GUIDataSeparatorChar || The default character is &#039;|&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || Enable/disable OnEvent functions notifications.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || 0 = (default) disable.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || 1 = enable.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || Change default resizing for a control.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || 0 = (default) keep default control resizing.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || &amp;amp;lt;1024 = any type of resizing see [[GUICtrlSetResizing]].&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || Change special event behavior or GUI function return values.&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || 0 = (default) Windows behavior on click on Minimize,Restore, Maximize, Resize.&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || 1 = suppress windows behavior on minimize, restore or maximize click button or window resize. Just sends the notification.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDelay || Alters the length of the brief pause in between mouse clicks.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDelay || Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDownDelay || Alters the length a click is held down before release.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDownDelay || Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDragDelay || Alters the length of the brief pause at the start and end of a mouse drag operation.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDragDelay || Time in milliseconds to pause (default=250).&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || 0 = relative coords to the active window&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || 2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || If this option is used then all variables must be pre-declared with Local, Global or in some cases Dim before they can be used - removes the chance for misspelled variables causing bugs.&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || 0 = Variables don&#039;t need to be pre-declared (default)&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || 1 = Variables must be pre-declared. See [http://www.autoitscript.com/autoit3/docs/keywords/Dim.htm Dim / Global / Local / Const] for details on declaring variables.&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || Sets the way coords are used in the pixel functions, either absolute coords or coords relative to the window defined by hwnd (default active window):&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || 0 = relative coords to the defined window&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || 2 = relative coords to the client area of the defined window&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || Specifies if AutoIt attaches input threads when using [[Send]] function. When not attaching (default mode=0) detecting the state of capslock/scrolllock and numlock can be unreliable under NT4. However, when you specify attach mode=1 the [[Send]](&amp;quot;{... down/up}&amp;quot;) syntax will not work and there may be problems with sending keys to &amp;quot;hung&amp;quot; windows. [[ControlSend]] ALWAYS attaches and is not affected by this mode.&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || 0 = don&#039;t attach (default)&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || 1 = attach&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || Specifies if AutoIt should store the state of capslock before a [[Send]] function and restore it afterwards.&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || 0 = don&#039;t store/restore&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || 1 = store and restore (default)&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDelay || Alters the length of the brief pause in between sent keystrokes. A value of 0 removes the delay completely.&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDelay || Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDownDelay || Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses you may need to raise this value from the default. A value of 0 removes the delay completely.&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDownDelay || Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| TCPTimeout || Defines the time before TCP functions stop if no communication.&lt;br /&gt;
|-&lt;br /&gt;
| TCPTimeout || Time in milliseconds before timeout (default=100).&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || Script pauses when click on tray icon.&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || 0 = no pause&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || 1 = pause (default). If there is no DefaultMenu no pause will occurs.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || If enabled shows the current script line in the tray icon tip to help debugging.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || 0 = no debug information (default)&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || 1 = show debug&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || Hides the AutoIt tray icon. Note: The icon will still initially appear ~750 milliseconds.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || 0 = show icon (default)&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || 1 = hide icon&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || Extend the behaviour of the script tray icon/menu. This can be done with a combination (adding) of the following values.&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 0 = default menu items (Script Paused/Exit) are appended to the usercreated menu; usercreated checked items will automatically unchecked; if you double click the tray icon then the controlid is returned which has the &amp;quot;Default&amp;quot;-style (default).&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 1 = no default menu&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 2 = user created checked items will not automatically unchecked if you click it&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 4 = don&#039;t return the menuitemID which has the &amp;quot;default&amp;quot;-style in the main contextmenu if you double click the tray icon&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 8 = turn off auto check of radio item groups&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || Enable/disable OnEvent functions notifications for the tray.&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || 0 = (default) disable&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || 1 = enable&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || Specifies if hidden window text can be &amp;quot;seen&amp;quot; by the window matching functions.&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || 0 = Do not detect hidden text (default)&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || 1 = Detect hidden text&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || Allows the window search routines to search child windows as well as top-level windows.&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || 0 = Only search top-level windows (default)&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || 1 = Search top-level and child windows&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || Alters the method that is used to match window text during search operations.&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || 1 = Complete / Slow mode (default)&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || 2 = Quick mode&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || In quick mode AutoIt can usually only &amp;quot;see&amp;quot; dialog text, button text and the captions of some controls. In the default mode much more text can be seen (for instance the contents of the Notepad window).&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || If you are having performance problems when performing many window searches then changing to the &amp;quot;quick&amp;quot; mode may help.&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || Alters the method that is used to match window titles during search operations.&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 1 = Match the title from the start (default)&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 2 = Match any substring in the title&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 3 = Exact title match&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 4 = Advanced mode, see [http://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm Window Titles &amp;amp; Text (Advanced)]&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || -1 to -4 = Case insensitive match according to the other type of match.&lt;br /&gt;
|-&lt;br /&gt;
| WinWaitDelay || Alters how long a script should briefly pause after a successful window-related operation.&lt;br /&gt;
|-&lt;br /&gt;
| WinWaitDelay || Time in milliseconds to pause (default=250).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
; copy any you want to change   ;default value is listed first&lt;br /&gt;
&lt;br /&gt;
Opt(&amp;quot;CaretCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;ExpandEnvStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;ExpandVarStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;GUICloseOnESC&amp;quot;, 1) ;1=ESC  closes, 0=ESC won&#039;t close&lt;br /&gt;
Opt(&amp;quot;GUICoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=cell&lt;br /&gt;
Opt(&amp;quot;GUIDataSeparatorChar&amp;quot;, &amp;quot;|&amp;quot;) ;&amp;quot;|&amp;quot; is the default&lt;br /&gt;
Opt(&amp;quot;GUIOnEventMode&amp;quot;, 0) ;0=disabled, 1=OnEvent mode enabled&lt;br /&gt;
Opt(&amp;quot;GUIResizeMode&amp;quot;, 0) ;0=no resizing, &amp;lt;1024 special resizing&lt;br /&gt;
Opt(&amp;quot;GUIEventOptions&amp;quot;, 0) ;0=default, 1=just notification, 2=GUICtrlRead tab index&lt;br /&gt;
Opt(&amp;quot;MouseClickDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDownDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDragDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;MustDeclareVars&amp;quot;, 0) ;0=no, 1=require pre-declaration&lt;br /&gt;
Opt(&amp;quot;PixelCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;SendAttachMode&amp;quot;, 0) ;0=don&#039;t attach, 1=do attach&lt;br /&gt;
Opt(&amp;quot;SendCapslockMode&amp;quot;, 1) ;1=store and restore, 0=don&#039;t&lt;br /&gt;
Opt(&amp;quot;SendKeyDelay&amp;quot;, 5) ;5 milliseconds&lt;br /&gt;
Opt(&amp;quot;SendKeyDownDelay&amp;quot;, 1) ;1 millisecond&lt;br /&gt;
Opt(&amp;quot;TCPTimeout&amp;quot;, 100) ;100 milliseconds&lt;br /&gt;
Opt(&amp;quot;TrayAutoPause&amp;quot;, 1) ;0=no pause, 1=Pause&lt;br /&gt;
Opt(&amp;quot;TrayIconDebug&amp;quot;, 0) ;0=no info, 1=debug line info&lt;br /&gt;
Opt(&amp;quot;TrayIconHide&amp;quot;, 0) ;0=show, 1=hide tray icon&lt;br /&gt;
Opt(&amp;quot;TrayMenuMode&amp;quot;, 0) ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID  not return&lt;br /&gt;
Opt(&amp;quot;TrayOnEventMode&amp;quot;, 0) ;0=disable, 1=enable&lt;br /&gt;
Opt(&amp;quot;WinDetectHiddenText&amp;quot;, 0) ;0=don&#039;t detect, 1=do detect&lt;br /&gt;
Opt(&amp;quot;WinSearchChildren&amp;quot;, 1) ;0=no, 1=search children also&lt;br /&gt;
Opt(&amp;quot;WinTextMatchMode&amp;quot;, 1) ;1=complete, 2=quick&lt;br /&gt;
Opt(&amp;quot;WinTitleMatchMode&amp;quot;, 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase&lt;br /&gt;
Opt(&amp;quot;WinWaitDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11905</id>
		<title>AutoItSetOption</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11905"/>
		<updated>2013-08-23T15:41:29Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039;. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Changes the operation of various AutoIt functions/parameters.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:AutoItSetOption ( &amp;quot;option&amp;quot; [, param] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| option || The option to change. See Remarks.&lt;br /&gt;
|-&lt;br /&gt;
| param || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The value to assign to the option. The type and meaning vary by option. See remarks below. If the param is not provided, then the function just returns the value already assigned to the option. The keyword [http://www.autoitscript.com/autoit3/docs/keywords/Default.htm Default] can be used for the parameter to reset the option to its default value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| Success: || 	Returns the value of the previous setting for the option.&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	Sets @error to non-zero. Failure will occur if the parameters are invalid (such as an option that doesn&#039;t exist).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
You may use [[Opt]] as an alternative to [[AutoItSetOption]].&lt;br /&gt;
&lt;br /&gt;
Options are as follows:&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Option&#039;&#039;&#039; || &#039;&#039;&#039;Param&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || Sets the way coords are used in the caret functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || 0 = relative coords to the active window&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || 2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || Changes how literal strings and % symbols are interpreted. By default strings are treated literally, this option allows you to use %environment% variables inside strings, e.g., &amp;quot;The temp directory is: %temp%&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || 0 = do not expand environment variables (default)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || 1 = expand environment variables&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || Without this option the usual way would be: 	&amp;quot;The temp directory is: &amp;quot; &amp;amp; [[EnvGet]](&amp;quot;temp&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || Changes how literal strings and variable/macro ($ and @) symbols are interpreted. By default strings are treated literally, this option allows you to use variables and macros inside strings, e.g., &amp;quot;The value of var1 is $var1$&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || 0 = do not expand variables (default)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || 1 = expand variables (when in this mode and you want to use a literal $ or @ then double it up: &amp;quot;This is a single dollar $$ sign&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || When ESC is pressed on a GUI the $GUI_EVENT_CLOSE message is sent. This option toggles this behavior on and off.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || 0 = Don&#039;t send the $GUI_EVENT_CLOSE message when ESC is pressed.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || 1 = [[Send]] the $GUI_EVENT_CLOSE message when ESC is pressed (default).&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || Alters the position of a control defined by [[GUICtrlSetPos]].&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || 0 = relative position to the start of the last control (upper left corner).&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || 1 = absolute coordinates (default) still relative to the dialog box.&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || 2 = cell positioning relative to current cell. A -1 for left or top parameter don&#039;t increment the start.&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || So next line is -1, offset; next cell is offset,-1; current cell is -1,-1.&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || Obviously &amp;quot;offset&amp;quot; cannot be -1 which reserved to indicate the no increment. But if you can use a multiple of the width you choose to skip or go back.&lt;br /&gt;
|-&lt;br /&gt;
| GUIDataSeparatorChar || Define the character which delimits subitems in [[GUICtrlSetData]].&lt;br /&gt;
|-&lt;br /&gt;
| GUIDataSeparatorChar || The default character is &#039;|&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || Enable/disable OnEvent functions notifications.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || 0 = (default) disable.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || 1 = enable.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || Change default resizing for a control.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || 0 = (default) keep default control resizing.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || &amp;amp;lt;1024 = any type of resizing see [[GUICtrlSetResizing]].&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || Change special event behavior or GUI function return values.&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || 0 = (default) Windows behavior on click on Minimize,Restore, Maximize, Resize.&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || 1 = suppress windows behavior on minimize, restore or maximize click button or window resize. Just sends the notification.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDelay || Alters the length of the brief pause in between mouse clicks.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDelay || Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDownDelay || Alters the length a click is held down before release.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDownDelay || Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDragDelay || Alters the length of the brief pause at the start and end of a mouse drag operation.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDragDelay || Time in milliseconds to pause (default=250).&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || 0 = relative coords to the active window&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || 2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || If this option is used then all variables must be pre-declared with Local, Global or in some cases Dim before they can be used - removes the chance for misspelled variables causing bugs.&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || 0 = Variables don&#039;t need to be pre-declared (default)&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || 1 = Variables must be pre-declared. See [http://www.autoitscript.com/autoit3/docs/keywords/Dim.htm Dim / Global / Local / Const] for details on declaring variables.&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || Sets the way coords are used in the pixel functions, either absolute coords or coords relative to the window defined by hwnd (default active window):&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || 0 = relative coords to the defined window&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || 2 = relative coords to the client area of the defined window&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || Specifies if AutoIt attaches input threads when using [[Send]] function. When not attaching (default mode=0) detecting the state of capslock/scrolllock and numlock can be unreliable under NT4. However, when you specify attach mode=1 the [[Send]](&amp;quot;{... down/up}&amp;quot;) syntax will not work and there may be problems with sending keys to &amp;quot;hung&amp;quot; windows. [[ControlSend]] ALWAYS attaches and is not affected by this mode.&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || 0 = don&#039;t attach (default)&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || 1 = attach&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || Specifies if AutoIt should store the state of capslock before a [[Send]] function and restore it afterwards.&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || 0 = don&#039;t store/restore&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || 1 = store and restore (default)&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDelay || Alters the length of the brief pause in between sent keystrokes. A value of 0 removes the delay completely.&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDelay || Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDownDelay || Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses you may need to raise this value from the default. A value of 0 removes the delay completely.&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDownDelay || Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| TCPTimeout || Defines the time before TCP functions stop if no communication.&lt;br /&gt;
|-&lt;br /&gt;
| TCPTimeout || Time in milliseconds before timeout (default=100).&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || Script pauses when click on tray icon.&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || 0 = no pause&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || 1 = pause (default). If there is no DefaultMenu no pause will occurs.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || If enabled shows the current script line in the tray icon tip to help debugging.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || 0 = no debug information (default)&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || 1 = show debug&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || Hides the AutoIt tray icon. Note: The icon will still initially appear ~750 milliseconds.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || 0 = show icon (default)&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || 1 = hide icon&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || Extend the behaviour of the script tray icon/menu. This can be done with a combination (adding) of the following values.&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 0 = default menu items (Script Paused/Exit) are appended to the usercreated menu; usercreated checked items will automatically unchecked; if you double click the tray icon then the controlid is returned which has the &amp;quot;Default&amp;quot;-style (default).&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 1 = no default menu&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 2 = user created checked items will not automatically unchecked if you click it&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 4 = don&#039;t return the menuitemID which has the &amp;quot;default&amp;quot;-style in the main contextmenu if you double click the tray icon&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 8 = turn off auto check of radio item groups&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || Enable/disable OnEvent functions notifications for the tray.&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || 0 = (default) disable&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || 1 = enable&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || Specifies if hidden window text can be &amp;quot;seen&amp;quot; by the window matching functions.&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || 0 = Do not detect hidden text (default)&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || 1 = Detect hidden text&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || Allows the window search routines to search child windows as well as top-level windows.&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || 0 = Only search top-level windows (default)&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || 1 = Search top-level and child windows&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || Alters the method that is used to match window text during search operations.&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || 1 = Complete / Slow mode (default)&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || 2 = Quick mode&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || In quick mode AutoIt can usually only &amp;quot;see&amp;quot; dialog text, button text and the captions of some controls. In the default mode much more text can be seen (for instance the contents of the Notepad window).&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || If you are having performance problems when performing many window searches then changing to the &amp;quot;quick&amp;quot; mode may help.&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || Alters the method that is used to match window titles during search operations.&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 1 = Match the title from the start (default)&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 2 = Match any substring in the title&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 3 = Exact title match&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 4 = Advanced mode, see [http://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm Window Titles &amp;amp; Text (Advanced)]&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || -1 to -4 = Case insensitive match according to the other type of match.&lt;br /&gt;
|-&lt;br /&gt;
| WinWaitDelay || Alters how long a script should briefly pause after a successful window-related operation.&lt;br /&gt;
|-&lt;br /&gt;
| WinWaitDelay || Time in milliseconds to pause (default=250).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
; copy any you want to change   ;default value is listed first&lt;br /&gt;
&lt;br /&gt;
Opt(&amp;quot;CaretCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;ExpandEnvStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;ExpandVarStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;GUICloseOnESC&amp;quot;, 1) ;1=ESC  closes, 0=ESC won&#039;t close&lt;br /&gt;
Opt(&amp;quot;GUICoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=cell&lt;br /&gt;
Opt(&amp;quot;GUIDataSeparatorChar&amp;quot;, &amp;quot;|&amp;quot;) ;&amp;quot;|&amp;quot; is the default&lt;br /&gt;
Opt(&amp;quot;GUIOnEventMode&amp;quot;, 0) ;0=disabled, 1=OnEvent mode enabled&lt;br /&gt;
Opt(&amp;quot;GUIResizeMode&amp;quot;, 0) ;0=no resizing, &amp;lt;1024 special resizing&lt;br /&gt;
Opt(&amp;quot;GUIEventOptions&amp;quot;, 0) ;0=default, 1=just notification, 2=GUICtrlRead tab index&lt;br /&gt;
Opt(&amp;quot;MouseClickDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDownDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDragDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;MustDeclareVars&amp;quot;, 0) ;0=no, 1=require pre-declaration&lt;br /&gt;
Opt(&amp;quot;PixelCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;SendAttachMode&amp;quot;, 0) ;0=don&#039;t attach, 1=do attach&lt;br /&gt;
Opt(&amp;quot;SendCapslockMode&amp;quot;, 1) ;1=store and restore, 0=don&#039;t&lt;br /&gt;
Opt(&amp;quot;SendKeyDelay&amp;quot;, 5) ;5 milliseconds&lt;br /&gt;
Opt(&amp;quot;SendKeyDownDelay&amp;quot;, 1) ;1 millisecond&lt;br /&gt;
Opt(&amp;quot;TCPTimeout&amp;quot;, 100) ;100 milliseconds&lt;br /&gt;
Opt(&amp;quot;TrayAutoPause&amp;quot;, 1) ;0=no pause, 1=Pause&lt;br /&gt;
Opt(&amp;quot;TrayIconDebug&amp;quot;, 0) ;0=no info, 1=debug line info&lt;br /&gt;
Opt(&amp;quot;TrayIconHide&amp;quot;, 0) ;0=show, 1=hide tray icon&lt;br /&gt;
Opt(&amp;quot;TrayMenuMode&amp;quot;, 0) ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID  not return&lt;br /&gt;
Opt(&amp;quot;TrayOnEventMode&amp;quot;, 0) ;0=disable, 1=enable&lt;br /&gt;
Opt(&amp;quot;WinDetectHiddenText&amp;quot;, 0) ;0=don&#039;t detect, 1=do detect&lt;br /&gt;
Opt(&amp;quot;WinSearchChildren&amp;quot;, 1) ;0=no, 1=search children also&lt;br /&gt;
Opt(&amp;quot;WinTextMatchMode&amp;quot;, 1) ;1=complete, 2=quick&lt;br /&gt;
Opt(&amp;quot;WinTitleMatchMode&amp;quot;, 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase&lt;br /&gt;
Opt(&amp;quot;WinWaitDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11904</id>
		<title>StringRegExp</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11904"/>
		<updated>2013-08-23T06:34:37Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039;. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Check if a string fits a given regular expression pattern.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:StringRegExp ( &amp;quot;test&amp;quot;, &amp;quot;pattern&amp;quot; [, flag = 0 [, offset = 1]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| test || The string to check&lt;br /&gt;
|-&lt;br /&gt;
| pattern || The regular expression to compare.&lt;br /&gt;
|-&lt;br /&gt;
| flag || &#039;&#039;&#039;[optional]&#039;&#039;&#039; A number to indicate how the function behaves.  See below for details.  The default is 0.&lt;br /&gt;
|-&lt;br /&gt;
| offset || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The string position to start the match (starts at 1)  The default is 1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Flag&#039;&#039;&#039; || &#039;&#039;&#039;Values&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Returns 1 (matched) or 0 (no match)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Return array of matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Return array of matches including the full match (Perl / PHP style).&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Return array of global matches.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Return an array of arrays containing global matches including the full match (Perl / PHP style).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&#039;&#039;Flag = 0 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 2  || Bad pattern. @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 1 or 2 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.  Check @extended for next offset&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 3 or 4 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
The flag parameter can have one of 5 values (0 through 4).  0 gives a true (1) or false (0) as to whether the pattern was found or not.  1 and 2 find the first match and returns it in an array.  3 and 4 find multiple hits and fills the array with all the matching text.  2 and 4 include the full matching text as the first record, not just the capturing groups, which is all you get with flag 1 and 3.&lt;br /&gt;
&lt;br /&gt;
Regular expression notation is a compact way of specifying a pattern for strings that can be searched.  Regular expressions are character strings in which plain text characters indicate what text should exist in the target string, and a some characters are given special meanings to indicate what variability is allowed in the target string.  AutoIt regular expressions are normally case-sensitive.&lt;br /&gt;
&lt;br /&gt;
Regular expressions are constructed of one or more of the following simple regular expression specifiers.  If the character is not in the following table, then it will match only itself.&lt;br /&gt;
&lt;br /&gt;
Repeating characters (*, +, ?, {...} ) will try to match the largest set possible, which allows the following characters to match as well, unless followed immediately by a question mark; then it will find the smallest pattern that allows the following characters to match as well.&lt;br /&gt;
&lt;br /&gt;
Nested groups are allowed, but keep in mind that all the groups, except non-capturing groups, assign to the returned array, with the outer groups assigning after the inner groups.&lt;br /&gt;
&lt;br /&gt;
Complete description can be found &#039;&#039;&#039;[http://www.autoitscript.com/autoit3/pcrepattern.html here]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution&#039;&#039;&#039;: bad regular expressions can produce a quasi-infinite loop hogging the CPU, and can even cause a crash.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;Matching Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [ &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ] || Match any character in the set.  e.g. &#039;&#039;&#039;[aeiou]&#039;&#039;&#039; matches any lower-case vowel.  A contiguous set can be defined using a dash between the starting and ending characters.  e.g. &#039;&#039;&#039;[a-z]&#039;&#039;&#039; matches any lower case character.  To include a dash (&#039;&#039;&#039;-&#039;&#039;&#039;) in a set, use it as the first or last character of the set.  To include a closing bracket in a set, use it as the first character of the set.  e.g. &#039;&#039;&#039;[][]&#039;&#039;&#039; will match either [ or ].  Note that special characters &#039;&#039;&#039;do not&#039;&#039;&#039; retain their special meanings inside a set, with the exception of &#039;&#039;&#039;\\&#039;&#039;&#039;,  &#039;&#039;&#039;\^&#039;&#039;&#039;, &#039;&#039;&#039;\-&#039;&#039;&#039;,&#039;&#039;&#039;\[&#039;&#039;&#039; and &#039;&#039;&#039;\]&#039;&#039;&#039; match the escaped character inside a set.&lt;br /&gt;
|-&lt;br /&gt;
| [^ &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the set.  e.g. &#039;&#039;&#039;[^0-9]&#039;&#039;&#039; matches any non-digit.  To include a caret (&#039;&#039;&#039;^&#039;&#039;&#039;) in a set, put it after the beginning of the set or escape it (\^).&lt;br /&gt;
|-&lt;br /&gt;
| [:class:] || Match a character in the given class of characters.  Valid classes are: alpha (any alphabetic character), alnum (any alphanumeric character), lower (any lower-case letter), upper (any upper-case letter), digit (any decimal digit 0-9), xdigit (any hexadecimal digit, 0-9, A-F, a-f), space (any whitespace character), blank (only a space or tab), print (any printable character), graph (any printable character except spaces), cntrl (any control character [ascii 127 or &amp;lt;32]) or punct (any punctuation character). So [0-9] is equivalent to &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;:digit:&amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| [^:class:] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the class, but only if the first character.&lt;br /&gt;
|-&lt;br /&gt;
| ( &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Group. The elements in the group are treated in order and can be repeated together.  e.g. &#039;&#039;&#039;(ab)+&#039;&#039;&#039; will match &amp;quot;ab&amp;quot; or &amp;quot;abab&amp;quot;, but not &amp;quot;aba&amp;quot;.  A group will also store the text matched for use in back-references and in the array returned by the function, depending on flag value.&lt;br /&gt;
|-&lt;br /&gt;
| (?#&amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt;.) || comment (not nestable).&lt;br /&gt;
|-&lt;br /&gt;
| (?i) || Case-insensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-insensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i) || (default) Case-sensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-sensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?: &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Non-capturing group.  Behaves just like a normal group, but does not record the matching characters in the array nor can the matched text be used for back-referencing.&lt;br /&gt;
|-&lt;br /&gt;
| (?i: &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Case-insensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-insensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i: &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Case-sensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-sensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?J) || allow duplicate names.&lt;br /&gt;
|-&lt;br /&gt;
| (?m) || ^ and $ match newlines within data.&lt;br /&gt;
|-&lt;br /&gt;
| (?s) || . matches anything including newline. (by default &amp;quot;.&amp;quot; don&#039;t match newline)&lt;br /&gt;
|-&lt;br /&gt;
| (?U) || Invert greediness of quantifiers.&lt;br /&gt;
|-&lt;br /&gt;
| (?x) || Ignore whitespace and # comments.&lt;br /&gt;
|-&lt;br /&gt;
| (?-&amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt;) || unset option(s).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;.&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039; || Match any single character (except newline).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; || Or.  The expression on one side &#039;&#039;&#039;or&#039;&#039;&#039; the other can be matched.&lt;br /&gt;
|-&lt;br /&gt;
| \ || &#039;&#039;Escape&#039;&#039; a special character (have it match the actual character) or introduce a special character type (see below).&lt;br /&gt;
|-&lt;br /&gt;
| \\ || Match an actual backslash (\).&lt;br /&gt;
|-&lt;br /&gt;
| \a || Alarm, that is, the BEL character ([[Chr]](7)).&lt;br /&gt;
|-&lt;br /&gt;
| \A || Match only at beginning of string.&lt;br /&gt;
|-&lt;br /&gt;
| \b || Matches at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \B || Matches when not at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \c || Match a control character, based on the next character.  For example, &#039;&#039;&#039;\cM&#039;&#039;&#039; matches ctrl-M.&lt;br /&gt;
|-&lt;br /&gt;
| \d || Match any digit (0-9).&lt;br /&gt;
|-&lt;br /&gt;
| \D || Match any non-digit.&lt;br /&gt;
|-&lt;br /&gt;
| \e || Match an escape character ([[Chr]](27)).&lt;br /&gt;
|-&lt;br /&gt;
| \E || end case modification.&lt;br /&gt;
|-&lt;br /&gt;
| \f || Match an formfeed character ([[Chr]](12)).&lt;br /&gt;
|-&lt;br /&gt;
| \G || first matching position in subject.&lt;br /&gt;
|-&lt;br /&gt;
| \h || any horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \H || any character that is not a horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \n || Match a linefeed (@LF, [[Chr]](10)).&lt;br /&gt;
|-&lt;br /&gt;
| \K || reset start of match.&lt;br /&gt;
|-&lt;br /&gt;
| \N || a character that is not a newline&lt;br /&gt;
|-&lt;br /&gt;
| \Q || quote (disable) pattern metacharacters till \E.&lt;br /&gt;
|-&lt;br /&gt;
| \r || Match a carriage return (@CR, [[Chr]](13)).&lt;br /&gt;
|-&lt;br /&gt;
| \R || a newline sequence.&lt;br /&gt;
|-&lt;br /&gt;
| \s || Match any whitespace character: [[Chr]](9) through [[Chr]](13) which are Horizontal Tab, Line Feed, Vertical Tab, Form Feed, and Carriage Return, and the standard space ( [[Chr]](32) ).&lt;br /&gt;
|-&lt;br /&gt;
| \S || Match any non-whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \t || Match a tab character ([[Chr]](9)).&lt;br /&gt;
|-&lt;br /&gt;
| \v || any vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \V || any character that is not a vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \w || Match any &amp;quot;word&amp;quot; character: a-z, A-Z, 0-9 or underscore (_).&lt;br /&gt;
|-&lt;br /&gt;
| \W || Match any non-word character.&lt;br /&gt;
|-&lt;br /&gt;
| \X || A Unicode extended grapheme cluster, that is an unbreakable sequence of codepoints which represent a single character for the user.&lt;br /&gt;
|-&lt;br /&gt;
| \ddd || Match character with octal code ddd, or backreference if found. Match the prior group number given exactly. For example, &#039;&#039;&#039;([:alpha:])\1&#039;&#039;&#039; would match a double letter.&lt;br /&gt;
|-&lt;br /&gt;
| \xhh || character with hex code hh.&lt;br /&gt;
|-&lt;br /&gt;
| \x{hhh&amp;lt;nowiki&amp;gt;.&amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;.&amp;lt;/nowiki&amp;gt;} || Match character with hex code hhh..&lt;br /&gt;
|-&lt;br /&gt;
| \z || Match only at end of string.&lt;br /&gt;
|-&lt;br /&gt;
| \Z || Match only at end of string, or before newline at the end.&lt;br /&gt;
|-&lt;br /&gt;
| (?= &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Positive look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;= &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Positive look behind.&lt;br /&gt;
|-&lt;br /&gt;
| (?! &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Negative look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;! &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Negative look behind.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Repeating Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group exactly &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;,} || Repeat the previous character, set or group at least &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {0,&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group at most &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;} || Repeat the previous character, set or group between &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; times, inclusive.&lt;br /&gt;
|-&lt;br /&gt;
| * || Repeat the previous character, set or group 0 or more times.  Equivalent to {0,}&lt;br /&gt;
|-&lt;br /&gt;
| + || Repeat the previous character, set or group 1 or more times.  Equivalent to {1,}&lt;br /&gt;
|-&lt;br /&gt;
| ? || The previous character, set or group may or may not appear.  Equivalent to {0, 1}&lt;br /&gt;
|-&lt;br /&gt;
| ? (after a repeating character) || Find the smallest match instead of the largest.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Character Classes&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [:alnum:] || letters and digits (same as [0-9A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:alpha:] || letters (same as [A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:ascii:] || character codes (same as [[Chr]](0) ... [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:blank:] || space or tab only (same as [[Chr]](9) and [[Chr]](32))&lt;br /&gt;
|-&lt;br /&gt;
| [:cntrl:] || control characters (same as [[Chr]](0) ... [[Chr]](31) and [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:digit:] || decimal digits (same as \d or [0-9])&lt;br /&gt;
|-&lt;br /&gt;
| [:graph:] || printing characters, excluding space (same as [[Chr]](33) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:lower:] || lower case letters (same as [a-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:print:] || printing characters, including space (same as [[Chr]](32) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:punct:] || printing characters, excluding [:alnum:] and [:cntrl:], (33-47, 58-64, 91-96, 123-126)&lt;br /&gt;
|-&lt;br /&gt;
| [:space:] || white space (not quite the same as \s, it includes VT: [[Chr]](11)) (same as [\f\n\r\t\v ])&lt;br /&gt;
|-&lt;br /&gt;
| [:upper:] || upper case letters (same as [A-Z])&lt;br /&gt;
|-&lt;br /&gt;
| [:word:] || &amp;quot;word&amp;quot; characters (same as \w)&lt;br /&gt;
|-&lt;br /&gt;
| [:xdigit:] || hexadecimal digits (same as [0-9A-Fa-f])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;General comments about UTF-8 mode&#039;&#039;&#039;&amp;lt;/u&amp;gt; (use internaly by AutoIt to translate pattern) :&lt;br /&gt;
&lt;br /&gt;
	1. An unbraced hexadecimal escape sequence (such as \xb3) matches a two-byte UTF-8 character if the value is greater than 127.&lt;br /&gt;
&lt;br /&gt;
	2. Octal numbers up to \777 are recognized, and match two-byte UTF-8 characters for values greater than \177.&lt;br /&gt;
&lt;br /&gt;
	3. Repeat quantifiers apply to complete UTF-8 characters, not to individual bytes, for example: \x{100}{3}.&lt;br /&gt;
&lt;br /&gt;
	4. The dot metacharacter matches one UTF-8 character instead of a single byte.&lt;br /&gt;
&lt;br /&gt;
	5. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly test characters of any code value, but the characters that PCRE recognizes as digits, spaces, or word characters remain the same set as before, all with values less than 256. Note that this also applies to \b, because it is defined in terms of \w and \W.&lt;br /&gt;
&lt;br /&gt;
	6. Similarly, characters that match the POSIX named character classes are all low-valued characters.&lt;br /&gt;
&lt;br /&gt;
	7. However, the Perl 5.10 horizontal and vertical whitespace matching escapes (\h, \H, \v, and \V) do match all the appropriate Unicode characters.&lt;br /&gt;
&lt;br /&gt;
	8. Case-insensitive matching applies only to characters whose values are less than 128. PCRE supports case-insensitive matching only when there is a one-to-one mapping between a letter&#039;s cases. There are a small number of many-to-one mappings in Unicode; these are not supported by PCRE.&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.autoitscript.com/autoit3/docs/tutorials/regexp/regexp.htm Regular Expression] tutorial, in which you can run a script to test your regular expression(s).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
[[StringInStr]], [[StringRegExpReplace]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Option 1, using offset&lt;br /&gt;
Local $nOffset = 1&lt;br /&gt;
&lt;br /&gt;
Local $aArray&lt;br /&gt;
While 1&lt;br /&gt;
	$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 1, $nOffset)&lt;br /&gt;
&lt;br /&gt;
	If @error = 0 Then&lt;br /&gt;
		$nOffset = @extended&lt;br /&gt;
	Else&lt;br /&gt;
		ExitLoop&lt;br /&gt;
	EndIf&lt;br /&gt;
	For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 1 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
	Next&lt;br /&gt;
WEnd&lt;br /&gt;
&lt;br /&gt;
; Option 2, single return, php/preg_match() style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 2)&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 2 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 3, global return, old AutoIt style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 3)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 3 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 4, global return, php/preg_match_all() style&lt;br /&gt;
$aArray = StringRegExp(&#039;F1oF2oF3o&#039;, &#039;(F.o)*?&#039;, 4)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
&lt;br /&gt;
	Local $match = $aArray[$i]&lt;br /&gt;
	For $j = 0 To UBound($match) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 4 - &amp;quot; &amp;amp; $i &amp;amp; &#039;,&#039; &amp;amp; $j, $match[$j])&lt;br /&gt;
	Next&lt;br /&gt;
Next&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11903</id>
		<title>AutoItSetOption</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11903"/>
		<updated>2013-08-23T06:29:06Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039;. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Changes the operation of various AutoIt functions/parameters.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:AutoItSetOption ( &amp;quot;option&amp;quot; [, param] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| option || The option to change. See Remarks.&lt;br /&gt;
|-&lt;br /&gt;
| param || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The value to assign to the option. The type and meaning vary by option. See remarks below. If the param is not provided, then the function just returns the value already assigned to the option. The keyword [http://www.autoitscript.com/autoit3/docs/keywords/Default.htm Default] can be used for the parameter to reset the option to its default value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| Success: || 	Returns the value of the previous setting for the option.&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	Sets @error to non-zero. Failure will occur if the parameters are invalid (such as an option that doesn&#039;t exist).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
You may use &amp;lt;a href=&amp;quot;AutoItSetOption.htm&amp;quot;&amp;gt;Opt()&amp;lt;/a&amp;gt; as an alternative to &amp;lt;a href=&amp;quot;AutoItSetOption.htm&amp;quot;&amp;gt;AutoItSetOption()&amp;lt;/a&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Options are as follows:&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Option&#039;&#039;&#039; || &#039;&#039;&#039;Param&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || Sets the way coords are used in the caret functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || 0 = relative coords to the active window&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || 2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || Changes how literal strings and % symbols are interpreted. By default strings are treated literally, this option allows you to use %environment% variables inside strings, e.g., &amp;quot;The temp directory is: %temp%&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || 0 = do not expand environment variables (default)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || 1 = expand environment variables&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || Without this option the usual way would be: 	&amp;quot;The temp directory is: &amp;quot; &amp;amp; [[EnvGet]](&amp;quot;temp&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || Changes how literal strings and variable/macro ($ and @) symbols are interpreted. By default strings are treated literally, this option allows you to use variables and macros inside strings, e.g., &amp;quot;The value of var1 is $var1$&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || 0 = do not expand variables (default)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || 1 = expand variables (when in this mode and you want to use a literal $ or @ then double it up: &amp;quot;This is a single dollar $$ sign&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || When ESC is pressed on a GUI the $GUI_EVENT_CLOSE message is sent. This option toggles this behavior on and off.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || 0 = Don&#039;t send the $GUI_EVENT_CLOSE message when ESC is pressed.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || 1 = &amp;lt;a href=&amp;quot;Send.htm&amp;quot;&amp;gt;Send()&amp;lt;/a&amp;gt; the $GUI_EVENT_CLOSE message when ESC is pressed (default).&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || Alters the position of a control defined by &amp;lt;a href=&amp;quot;GUICtrlSetPos.htm&amp;quot;&amp;gt;GUICtrlSetPos()&amp;lt;/a&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || 0 = relative position to the start of the last control (upper left corner).&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || 1 = absolute coordinates (default) still relative to the dialog box.&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || 2 = cell positioning relative to current cell. A -1 for left or top parameter don&#039;t increment the start.&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || So next line is -1, offset; next cell is offset,-1; current cell is -1,-1.&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || Obviously &amp;quot;offset&amp;quot; cannot be -1 which reserved to indicate the no increment. But if you can use a multiple of the width you choose to skip or go back.&lt;br /&gt;
|-&lt;br /&gt;
| GUIDataSeparatorChar || Define the character which delimits subitems in &amp;lt;a href=&amp;quot;GUICtrlSetData.htm&amp;quot;&amp;gt;GUICtrlSetData()&amp;lt;/a&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GUIDataSeparatorChar || The default character is &#039;|&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || Enable/disable OnEvent functions notifications.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || 0 = (default) disable.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || 1 = enable.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || Change default resizing for a control.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || 0 = (default) keep default control resizing.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || &amp;amp;lt;1024 = any type of resizing see &amp;lt;a href=&amp;quot;GUICtrlSetResizing.htm&amp;quot;&amp;gt;GUICtrlSetResizing()&amp;lt;/a&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || Change special event behavior or GUI function return values.&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || 0 = (default) Windows behavior on click on Minimize,Restore, Maximize, Resize.&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || 1 = suppress windows behavior on minimize, restore or maximize click button or window resize. Just sends the notification.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDelay || Alters the length of the brief pause in between mouse clicks.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDelay || Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDownDelay || Alters the length a click is held down before release.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDownDelay || Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDragDelay || Alters the length of the brief pause at the start and end of a mouse drag operation.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDragDelay || Time in milliseconds to pause (default=250).&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || 0 = relative coords to the active window&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || 2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || If this option is used then all variables must be pre-declared with Local, Global or in some cases Dim before they can be used - removes the chance for misspelled variables causing bugs.&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || 0 = Variables don&#039;t need to be pre-declared (default)&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || 1 = Variables must be pre-declared. See &amp;lt;a href=&amp;quot;..\Keywords\Dim.htm&amp;quot;&amp;gt;Dim / Global / Local / Const&amp;lt;/a&amp;gt; for details on declaring variables.&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || Sets the way coords are used in the pixel functions, either absolute coords or coords relative to the window defined by hwnd (default active window):&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || 0 = relative coords to the defined window&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || 2 = relative coords to the client area of the defined window&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || Specifies if AutoIt attaches input threads when using &amp;lt;a href=&amp;quot;Send.htm&amp;quot;&amp;gt;Send()&amp;lt;/a&amp;gt; function. When not attaching (default mode=0) detecting the state of capslock/scrolllock and numlock can be unreliable under NT4. However, when you specify attach mode=1 the &amp;lt;a href=&amp;quot;Send.htm&amp;quot;&amp;gt;Send&amp;lt;/a&amp;gt;(&amp;quot;{... down/up}&amp;quot;) syntax will not work and there may be problems with sending keys to &amp;quot;hung&amp;quot; windows. &amp;lt;a href=&amp;quot;ControlSend.htm&amp;quot;&amp;gt;ControlSend()&amp;lt;/a&amp;gt; ALWAYS attaches and is not affected by this mode.&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || 0 = don&#039;t attach (default)&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || 1 = attach&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || Specifies if AutoIt should store the state of capslock before a &amp;lt;a href=&amp;quot;Send.htm&amp;quot;&amp;gt;Send()&amp;lt;/a&amp;gt; function and restore it afterwards.&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || 0 = don&#039;t store/restore&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || 1 = store and restore (default)&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDelay || Alters the length of the brief pause in between sent keystrokes. A value of 0 removes the delay completely.&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDelay || Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDownDelay || Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses you may need to raise this value from the default. A value of 0 removes the delay completely.&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDownDelay || Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| TCPTimeout || Defines the time before TCP functions stop if no communication.&lt;br /&gt;
|-&lt;br /&gt;
| TCPTimeout || Time in milliseconds before timeout (default=100).&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || Script pauses when click on tray icon.&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || 0 = no pause&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || 1 = pause (default). If there is no DefaultMenu no pause will occurs.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || If enabled shows the current script line in the tray icon tip to help debugging.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || 0 = no debug information (default)&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || 1 = show debug&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || Hides the AutoIt tray icon. Note: The icon will still initially appear ~750 milliseconds.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || 0 = show icon (default)&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || 1 = hide icon&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || Extend the behaviour of the script tray icon/menu. This can be done with a combination (adding) of the following values.&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 0 = default menu items (Script Paused/Exit) are appended to the usercreated menu; usercreated checked items will automatically unchecked; if you double click the tray icon then the controlid is returned which has the &amp;quot;Default&amp;quot;-style (default).&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 1 = no default menu&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 2 = user created checked items will not automatically unchecked if you click it&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 4 = don&#039;t return the menuitemID which has the &amp;quot;default&amp;quot;-style in the main contextmenu if you double click the tray icon&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 8 = turn off auto check of radio item groups&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || Enable/disable OnEvent functions notifications for the tray.&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || 0 = (default) disable&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || 1 = enable&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || Specifies if hidden window text can be &amp;quot;seen&amp;quot; by the window matching functions.&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || 0 = Do not detect hidden text (default)&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || 1 = Detect hidden text&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || Allows the window search routines to search child windows as well as top-level windows.&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || 0 = Only search top-level windows (default)&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || 1 = Search top-level and child windows&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || Alters the method that is used to match window text during search operations.&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || 1 = Complete / Slow mode (default)&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || 2 = Quick mode&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || In quick mode AutoIt can usually only &amp;quot;see&amp;quot; dialog text, button text and the captions of some controls. In the default mode much more text can be seen (for instance the contents of the Notepad window).&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || If you are having performance problems when performing many window searches then changing to the &amp;quot;quick&amp;quot; mode may help.&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || Alters the method that is used to match window titles during search operations.&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 1 = Match the title from the start (default)&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 2 = Match any substring in the title&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 3 = Exact title match&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 4 = Advanced mode, see &amp;lt;a href=&amp;quot;../intro/windowsadvanced.htm&amp;quot;&amp;gt;Window Titles &amp;amp; Text (Advanced)&amp;lt;/a&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || -1 to -4 = Case insensitive match according to the other type of match.&lt;br /&gt;
|-&lt;br /&gt;
| WinWaitDelay || Alters how long a script should briefly pause after a successful window-related operation.&lt;br /&gt;
|-&lt;br /&gt;
| WinWaitDelay || Time in milliseconds to pause (default=250).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
; copy any you want to change   ;default value is listed first&lt;br /&gt;
&lt;br /&gt;
Opt(&amp;quot;CaretCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;ExpandEnvStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;ExpandVarStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;GUICloseOnESC&amp;quot;, 1) ;1=ESC  closes, 0=ESC won&#039;t close&lt;br /&gt;
Opt(&amp;quot;GUICoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=cell&lt;br /&gt;
Opt(&amp;quot;GUIDataSeparatorChar&amp;quot;, &amp;quot;|&amp;quot;) ;&amp;quot;|&amp;quot; is the default&lt;br /&gt;
Opt(&amp;quot;GUIOnEventMode&amp;quot;, 0) ;0=disabled, 1=OnEvent mode enabled&lt;br /&gt;
Opt(&amp;quot;GUIResizeMode&amp;quot;, 0) ;0=no resizing, &amp;lt;1024 special resizing&lt;br /&gt;
Opt(&amp;quot;GUIEventOptions&amp;quot;, 0) ;0=default, 1=just notification, 2=GUICtrlRead tab index&lt;br /&gt;
Opt(&amp;quot;MouseClickDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDownDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDragDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;MustDeclareVars&amp;quot;, 0) ;0=no, 1=require pre-declaration&lt;br /&gt;
Opt(&amp;quot;PixelCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;SendAttachMode&amp;quot;, 0) ;0=don&#039;t attach, 1=do attach&lt;br /&gt;
Opt(&amp;quot;SendCapslockMode&amp;quot;, 1) ;1=store and restore, 0=don&#039;t&lt;br /&gt;
Opt(&amp;quot;SendKeyDelay&amp;quot;, 5) ;5 milliseconds&lt;br /&gt;
Opt(&amp;quot;SendKeyDownDelay&amp;quot;, 1) ;1 millisecond&lt;br /&gt;
Opt(&amp;quot;TCPTimeout&amp;quot;, 100) ;100 milliseconds&lt;br /&gt;
Opt(&amp;quot;TrayAutoPause&amp;quot;, 1) ;0=no pause, 1=Pause&lt;br /&gt;
Opt(&amp;quot;TrayIconDebug&amp;quot;, 0) ;0=no info, 1=debug line info&lt;br /&gt;
Opt(&amp;quot;TrayIconHide&amp;quot;, 0) ;0=show, 1=hide tray icon&lt;br /&gt;
Opt(&amp;quot;TrayMenuMode&amp;quot;, 0) ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID  not return&lt;br /&gt;
Opt(&amp;quot;TrayOnEventMode&amp;quot;, 0) ;0=disable, 1=enable&lt;br /&gt;
Opt(&amp;quot;WinDetectHiddenText&amp;quot;, 0) ;0=don&#039;t detect, 1=do detect&lt;br /&gt;
Opt(&amp;quot;WinSearchChildren&amp;quot;, 1) ;0=no, 1=search children also&lt;br /&gt;
Opt(&amp;quot;WinTextMatchMode&amp;quot;, 1) ;1=complete, 2=quick&lt;br /&gt;
Opt(&amp;quot;WinTitleMatchMode&amp;quot;, 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase&lt;br /&gt;
Opt(&amp;quot;WinWaitDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11902</id>
		<title>AutoItSetOption</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11902"/>
		<updated>2013-08-23T06:28:16Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039;. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Changes the operation of various AutoIt functions/parameters.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:AutoItSetOption ( &amp;quot;option&amp;quot; [, param] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;==&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| option || The option to change. See Remarks.&lt;br /&gt;
|-&lt;br /&gt;
| param || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The value to assign to the option. The type and meaning vary by option. See remarks below. If the param is not provided, then the function just returns the value already assigned to the option. The keyword [http://www.autoitscript.com/autoit3/docs/keywords/Default.htm Default] can be used for the parameter to reset the option to its default value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;==&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| Success: || 	Returns the value of the previous setting for the option.&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	Sets @error to non-zero. Failure will occur if the parameters are invalid (such as an option that doesn&#039;t exist).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;==&lt;br /&gt;
You may use &amp;lt;a href=&amp;quot;AutoItSetOption.htm&amp;quot;&amp;gt;Opt()&amp;lt;/a&amp;gt; as an alternative to &amp;lt;a href=&amp;quot;AutoItSetOption.htm&amp;quot;&amp;gt;AutoItSetOption()&amp;lt;/a&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Options are as follows:&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Option&#039;&#039;&#039; || &#039;&#039;&#039;Param&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || Sets the way coords are used in the caret functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || 0 = relative coords to the active window&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || 2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || Changes how literal strings and % symbols are interpreted. By default strings are treated literally, this option allows you to use %environment% variables inside strings, e.g., &amp;quot;The temp directory is: %temp%&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || 0 = do not expand environment variables (default)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || 1 = expand environment variables&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || Without this option the usual way would be: 	&amp;quot;The temp directory is: &amp;quot; &amp;amp; [[EnvGet]](&amp;quot;temp&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || Changes how literal strings and variable/macro ($ and @) symbols are interpreted. By default strings are treated literally, this option allows you to use variables and macros inside strings, e.g., &amp;quot;The value of var1 is $var1$&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || 0 = do not expand variables (default)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || 1 = expand variables (when in this mode and you want to use a literal $ or @ then double it up: &amp;quot;This is a single dollar $$ sign&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || When ESC is pressed on a GUI the $GUI_EVENT_CLOSE message is sent. This option toggles this behavior on and off.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || 0 = Don&#039;t send the $GUI_EVENT_CLOSE message when ESC is pressed.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || 1 = &amp;lt;a href=&amp;quot;Send.htm&amp;quot;&amp;gt;Send()&amp;lt;/a&amp;gt; the $GUI_EVENT_CLOSE message when ESC is pressed (default).&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || Alters the position of a control defined by &amp;lt;a href=&amp;quot;GUICtrlSetPos.htm&amp;quot;&amp;gt;GUICtrlSetPos()&amp;lt;/a&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || 0 = relative position to the start of the last control (upper left corner).&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || 1 = absolute coordinates (default) still relative to the dialog box.&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || 2 = cell positioning relative to current cell. A -1 for left or top parameter don&#039;t increment the start.&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || So next line is -1, offset; next cell is offset,-1; current cell is -1,-1.&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || Obviously &amp;quot;offset&amp;quot; cannot be -1 which reserved to indicate the no increment. But if you can use a multiple of the width you choose to skip or go back.&lt;br /&gt;
|-&lt;br /&gt;
| GUIDataSeparatorChar || Define the character which delimits subitems in &amp;lt;a href=&amp;quot;GUICtrlSetData.htm&amp;quot;&amp;gt;GUICtrlSetData()&amp;lt;/a&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GUIDataSeparatorChar || The default character is &#039;|&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || Enable/disable OnEvent functions notifications.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || 0 = (default) disable.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || 1 = enable.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || Change default resizing for a control.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || 0 = (default) keep default control resizing.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || &amp;amp;lt;1024 = any type of resizing see &amp;lt;a href=&amp;quot;GUICtrlSetResizing.htm&amp;quot;&amp;gt;GUICtrlSetResizing()&amp;lt;/a&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || Change special event behavior or GUI function return values.&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || 0 = (default) Windows behavior on click on Minimize,Restore, Maximize, Resize.&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || 1 = suppress windows behavior on minimize, restore or maximize click button or window resize. Just sends the notification.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDelay || Alters the length of the brief pause in between mouse clicks.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDelay || Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDownDelay || Alters the length a click is held down before release.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDownDelay || Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDragDelay || Alters the length of the brief pause at the start and end of a mouse drag operation.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDragDelay || Time in milliseconds to pause (default=250).&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || 0 = relative coords to the active window&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || 2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || If this option is used then all variables must be pre-declared with Local, Global or in some cases Dim before they can be used - removes the chance for misspelled variables causing bugs.&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || 0 = Variables don&#039;t need to be pre-declared (default)&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || 1 = Variables must be pre-declared. See &amp;lt;a href=&amp;quot;..\Keywords\Dim.htm&amp;quot;&amp;gt;Dim / Global / Local / Const&amp;lt;/a&amp;gt; for details on declaring variables.&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || Sets the way coords are used in the pixel functions, either absolute coords or coords relative to the window defined by hwnd (default active window):&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || 0 = relative coords to the defined window&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || 2 = relative coords to the client area of the defined window&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || Specifies if AutoIt attaches input threads when using &amp;lt;a href=&amp;quot;Send.htm&amp;quot;&amp;gt;Send()&amp;lt;/a&amp;gt; function. When not attaching (default mode=0) detecting the state of capslock/scrolllock and numlock can be unreliable under NT4. However, when you specify attach mode=1 the &amp;lt;a href=&amp;quot;Send.htm&amp;quot;&amp;gt;Send&amp;lt;/a&amp;gt;(&amp;quot;{... down/up}&amp;quot;) syntax will not work and there may be problems with sending keys to &amp;quot;hung&amp;quot; windows. &amp;lt;a href=&amp;quot;ControlSend.htm&amp;quot;&amp;gt;ControlSend()&amp;lt;/a&amp;gt; ALWAYS attaches and is not affected by this mode.&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || 0 = don&#039;t attach (default)&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || 1 = attach&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || Specifies if AutoIt should store the state of capslock before a &amp;lt;a href=&amp;quot;Send.htm&amp;quot;&amp;gt;Send()&amp;lt;/a&amp;gt; function and restore it afterwards.&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || 0 = don&#039;t store/restore&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || 1 = store and restore (default)&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDelay || Alters the length of the brief pause in between sent keystrokes. A value of 0 removes the delay completely.&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDelay || Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDownDelay || Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses you may need to raise this value from the default. A value of 0 removes the delay completely.&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDownDelay || Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| TCPTimeout || Defines the time before TCP functions stop if no communication.&lt;br /&gt;
|-&lt;br /&gt;
| TCPTimeout || Time in milliseconds before timeout (default=100).&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || Script pauses when click on tray icon.&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || 0 = no pause&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || 1 = pause (default). If there is no DefaultMenu no pause will occurs.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || If enabled shows the current script line in the tray icon tip to help debugging.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || 0 = no debug information (default)&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || 1 = show debug&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || Hides the AutoIt tray icon. Note: The icon will still initially appear ~750 milliseconds.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || 0 = show icon (default)&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || 1 = hide icon&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || Extend the behaviour of the script tray icon/menu. This can be done with a combination (adding) of the following values.&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 0 = default menu items (Script Paused/Exit) are appended to the usercreated menu; usercreated checked items will automatically unchecked; if you double click the tray icon then the controlid is returned which has the &amp;quot;Default&amp;quot;-style (default).&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 1 = no default menu&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 2 = user created checked items will not automatically unchecked if you click it&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 4 = don&#039;t return the menuitemID which has the &amp;quot;default&amp;quot;-style in the main contextmenu if you double click the tray icon&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || 8 = turn off auto check of radio item groups&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || Enable/disable OnEvent functions notifications for the tray.&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || 0 = (default) disable&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || 1 = enable&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || Specifies if hidden window text can be &amp;quot;seen&amp;quot; by the window matching functions.&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || 0 = Do not detect hidden text (default)&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || 1 = Detect hidden text&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || Allows the window search routines to search child windows as well as top-level windows.&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || 0 = Only search top-level windows (default)&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || 1 = Search top-level and child windows&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || Alters the method that is used to match window text during search operations.&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || 1 = Complete / Slow mode (default)&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || 2 = Quick mode&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || In quick mode AutoIt can usually only &amp;quot;see&amp;quot; dialog text, button text and the captions of some controls. In the default mode much more text can be seen (for instance the contents of the Notepad window).&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || If you are having performance problems when performing many window searches then changing to the &amp;quot;quick&amp;quot; mode may help.&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || Alters the method that is used to match window titles during search operations.&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 1 = Match the title from the start (default)&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 2 = Match any substring in the title&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 3 = Exact title match&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || 4 = Advanced mode, see &amp;lt;a href=&amp;quot;../intro/windowsadvanced.htm&amp;quot;&amp;gt;Window Titles &amp;amp; Text (Advanced)&amp;lt;/a&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || -1 to -4 = Case insensitive match according to the other type of match.&lt;br /&gt;
|-&lt;br /&gt;
| WinWaitDelay || Alters how long a script should briefly pause after a successful window-related operation.&lt;br /&gt;
|-&lt;br /&gt;
| WinWaitDelay || Time in milliseconds to pause (default=250).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
; copy any you want to change   ;default value is listed first&lt;br /&gt;
&lt;br /&gt;
Opt(&amp;quot;CaretCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;ExpandEnvStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;ExpandVarStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;GUICloseOnESC&amp;quot;, 1) ;1=ESC  closes, 0=ESC won&#039;t close&lt;br /&gt;
Opt(&amp;quot;GUICoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=cell&lt;br /&gt;
Opt(&amp;quot;GUIDataSeparatorChar&amp;quot;, &amp;quot;|&amp;quot;) ;&amp;quot;|&amp;quot; is the default&lt;br /&gt;
Opt(&amp;quot;GUIOnEventMode&amp;quot;, 0) ;0=disabled, 1=OnEvent mode enabled&lt;br /&gt;
Opt(&amp;quot;GUIResizeMode&amp;quot;, 0) ;0=no resizing, &amp;lt;1024 special resizing&lt;br /&gt;
Opt(&amp;quot;GUIEventOptions&amp;quot;, 0) ;0=default, 1=just notification, 2=GUICtrlRead tab index&lt;br /&gt;
Opt(&amp;quot;MouseClickDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDownDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDragDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;MustDeclareVars&amp;quot;, 0) ;0=no, 1=require pre-declaration&lt;br /&gt;
Opt(&amp;quot;PixelCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;SendAttachMode&amp;quot;, 0) ;0=don&#039;t attach, 1=do attach&lt;br /&gt;
Opt(&amp;quot;SendCapslockMode&amp;quot;, 1) ;1=store and restore, 0=don&#039;t&lt;br /&gt;
Opt(&amp;quot;SendKeyDelay&amp;quot;, 5) ;5 milliseconds&lt;br /&gt;
Opt(&amp;quot;SendKeyDownDelay&amp;quot;, 1) ;1 millisecond&lt;br /&gt;
Opt(&amp;quot;TCPTimeout&amp;quot;, 100) ;100 milliseconds&lt;br /&gt;
Opt(&amp;quot;TrayAutoPause&amp;quot;, 1) ;0=no pause, 1=Pause&lt;br /&gt;
Opt(&amp;quot;TrayIconDebug&amp;quot;, 0) ;0=no info, 1=debug line info&lt;br /&gt;
Opt(&amp;quot;TrayIconHide&amp;quot;, 0) ;0=show, 1=hide tray icon&lt;br /&gt;
Opt(&amp;quot;TrayMenuMode&amp;quot;, 0) ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID  not return&lt;br /&gt;
Opt(&amp;quot;TrayOnEventMode&amp;quot;, 0) ;0=disable, 1=enable&lt;br /&gt;
Opt(&amp;quot;WinDetectHiddenText&amp;quot;, 0) ;0=don&#039;t detect, 1=do detect&lt;br /&gt;
Opt(&amp;quot;WinSearchChildren&amp;quot;, 1) ;0=no, 1=search children also&lt;br /&gt;
Opt(&amp;quot;WinTextMatchMode&amp;quot;, 1) ;1=complete, 2=quick&lt;br /&gt;
Opt(&amp;quot;WinTitleMatchMode&amp;quot;, 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase&lt;br /&gt;
Opt(&amp;quot;WinWaitDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=GUICtrlSetGraphic&amp;diff=11901</id>
		<title>GUICtrlSetGraphic</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=GUICtrlSetGraphic&amp;diff=11901"/>
		<updated>2013-08-23T04:35:09Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: Created page with &amp;quot;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt; &amp;lt;!-- Not meant to be user editable. --&amp;gt; &amp;lt;!-- If there is an error here then that means that there is an error in the helpfile. --&amp;gt; &amp;lt;!-- Repor...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Not meant to be user editable. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- If there is an error here then that means that there is an error in the helpfile. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Report it to Trac with category &#039;Documentation&#039;. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Modifies the data for a control.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:GUICtrlSetGraphic ( controlID, type [, par1 [, ... par6]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;==&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| controlID || The control identifier (controlID) as returned by a [[GUICtrlCreateGraphic | GUICtrlCreateGraphic]] function.&lt;br /&gt;
|-&lt;br /&gt;
| type || type of drawing : dot, line, bezier, rect, ellipse, pie.&lt;br /&gt;
|-&lt;br /&gt;
| par1&amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt;par6 || See the [[#Graphic_Type_table | Graphic Type table]] below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;==&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| Success: || 	Returns 1.&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	Returns 0.&lt;br /&gt;
|-&lt;br /&gt;
|  || Returns -1 in case of invalid data&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;==&lt;br /&gt;
The point position (x,y) is relative to the [[GUICtrlCreateGraphic | GUICtrlCreateGraphic]] coordinates. It can be outside the graphic control but inside of the GUI window.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Graphic Type table&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Parameters&#039;&#039;&#039;&lt;br /&gt;
! | &#039;&#039;&#039;result&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| $GUI_GR_COLOR || Color [,BkColor] || Define the color of the next drawings. When BkColor is equal to $GUI_GR_NOBKCOLOR the drawing will not be filled. It is the default. For Color the default line color is black. &lt;br /&gt;
|-&lt;br /&gt;
| $GUI_GR_MOVE || x,y || Move the current position without drawing. &lt;br /&gt;
|-&lt;br /&gt;
| $GUI_GR_DOT || x,y || Draw a point(smallest square around the point), the next drawing will start from previous position. &lt;br /&gt;
|-&lt;br /&gt;
| $GUI_GR_PIXEL || x,y || Draw a pixel, the next drawing will start from previous position. &lt;br /&gt;
|-&lt;br /&gt;
| $GUI_GR_LINE || x,y || Draw a line. &lt;br /&gt;
|-&lt;br /&gt;
| $GUI_GR_BEZIER || x,y,x1,y1,x2,y2 || Draw a bezier curve with 2 control points. &lt;br /&gt;
|-&lt;br /&gt;
| $GUI_GR_RECT || x,y,w,h || Draw a rectangle. If w=h it will be a square. &lt;br /&gt;
|-&lt;br /&gt;
| $GUI_GR_ELLIPSE || x,y,w,h || Draw an ellipse. If w=h it will be a circle. &lt;br /&gt;
|-&lt;br /&gt;
| $GUI_GR_PIE || x,y,r,sa,wa || Draw a pie radius=r startangle=sa sweepangle=wa. Angles are in degrees. &lt;br /&gt;
|-&lt;br /&gt;
| $GUI_GR_CLOSE || &amp;amp;nbsp; || to close the current drawing. It has to be added to $GUI_GR_LINE or $GUI_GR_BEZIER to close current drawing. Use alone will be ignored. &lt;br /&gt;
|-&lt;br /&gt;
| $GUI_GR_REFRESH || &amp;amp;nbsp; || to force refresh after dynamic update of graphics. &lt;br /&gt;
|-&lt;br /&gt;
| $GUI_GR_HINT || &amp;amp;nbsp; || to display control point and end point of bezier/line curve. &lt;br /&gt;
|-&lt;br /&gt;
| $GUI_GR_PENSIZE || n || set pensize for the next drawings. It has to be defined before $GUI_GR_COLOR to be taken in account. &lt;br /&gt;
|-&lt;br /&gt;
| $GUI_GR_NOBKCOLOR || &amp;amp;nbsp; || is a dummy BkColor to force closed drawing not to be filled. Just line drawings. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Due to design constraints RECT, ELLIPSE and PIE graphics are drawn first.  For example, a LINE will always be drawn over a RECT.  If the drawing order is important to the look of the graphic, then it is recommended that multiple graphic controls be used instead of using a single control to do all the drawing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;==&lt;br /&gt;
[[GUICtrlCreateGraphic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;GUIConstantsEx.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;StaticConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global $MAXGr = 6, $del, $child&lt;br /&gt;
Global $a[$MAXGr + 1] ; 0 and $MAXGr entries not used to allow GUICtrlDelete result&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	Local $msg, $inc, $i, $del1&lt;br /&gt;
&lt;br /&gt;
	GUICreate(&amp;quot;My Main&amp;quot;, -1, -1, 100, 100)&lt;br /&gt;
	$del1 = GUICtrlCreateButton(&amp;quot;Delete&amp;quot;, 50, 200, 50)&lt;br /&gt;
	GUISetState()&lt;br /&gt;
	CreateChild()&lt;br /&gt;
&lt;br /&gt;
	$i = 1&lt;br /&gt;
	$inc = 1&lt;br /&gt;
	;$i=5	; uncomment to delete starting from last define Graphic control&lt;br /&gt;
	;$inc=-1&lt;br /&gt;
&lt;br /&gt;
	Do&lt;br /&gt;
		$msg = GUIGetMsg()&lt;br /&gt;
		If $msg = $del1 Then $i = Del($inc)&lt;br /&gt;
&lt;br /&gt;
		If $msg = $del Then&lt;br /&gt;
			GUICtrlDelete($a[$i])&lt;br /&gt;
			$i = $i + $inc&lt;br /&gt;
			If $i &amp;lt; 0 Or $i &amp;gt; $MAXGr Then Exit&lt;br /&gt;
		EndIf&lt;br /&gt;
	Until $msg = $GUI_EVENT_CLOSE&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&lt;br /&gt;
Func Del($iInc)&lt;br /&gt;
	GUIDelete($child)&lt;br /&gt;
	CreateChild()&lt;br /&gt;
	If $iInc = -1 Then Return 5&lt;br /&gt;
	Return 1&lt;br /&gt;
EndFunc   ;==&amp;gt;Del&lt;br /&gt;
&lt;br /&gt;
Func CreateChild()&lt;br /&gt;
	$child = GUICreate(&amp;quot;My Draw&amp;quot;)&lt;br /&gt;
	$del = GUICtrlCreateButton(&amp;quot;Delete&amp;quot;, 50, 165, 50)&lt;br /&gt;
&lt;br /&gt;
	$a[1] = GUICtrlCreateGraphic(20, 50, 100, 100)&lt;br /&gt;
	GUICtrlSetBkColor(-1, 0xffffff)&lt;br /&gt;
	GUICtrlSetColor(-1, 0)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xff0000, 0xff0000)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_PIE, 50, 50, 40, 30, 270)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0x00ff00, 0xffffff)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_PIE, 58, 50, 40, -60, 90)&lt;br /&gt;
&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 100, 100, 50, 80)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0x00ff00, 0xc0c0ff)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_RECT, 350, 200, 50, 80)&lt;br /&gt;
	GUICtrlCreateLabel(&amp;quot;label&amp;quot;, 65, 100, 30)&lt;br /&gt;
	GUICtrlSetColor(-1, 0xff)&lt;br /&gt;
&lt;br /&gt;
	$a[2] = GUICtrlCreateGraphic(220, 10, 100, 100)&lt;br /&gt;
&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_PIE, 50, 50, 40, 30, 270)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0x00ff00, 0xffffff)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_PIE, 58, 50, 40, -60, 90)&lt;br /&gt;
&lt;br /&gt;
	$a[3] = GUICtrlCreateGraphic(220, 110, 100, 100)&lt;br /&gt;
	GUICtrlSetBkColor(-1, 0xf08080)&lt;br /&gt;
	GUICtrlSetColor(-1, 0xff)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_HINT, 1)&lt;br /&gt;
&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xff00)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_RECT, 50, 50, 80, 80)&lt;br /&gt;
&lt;br /&gt;
	$a[4] = GUICtrlCreateGraphic(20, 200, 80, 80)&lt;br /&gt;
	GUICtrlSetBkColor(-1, 0xffffff)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_HINT, 1)&lt;br /&gt;
&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 10, 10)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xff)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_LINE, 30, 40)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xff00)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_LINE, 70, 70)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xff0000)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_LINE, 10, 50)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xffff00)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_LINE, 10, 10)&lt;br /&gt;
&lt;br /&gt;
	$a[5] = GUICtrlCreateGraphic(150, 10, 50, 50)&lt;br /&gt;
	GUICtrlSetBkColor(-1, 0xa0ffa0)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 20, 20) ; start point&lt;br /&gt;
	; it is better to draw line and after point&lt;br /&gt;
	; to avoid to switch color at each drawing&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0x0000ff)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_DOT, 30, 30)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_LINE, 20, 40)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xff0000)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_DOT, 25, 25)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_LINE, 40, 40)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_DOT, 30, 40)&lt;br /&gt;
&lt;br /&gt;
	$a[6] = GUICtrlCreateGraphic(110, 260, 230, 130)&lt;br /&gt;
	GUICtrlSetColor(-1, 0) ; to display a black border line&lt;br /&gt;
	GUICtrlSetBkColor(-1, 0xc0c0ff)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_HINT, 3) ; to display control lines and end points&lt;br /&gt;
&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff); fill in blue&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 120, 20) ; start point&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_BEZIER, 120, 100, 200, 20, 200, 100)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_BEZIER + $GUI_GR_CLOSE, 100, 40, 40, 100, 40, 20)&lt;br /&gt;
	GUICtrlSetGraphic(-1, $GUI_GR_LINE, 60, 30) ; start point&lt;br /&gt;
&lt;br /&gt;
	GUISetState()&lt;br /&gt;
EndFunc   ;==&amp;gt;CreateChild&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=User:Jaberwocky6669&amp;diff=11900</id>
		<title>User:Jaberwocky6669</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=User:Jaberwocky6669&amp;diff=11900"/>
		<updated>2013-08-23T04:24:42Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
= 2013 Version =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:logo2.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
©1999-2013 Jonathan Bennett &amp;amp; [[AutoIt_Team | AutoIt Team]]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.autoitscript.com/autoit3/index.php AutoIt v3 Homepage]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys). AutoIt is also very small, self-contained and will run on all versions of Windows out-of-the-box with no annoying &amp;quot;runtimes&amp;quot; required!&lt;br /&gt;
&lt;br /&gt;
AutoIt was initially designed for PC &amp;quot;roll out&amp;quot; situations to reliably automate and configure thousands of PCs. Over time it has become a powerful language that supports complex expressions, user functions, loops and everything else that veteran scripters would expect. &lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
&lt;br /&gt;
*Easy to learn BASIC-like syntax &lt;br /&gt;
*Simulate keystrokes and mouse movements &lt;br /&gt;
*Manipulate windows and processes &lt;br /&gt;
*Interact with all standard windows controls &lt;br /&gt;
*Scripts can be compiled into standalone executables &lt;br /&gt;
*Create Graphical User Interfaces (GUIs) &lt;br /&gt;
*COM support &lt;br /&gt;
*Regular expressions &lt;br /&gt;
*Directly call external DLL and Windows API functions &lt;br /&gt;
*Scriptable RunAs functions &lt;br /&gt;
*Detailed helpfile and large community-based support forums &lt;br /&gt;
*Compatible with Windows XP / Server 2003 / Vista / Server 2008 / 7 / 8 &lt;br /&gt;
*Unicode and x64 support &lt;br /&gt;
*Digitally signed for peace of mind &lt;br /&gt;
*Works with Windows User Account Control (UAC) &lt;br /&gt;
&lt;br /&gt;
AutoIt has been designed to be as small as possible and stand-alone with no external .dll files or registry entries required making it safe to use on Servers. Scripts can be compiled into stand-alone executables with &#039;&#039;&#039;Aut2Exe&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Also supplied is a combined COM and DLL version of AutoIt called AutoItX that allows you to add the unique features of AutoIt to your own favorite scripting or programming languages!&lt;br /&gt;
&lt;br /&gt;
Best of all, AutoIt continues to be free - but if you want to support the time, money and effort spent on the project and web hosting then you may donate at the AutoIt [http://www.autoitscript.com/autoit3/ homepage].&lt;br /&gt;
&lt;br /&gt;
== Features in Detail ==&lt;br /&gt;
&lt;br /&gt;
=== Basic-like Syntax and Rich Function Set ===&lt;br /&gt;
&lt;br /&gt;
AutoIt has a BASIC-like syntax which means that most people who have ever written a script or used a high-level language should be able to pick it up easily.&lt;br /&gt;
&lt;br /&gt;
Although it started life as a simple automation tool, AutoIt now has functions and features that allow it to be used as a general purpose scripting language (with awesome automation as well of course!). Language features include:&lt;br /&gt;
&lt;br /&gt;
The usual high-level elements for functions, loops and expression parsing &lt;br /&gt;
A staggering amount of string handling functions &#039;&#039;&#039;and&#039;&#039;&#039; a Perl compatible regular expression engine (using the PCRE library). &lt;br /&gt;
COM support &lt;br /&gt;
Call Win32 and third-party DLL APIs &lt;br /&gt;
 &lt;br /&gt;
=== Built-in Editor with Syntax Highlighting ===&lt;br /&gt;
&lt;br /&gt;
AutoIt comes with a customized &amp;quot;lite&amp;quot; version of SciTE that makes editing scripts easy. Users can also download a complete version of SciTE that includes additional tools to make things even easier.&lt;br /&gt;
&lt;br /&gt;
=== Standalone and Small ===&lt;br /&gt;
&lt;br /&gt;
AutoIt is a very small and standalone application with no reliance on massive runtimes such as .NET or VB. All you need to run AutoIt scripts are the main AutoIt executable (AutoIt3.exe) and the script. Scripts can also be encoded into standalone executables with the built-in script compiler &#039;&#039;&#039;Aut2Exe&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== International and 64-bit Support ===&lt;br /&gt;
&lt;br /&gt;
AutoIt is fully Unicode aware and also includes x64 versions of all the main components! How many other free scripting languages can you say that about?&lt;br /&gt;
&lt;br /&gt;
=== Key and Mouse Simulation ===&lt;br /&gt;
&lt;br /&gt;
Much time has been spent optimizing the keystroke and mouse simulation functions to be as accurate as possible on all versions of Windows. All the mouse and keyboard routines are highly configurable both in terms of simulation &amp;quot;speed&amp;quot; and functionality.&lt;br /&gt;
&lt;br /&gt;
=== Window Management ===&lt;br /&gt;
&lt;br /&gt;
You can expect to move, hide, show, resize, activate, close and pretty much do what you want with windows. Windows can be referenced by title, text on the window, size, position, class and even internal Win32 API handles.&lt;br /&gt;
&lt;br /&gt;
=== Controls ===&lt;br /&gt;
&lt;br /&gt;
Directly get information on and interact with edit boxes, check boxes, list boxes, combos, buttons, status bars without the risk of keystrokes getting lost. Even work with controls in windows that aren&#039;t active!&lt;br /&gt;
&lt;br /&gt;
=== Graphical User Interfaces (GUIs) ===&lt;br /&gt;
&lt;br /&gt;
AutoIt v3 will also allow you to create some complex GUIs - just like those below!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:gui_eg1.png|284px|GUI Example 1]] [[Image:gui_eg2.png|274px|GUI Example 2]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And much, much more...&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11898</id>
		<title>StringRegExp</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11898"/>
		<updated>2013-08-21T03:14:59Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Check if a string fits a given regular expression pattern.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Courier New&#039;&amp;gt;&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:StringRegExp ( &amp;quot;test&amp;quot;, &amp;quot;pattern&amp;quot; [, flag = 0 [, offset = 1]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| test || The string to check&lt;br /&gt;
|-&lt;br /&gt;
| pattern || The regular expression to compare.&lt;br /&gt;
|-&lt;br /&gt;
| flag || &#039;&#039;&#039;[optional]&#039;&#039;&#039; A number to indicate how the function behaves.  See below for details.  The default is 0.&lt;br /&gt;
|-&lt;br /&gt;
| offset || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The string position to start the match (starts at 1)  The default is 1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Flag&#039;&#039;&#039; || &#039;&#039;&#039;Values&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Returns 1 (matched) or 0 (no match)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Return array of matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Return array of matches including the full match (Perl / PHP style).&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Return array of global matches.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Return an array of arrays containing global matches including the full match (Perl / PHP style).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&#039;&#039;Flag = 0 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 2  || Bad pattern. @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 1 or 2 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.  Check @extended for next offset&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 3 or 4 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
The flag parameter can have one of 5 values (0 through 4).  0 gives a true (1) or false (0) as to whether the pattern was found or not.  1 and 2 find the first match and returns it in an array.  3 and 4 find multiple hits and fills the array with all the matching text.  2 and 4 include the full matching text as the first record, not just the capturing groups, which is all you get with flag 1 and 3.&lt;br /&gt;
&lt;br /&gt;
Regular expression notation is a compact way of specifying a pattern for strings that can be searched.  Regular expressions are character strings in which plain text characters indicate what text should exist in the target string, and a some characters are given special meanings to indicate what variability is allowed in the target string.  AutoIt regular expressions are normally case-sensitive.&lt;br /&gt;
&lt;br /&gt;
Regular expressions are constructed of one or more of the following simple regular expression specifiers.  If the character is not in the following table, then it will match only itself.&lt;br /&gt;
&lt;br /&gt;
Repeating characters (*, +, ?, {...} ) will try to match the largest set possible, which allows the following characters to match as well, unless followed immediately by a question mark; then it will find the smallest pattern that allows the following characters to match as well.&lt;br /&gt;
&lt;br /&gt;
Nested groups are allowed, but keep in mind that all the groups, except non-capturing groups, assign to the returned array, with the outer groups assigning after the inner groups.&lt;br /&gt;
&lt;br /&gt;
Complete description can be found &#039;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution&#039;&#039;&#039;: bad regular expressions can produce a quasi-infinite loop hogging the CPU, and can even cause a crash.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;Matching Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [ &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ] || Match any character in the set.  e.g. &#039;&#039;&#039;[aeiou]&#039;&#039;&#039; matches any lower-case vowel.  A contiguous set can be defined using a dash between the starting and ending characters.  e.g. &#039;&#039;&#039;[a-z]&#039;&#039;&#039; matches any lower case character.  To include a dash (&#039;&#039;&#039;-&#039;&#039;&#039;) in a set, use it as the first or last character of the set.  To include a closing bracket in a set, use it as the first character of the set.  e.g. &#039;&#039;&#039;[][]&#039;&#039;&#039; will match either [ or ].  Note that special characters &#039;&#039;&#039;do not&#039;&#039;&#039; retain their special meanings inside a set, with the exception of &#039;&#039;&#039;\\&#039;&#039;&#039;,  &#039;&#039;&#039;\^&#039;&#039;&#039;, &#039;&#039;&#039;\-&#039;&#039;&#039;,&#039;&#039;&#039;\[&#039;&#039;&#039; and &#039;&#039;&#039;\]&#039;&#039;&#039; match the escaped character inside a set.&lt;br /&gt;
|-&lt;br /&gt;
| [^ &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the set.  e.g. &#039;&#039;&#039;[^0-9]&#039;&#039;&#039; matches any non-digit.  To include a caret (&#039;&#039;&#039;^&#039;&#039;&#039;) in a set, put it after the beginning of the set or escape it (\^).&lt;br /&gt;
|-&lt;br /&gt;
| [:class:] || Match a character in the given class of characters.  Valid classes are: alpha (any alphabetic character), alnum (any alphanumeric character), lower (any lower-case letter), upper (any upper-case letter), digit (any decimal digit 0-9), xdigit (any hexadecimal digit, 0-9, A-F, a-f), space (any whitespace character), blank (only a space or tab), print (any printable character), graph (any printable character except spaces), cntrl (any control character [ascii 127 or &amp;lt;32]) or punct (any punctuation character). So [0-9] is equivalent to &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;:digit:&amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| [^:class:] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the class, but only if the first character.&lt;br /&gt;
|-&lt;br /&gt;
| ( &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Group. The elements in the group are treated in order and can be repeated together.  e.g. &#039;&#039;&#039;(ab)+&#039;&#039;&#039; will match &amp;quot;ab&amp;quot; or &amp;quot;abab&amp;quot;, but not &amp;quot;aba&amp;quot;.  A group will also store the text matched for use in back-references and in the array returned by the function, depending on flag value.&lt;br /&gt;
|-&lt;br /&gt;
| (?#&amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt;.) || comment (not nestable).&lt;br /&gt;
|-&lt;br /&gt;
| (?i) || Case-insensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-insensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i) || (default) Case-sensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-sensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?: &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Non-capturing group.  Behaves just like a normal group, but does not record the matching characters in the array nor can the matched text be used for back-referencing.&lt;br /&gt;
|-&lt;br /&gt;
| (?i: &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Case-insensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-insensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i: &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Case-sensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-sensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?J) || allow duplicate names.&lt;br /&gt;
|-&lt;br /&gt;
| (?m) || ^ and $ match newlines within data.&lt;br /&gt;
|-&lt;br /&gt;
| (?s) || . matches anything including newline. (by default &amp;quot;.&amp;quot; don&#039;t match newline)&lt;br /&gt;
|-&lt;br /&gt;
| (?U) || Invert greediness of quantifiers.&lt;br /&gt;
|-&lt;br /&gt;
| (?x) || Ignore whitespace and # comments.&lt;br /&gt;
|-&lt;br /&gt;
| (?-&amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt;) || unset option(s).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;.&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039; || Match any single character (except newline).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; || Or.  The expression on one side &#039;&#039;&#039;or&#039;&#039;&#039; the other can be matched.&lt;br /&gt;
|-&lt;br /&gt;
| \ || &#039;&#039;Escape&#039;&#039; a special character (have it match the actual character) or introduce a special character type (see below).&lt;br /&gt;
|-&lt;br /&gt;
| \\ || Match an actual backslash (\).&lt;br /&gt;
|-&lt;br /&gt;
| \a || Alarm, that is, the BEL character ((7)).&lt;br /&gt;
|-&lt;br /&gt;
| \A || Match only at beginning of string.&lt;br /&gt;
|-&lt;br /&gt;
| \b || Matches at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \B || Matches when not at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \c || Match a control character, based on the next character.  For example, &#039;&#039;&#039;\cM&#039;&#039;&#039; matches ctrl-M.&lt;br /&gt;
|-&lt;br /&gt;
| \d || Match any digit (0-9).&lt;br /&gt;
|-&lt;br /&gt;
| \D || Match any non-digit.&lt;br /&gt;
|-&lt;br /&gt;
| \e || Match an escape character ((27)).&lt;br /&gt;
|-&lt;br /&gt;
| \E || end case modification.&lt;br /&gt;
|-&lt;br /&gt;
| \f || Match an formfeed character ((12)).&lt;br /&gt;
|-&lt;br /&gt;
| \G || first matching position in subject.&lt;br /&gt;
|-&lt;br /&gt;
| \h || any horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \H || any character that is not a horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \n || Match a linefeed (@LF, (10)).&lt;br /&gt;
|-&lt;br /&gt;
| \K || reset start of match.&lt;br /&gt;
|-&lt;br /&gt;
| \N || a character that is not a newline&lt;br /&gt;
|-&lt;br /&gt;
| \Q || quote (disable) pattern metacharacters till \E.&lt;br /&gt;
|-&lt;br /&gt;
| \r || Match a carriage return (@CR, (13)).&lt;br /&gt;
|-&lt;br /&gt;
| \R || a newline sequence.&lt;br /&gt;
|-&lt;br /&gt;
| \s || Match any whitespace character: (9) through (13) which are Horizontal Tab, Line Feed, Vertical Tab, Form Feed, and Carriage Return, and the standard space ( (32) ).&lt;br /&gt;
|-&lt;br /&gt;
| \S || Match any non-whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \t || Match a tab character ((9)).&lt;br /&gt;
|-&lt;br /&gt;
| \v || any vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \V || any character that is not a vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \w || Match any &amp;quot;word&amp;quot; character: a-z, A-Z, 0-9 or underscore (_).&lt;br /&gt;
|-&lt;br /&gt;
| \W || Match any non-word character.&lt;br /&gt;
|-&lt;br /&gt;
| \X || A Unicode extended grapheme cluster, that is an unbreakable sequence of codepoints which represent a single character for the user.&lt;br /&gt;
|-&lt;br /&gt;
| \ddd || Match character with octal code ddd, or backreference if found. Match the prior group number given exactly. For example, &#039;&#039;&#039;([:alpha:])\1&#039;&#039;&#039; would match a double letter.&lt;br /&gt;
|-&lt;br /&gt;
| \xhh || character with hex code hh.&lt;br /&gt;
|-&lt;br /&gt;
| \x{hhh&amp;lt;nowiki&amp;gt;.&amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;.&amp;lt;/nowiki&amp;gt;} || Match character with hex code hhh..&lt;br /&gt;
|-&lt;br /&gt;
| \z || Match only at end of string.&lt;br /&gt;
|-&lt;br /&gt;
| \Z || Match only at end of string, or before newline at the end.&lt;br /&gt;
|-&lt;br /&gt;
| (?= &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Positive look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;= &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Positive look behind.&lt;br /&gt;
|-&lt;br /&gt;
| (?! &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Negative look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;! &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Negative look behind.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Repeating Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group exactly &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;,} || Repeat the previous character, set or group at least &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {0,&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group at most &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;} || Repeat the previous character, set or group between &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; times, inclusive.&lt;br /&gt;
|-&lt;br /&gt;
| * || Repeat the previous character, set or group 0 or more times.  Equivalent to {0,}&lt;br /&gt;
|-&lt;br /&gt;
| + || Repeat the previous character, set or group 1 or more times.  Equivalent to {1,}&lt;br /&gt;
|-&lt;br /&gt;
| ? || The previous character, set or group may or may not appear.  Equivalent to {0, 1}&lt;br /&gt;
|-&lt;br /&gt;
| ? (after a repeating character) || Find the smallest match instead of the largest.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Character Classes&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [:alnum:] || letters and digits (same as [0-9A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:alpha:] || letters (same as [A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:ascii:] || character codes (same as (0) ... (127))&lt;br /&gt;
|-&lt;br /&gt;
| [:blank:] || space or tab only (same as (9) and (32))&lt;br /&gt;
|-&lt;br /&gt;
| [:cntrl:] || control characters (same as (0) ... (31) and (127))&lt;br /&gt;
|-&lt;br /&gt;
| [:digit:] || decimal digits (same as \d or [0-9])&lt;br /&gt;
|-&lt;br /&gt;
| [:graph:] || printing characters, excluding space (same as (33) ... (126))&lt;br /&gt;
|-&lt;br /&gt;
| [:lower:] || lower case letters (same as [a-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:print:] || printing characters, including space (same as (32) ... (126))&lt;br /&gt;
|-&lt;br /&gt;
| [:punct:] || printing characters, excluding [:alnum:] and [:cntrl:], (33-47, 58-64, 91-96, 123-126)&lt;br /&gt;
|-&lt;br /&gt;
| [:space:] || white space (not quite the same as \s, it includes VT: (11)) (same as [\f\n\r\t\v ])&lt;br /&gt;
|-&lt;br /&gt;
| [:upper:] || upper case letters (same as [A-Z])&lt;br /&gt;
|-&lt;br /&gt;
| [:word:] || &amp;quot;word&amp;quot; characters (same as \w)&lt;br /&gt;
|-&lt;br /&gt;
| [:xdigit:] || hexadecimal digits (same as [0-9A-Fa-f])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;General comments about UTF-8 mode&#039;&#039;&#039;&amp;lt;/u&amp;gt; (use internaly by AutoIt to translate pattern) :&lt;br /&gt;
&lt;br /&gt;
	1. An unbraced hexadecimal escape sequence (such as \xb3) matches a two-byte UTF-8 character if the value is greater than 127.&lt;br /&gt;
&lt;br /&gt;
	2. Octal numbers up to \777 are recognized, and match two-byte UTF-8 characters for values greater than \177.&lt;br /&gt;
&lt;br /&gt;
	3. Repeat quantifiers apply to complete UTF-8 characters, not to individual bytes, for example: \x{100}{3}.&lt;br /&gt;
&lt;br /&gt;
	4. The dot metacharacter matches one UTF-8 character instead of a single byte.&lt;br /&gt;
&lt;br /&gt;
	5. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly test characters of any code value, but the characters that PCRE recognizes as digits, spaces, or word characters remain the same set as before, all with values less than 256. Note that this also applies to \b, because it is defined in terms of \w and \W.&lt;br /&gt;
&lt;br /&gt;
	6. Similarly, characters that match the POSIX named character classes are all low-valued characters.&lt;br /&gt;
&lt;br /&gt;
	7. However, the Perl 5.10 horizontal and vertical whitespace matching escapes (\h, \H, \v, and \V) do match all the appropriate Unicode characters.&lt;br /&gt;
&lt;br /&gt;
	8. Case-insensitive matching applies only to characters whose values are less than 128. PCRE supports case-insensitive matching only when there is a one-to-one mapping between a letter&#039;s cases. There are a small number of many-to-one mappings in Unicode; these are not supported by PCRE.&lt;br /&gt;
&lt;br /&gt;
See also the  tutorial, in which you can run a script to test your regular expression(s).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
[[StringInStr]], [[StringRegExpReplace]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=4&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Option 1, using offset&lt;br /&gt;
Local $nOffset = 1&lt;br /&gt;
&lt;br /&gt;
Local $aArray&lt;br /&gt;
While 1&lt;br /&gt;
	$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 1, $nOffset)&lt;br /&gt;
&lt;br /&gt;
	If @error = 0 Then&lt;br /&gt;
		$nOffset = @extended&lt;br /&gt;
	Else&lt;br /&gt;
		ExitLoop&lt;br /&gt;
	EndIf&lt;br /&gt;
	For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 1 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
	Next&lt;br /&gt;
WEnd&lt;br /&gt;
&lt;br /&gt;
; Option 2, single return, php/preg_match() style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 2)&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 2 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 3, global return, old AutoIt style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 3)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 3 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 4, global return, php/preg_match_all() style&lt;br /&gt;
$aArray = StringRegExp(&#039;F1oF2oF3o&#039;, &#039;(F.o)*?&#039;, 4)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
&lt;br /&gt;
	Local $match = $aArray[$i]&lt;br /&gt;
	For $j = 0 To UBound($match) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 4 - &amp;quot; &amp;amp; $i &amp;amp; &#039;,&#039; &amp;amp; $j, $match[$j])&lt;br /&gt;
	Next&lt;br /&gt;
Next&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=User:Jaberwocky6669&amp;diff=11892</id>
		<title>User:Jaberwocky6669</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=User:Jaberwocky6669&amp;diff=11892"/>
		<updated>2013-08-20T05:51:37Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
= 2013 Version =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:logo2.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
©1999-2013 Jonathan Bennett &amp;amp; [[AutoIt_Team | AutoIt Team]]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.autoitscript.com/autoit3/index.php AutoIt v3 Homepage]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys). AutoIt is also very small, self-contained and will run on all versions of Windows out-of-the-box with no annoying &amp;quot;runtimes&amp;quot; required!&lt;br /&gt;
&lt;br /&gt;
AutoIt was initially designed for PC &amp;quot;roll out&amp;quot; situations to reliably automate and configure thousands of PCs. Over time it has become a powerful language that supports complex expressions, user functions, loops and everything else that veteran scripters would expect. &lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
&lt;br /&gt;
*Easy to learn BASIC-like syntax &lt;br /&gt;
*Simulate keystrokes and mouse movements &lt;br /&gt;
*Manipulate windows and processes &lt;br /&gt;
*Interact with all standard windows controls &lt;br /&gt;
*Scripts can be compiled into standalone executables &lt;br /&gt;
*Create Graphical User Interfaces (GUIs) &lt;br /&gt;
*COM support &lt;br /&gt;
*Regular expressions &lt;br /&gt;
*Directly call external DLL and Windows API functions &lt;br /&gt;
*Scriptable RunAs functions &lt;br /&gt;
*Detailed helpfile and large community-based support forums &lt;br /&gt;
*Compatible with Windows XP / Server 2003 / Vista / Server 2008 / 7 / 8 &lt;br /&gt;
*Unicode and x64 support &lt;br /&gt;
*Digitally signed for peace of mind &lt;br /&gt;
*Works with Windows User Account Control (UAC) &lt;br /&gt;
&lt;br /&gt;
AutoIt has been designed to be as small as possible and stand-alone with no external .dll files or registry entries required making it safe to use on Servers. Scripts can be compiled into stand-alone executables with &#039;&#039;&#039;Aut2Exe&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Also supplied is a combined COM and DLL version of AutoIt called AutoItX that allows you to add the unique features of AutoIt to your own favorite scripting or programming languages!&lt;br /&gt;
&lt;br /&gt;
Best of all, AutoIt continues to be free - but if you want to support the time, money and effort spent on the project and web hosting then you may donate at the AutoIt [http://www.autoitscript.com/autoit3/ homepage].&lt;br /&gt;
&lt;br /&gt;
== Features in Detail ==&lt;br /&gt;
&lt;br /&gt;
=== Basic-like Syntax and Rich Function Set ===&lt;br /&gt;
&lt;br /&gt;
AutoIt has a BASIC-like syntax which means that most people who have ever written a script or used a high-level language should be able to pick it up easily.&lt;br /&gt;
&lt;br /&gt;
Although it started life as a simple automation tool, AutoIt now has functions and features that allow it to be used as a general purpose scripting language (with awesome automation as well of course!). Language features include:&lt;br /&gt;
&lt;br /&gt;
The usual high-level elements for functions, loops and expression parsing &lt;br /&gt;
A staggering amount of string handling functions &#039;&#039;&#039;and&#039;&#039;&#039; a Perl compatible regular expression engine (using the PCRE library). &lt;br /&gt;
COM support &lt;br /&gt;
Call Win32 and third-party DLL APIs &lt;br /&gt;
 &lt;br /&gt;
=== Built-in Editor with Syntax Highlighting ===&lt;br /&gt;
&lt;br /&gt;
AutoIt comes with a customized &amp;quot;lite&amp;quot; version of SciTE that makes editing scripts easy. Users can also download a complete version of SciTE that includes additional tools to make things even easier.&lt;br /&gt;
&lt;br /&gt;
=== Standalone and Small ===&lt;br /&gt;
&lt;br /&gt;
AutoIt is a very small and standalone application with no reliance on massive runtimes such as .NET or VB. All you need to run AutoIt scripts are the main AutoIt executable (AutoIt3.exe) and the script. Scripts can also be encoded into standalone executables with the built-in script compiler &#039;&#039;&#039;Aut2Exe&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== International and 64-bit Support ===&lt;br /&gt;
&lt;br /&gt;
AutoIt is fully Unicode aware and also includes x64 versions of all the main components! How many other free scripting languages can you say that about?&lt;br /&gt;
&lt;br /&gt;
=== Key and Mouse Simulation ===&lt;br /&gt;
&lt;br /&gt;
Much time has been spent optimizing the keystroke and mouse simulation functions to be as accurate as possible on all versions of Windows. All the mouse and keyboard routines are highly configurable both in terms of simulation &amp;quot;speed&amp;quot; and functionality.&lt;br /&gt;
&lt;br /&gt;
=== Window Management ===&lt;br /&gt;
&lt;br /&gt;
You can expect to move, hide, show, resize, activate, close and pretty much do what you want with windows. Windows can be referenced by title, text on the window, size, position, class and even internal Win32 API handles.&lt;br /&gt;
&lt;br /&gt;
=== Controls ===&lt;br /&gt;
&lt;br /&gt;
Directly get information on and interact with edit boxes, check boxes, list boxes, combos, buttons, status bars without the risk of keystrokes getting lost. Even work with controls in windows that aren&#039;t active!&lt;br /&gt;
&lt;br /&gt;
=== Graphical User Interfaces (GUIs) ===&lt;br /&gt;
&lt;br /&gt;
AutoIt v3 will also allow you to create some complex GUIs - just like those below!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:gui_eg1.png|284px|GUI Example 1]] [[Image:gui_eg2.png|274px|GUI Example 2]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And much, much more...&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11891</id>
		<title>StringRegExp</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11891"/>
		<updated>2013-08-20T05:00:39Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;Check if a string fits a given regular expression pattern.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;:StringRegExp ( &amp;quot;test&amp;quot;, &amp;quot;pattern&amp;quot; [, flag = 0 [, offset = 1]] )&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| test || The string to check&lt;br /&gt;
|-&lt;br /&gt;
| pattern || The regular expression to compare.&lt;br /&gt;
|-&lt;br /&gt;
| flag || &#039;&#039;&#039;[optional]&#039;&#039;&#039; A number to indicate how the function behaves.  See below for details.  The default is 0.&lt;br /&gt;
|-&lt;br /&gt;
| offset || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The string position to start the match (starts at 1)  The default is 1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Flag&#039;&#039;&#039; || &#039;&#039;&#039;Values&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Returns 1 (matched) or 0 (no match)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Return array of matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Return array of matches including the full match (Perl / PHP style).&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Return array of global matches.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Return an array of arrays containing global matches including the full match (Perl / PHP style).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&#039;&#039;Flag = 0 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 2  || Bad pattern. @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 1 or 2 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.  Check @extended for next offset&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 3 or 4 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
The flag parameter can have one of 5 values (0 through 4).  0 gives a true (1) or false (0) as to whether the pattern was found or not.  1 and 2 find the first match and returns it in an array.  3 and 4 find multiple hits and fills the array with all the matching text.  2 and 4 include the full matching text as the first record, not just the capturing groups, which is all you get with flag 1 and 3.&lt;br /&gt;
&lt;br /&gt;
Regular expression notation is a compact way of specifying a pattern for strings that can be searched.  Regular expressions are character strings in which plain text characters indicate what text should exist in the target string, and a some characters are given special meanings to indicate what variability is allowed in the target string.  AutoIt regular expressions are normally case-sensitive.&lt;br /&gt;
&lt;br /&gt;
Regular expressions are constructed of one or more of the following simple regular expression specifiers.  If the character is not in the following table, then it will match only itself.&lt;br /&gt;
&lt;br /&gt;
Repeating characters (*, +, ?, {...} ) will try to match the largest set possible, which allows the following characters to match as well, unless followed immediately by a question mark; then it will find the smallest pattern that allows the following characters to match as well.&lt;br /&gt;
&lt;br /&gt;
Nested groups are allowed, but keep in mind that all the groups, except non-capturing groups, assign to the returned array, with the outer groups assigning after the inner groups.&lt;br /&gt;
&lt;br /&gt;
Complete description can be found &#039;&#039;&#039;[[here]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution&#039;&#039;&#039;: bad regular expressions can produce a quasi-infinite loop hogging the CPU, and can even cause a crash.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;Matching Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [ &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ] || Match any character in the set.  e.g. &#039;&#039;&#039;[aeiou]&#039;&#039;&#039; matches any lower-case vowel.  A contiguous set can be defined using a dash between the starting and ending characters.  e.g. &#039;&#039;&#039;[a-z]&#039;&#039;&#039; matches any lower case character.  To include a dash (&#039;&#039;&#039;-&#039;&#039;&#039;) in a set, use it as the first or last character of the set.  To include a closing bracket in a set, use it as the first character of the set.  e.g. &#039;&#039;&#039;[][]&#039;&#039;&#039; will match either [ or ].  Note that special characters &#039;&#039;&#039;do not&#039;&#039;&#039; retain their special meanings inside a set, with the exception of &#039;&#039;&#039;\\&#039;&#039;&#039;,  &#039;&#039;&#039;\^&#039;&#039;&#039;, &#039;&#039;&#039;\-&#039;&#039;&#039;,&#039;&#039;&#039;\[&#039;&#039;&#039; and &#039;&#039;&#039;\]&#039;&#039;&#039; match the escaped character inside a set.&lt;br /&gt;
|-&lt;br /&gt;
| [^ &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the set.  e.g. &#039;&#039;&#039;[^0-9]&#039;&#039;&#039; matches any non-digit.  To include a caret (&#039;&#039;&#039;^&#039;&#039;&#039;) in a set, put it after the beginning of the set or escape it (\^).&lt;br /&gt;
|-&lt;br /&gt;
| [:class:] || Match a character in the given class of characters.  Valid classes are: alpha (any alphabetic character), alnum (any alphanumeric character), lower (any lower-case letter), upper (any upper-case letter), digit (any decimal digit 0-9), xdigit (any hexadecimal digit, 0-9, A-F, a-f), space (any whitespace character), blank (only a space or tab), print (any printable character), graph (any printable character except spaces), cntrl (any control character [ascii 127 or &amp;lt;32]) or punct (any punctuation character). So [0-9] is equivalent to &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;:digit:&amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| [^:class:] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the class, but only if the first character.&lt;br /&gt;
|-&lt;br /&gt;
| ( &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Group. The elements in the group are treated in order and can be repeated together.  e.g. &#039;&#039;&#039;(ab)+&#039;&#039;&#039; will match &amp;quot;ab&amp;quot; or &amp;quot;abab&amp;quot;, but not &amp;quot;aba&amp;quot;.  A group will also store the text matched for use in back-references and in the array returned by the function, depending on flag value.&lt;br /&gt;
|-&lt;br /&gt;
| (?#&amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt;.) || comment (not nestable).&lt;br /&gt;
|-&lt;br /&gt;
| (?i) || Case-insensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-insensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i) || (default) Case-sensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-sensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?: &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Non-capturing group.  Behaves just like a normal group, but does not record the matching characters in the array nor can the matched text be used for back-referencing.&lt;br /&gt;
|-&lt;br /&gt;
| (?i: &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Case-insensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-insensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i: &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Case-sensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-sensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?J) || allow duplicate names.&lt;br /&gt;
|-&lt;br /&gt;
| (?m) || ^ and $ match newlines within data.&lt;br /&gt;
|-&lt;br /&gt;
| (?s) || . matches anything including newline. (by default &amp;quot;.&amp;quot; don&#039;t match newline)&lt;br /&gt;
|-&lt;br /&gt;
| (?U) || Invert greediness of quantifiers.&lt;br /&gt;
|-&lt;br /&gt;
| (?x) || Ignore whitespace and # comments.&lt;br /&gt;
|-&lt;br /&gt;
| (?-&amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt;) || unset option(s).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;.&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039; || Match any single character (except newline).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; || Or.  The expression on one side &#039;&#039;&#039;or&#039;&#039;&#039; the other can be matched.&lt;br /&gt;
|-&lt;br /&gt;
| \ || &#039;&#039;Escape&#039;&#039; a special character (have it match the actual character) or introduce a special character type (see below).&lt;br /&gt;
|-&lt;br /&gt;
| \\ || Match an actual backslash (\).&lt;br /&gt;
|-&lt;br /&gt;
| \a || Alarm, that is, the BEL character ([[Chr]](7)).&lt;br /&gt;
|-&lt;br /&gt;
| \A || Match only at beginning of string.&lt;br /&gt;
|-&lt;br /&gt;
| \b || Matches at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \B || Matches when not at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \c || Match a control character, based on the next character.  For example, &#039;&#039;&#039;\cM&#039;&#039;&#039; matches ctrl-M.&lt;br /&gt;
|-&lt;br /&gt;
| \d || Match any digit (0-9).&lt;br /&gt;
|-&lt;br /&gt;
| \D || Match any non-digit.&lt;br /&gt;
|-&lt;br /&gt;
| \e || Match an escape character ([[Chr]](27)).&lt;br /&gt;
|-&lt;br /&gt;
| \E || end case modification.&lt;br /&gt;
|-&lt;br /&gt;
| \f || Match an formfeed character ([[Chr]](12)).&lt;br /&gt;
|-&lt;br /&gt;
| \G || first matching position in subject.&lt;br /&gt;
|-&lt;br /&gt;
| \h || any horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \H || any character that is not a horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \n || Match a linefeed (@LF, [[Chr]](10)).&lt;br /&gt;
|-&lt;br /&gt;
| \K || reset start of match.&lt;br /&gt;
|-&lt;br /&gt;
| \N || a character that is not a newline&lt;br /&gt;
|-&lt;br /&gt;
| \Q || quote (disable) pattern metacharacters till \E.&lt;br /&gt;
|-&lt;br /&gt;
| \r || Match a carriage return (@CR, [[Chr]](13)).&lt;br /&gt;
|-&lt;br /&gt;
| \R || a newline sequence.&lt;br /&gt;
|-&lt;br /&gt;
| \s || Match any whitespace character: [[Chr]](9) through [[Chr]](13) which are Horizontal Tab, Line Feed, Vertical Tab, Form Feed, and Carriage Return, and the standard space ( [[Chr]](32) ).&lt;br /&gt;
|-&lt;br /&gt;
| \S || Match any non-whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \t || Match a tab character ([[Chr]](9)).&lt;br /&gt;
|-&lt;br /&gt;
| \v || any vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \V || any character that is not a vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \w || Match any &amp;quot;word&amp;quot; character: a-z, A-Z, 0-9 or underscore (_).&lt;br /&gt;
|-&lt;br /&gt;
| \W || Match any non-word character.&lt;br /&gt;
|-&lt;br /&gt;
| \X || A Unicode extended grapheme cluster, that is an unbreakable sequence of codepoints which represent a single character for the user.&lt;br /&gt;
|-&lt;br /&gt;
| \ddd || Match character with octal code ddd, or backreference if found. Match the prior group number given exactly. For example, &#039;&#039;&#039;([:alpha:])\1&#039;&#039;&#039; would match a double letter.&lt;br /&gt;
|-&lt;br /&gt;
| \xhh || character with hex code hh.&lt;br /&gt;
|-&lt;br /&gt;
| \x{hhh&amp;lt;nowiki&amp;gt;.&amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;.&amp;lt;/nowiki&amp;gt;} || Match character with hex code hhh..&lt;br /&gt;
|-&lt;br /&gt;
| \z || Match only at end of string.&lt;br /&gt;
|-&lt;br /&gt;
| \Z || Match only at end of string, or before newline at the end.&lt;br /&gt;
|-&lt;br /&gt;
| (?= &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Positive look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;= &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Positive look behind.&lt;br /&gt;
|-&lt;br /&gt;
| (?! &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Negative look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;! &amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt; ) || Negative look behind.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Repeating Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group exactly &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;,} || Repeat the previous character, set or group at least &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {0,&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group at most &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;} || Repeat the previous character, set or group between &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; times, inclusive.&lt;br /&gt;
|-&lt;br /&gt;
| * || Repeat the previous character, set or group 0 or more times.  Equivalent to {0,}&lt;br /&gt;
|-&lt;br /&gt;
| + || Repeat the previous character, set or group 1 or more times.  Equivalent to {1,}&lt;br /&gt;
|-&lt;br /&gt;
| ? || The previous character, set or group may or may not appear.  Equivalent to {0, 1}&lt;br /&gt;
|-&lt;br /&gt;
| ? (after a repeating character) || Find the smallest match instead of the largest.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Character Classes&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [:alnum:] || letters and digits (same as [0-9A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:alpha:] || letters (same as [A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:ascii:] || character codes (same as [[Chr]](0) ... [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:blank:] || space or tab only (same as [[Chr]](9) and [[Chr]](32))&lt;br /&gt;
|-&lt;br /&gt;
| [:cntrl:] || control characters (same as [[Chr]](0) ... [[Chr]](31) and [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:digit:] || decimal digits (same as \d or [0-9])&lt;br /&gt;
|-&lt;br /&gt;
| [:graph:] || printing characters, excluding space (same as [[Chr]](33) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:lower:] || lower case letters (same as [a-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:print:] || printing characters, including space (same as [[Chr]](32) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:punct:] || printing characters, excluding [:alnum:] and [:cntrl:], (33-47, 58-64, 91-96, 123-126)&lt;br /&gt;
|-&lt;br /&gt;
| [:space:] || white space (not quite the same as \s, it includes VT: [[Chr]](11)) (same as [\f\n\r\t\v ])&lt;br /&gt;
|-&lt;br /&gt;
| [:upper:] || upper case letters (same as [A-Z])&lt;br /&gt;
|-&lt;br /&gt;
| [:word:] || &amp;quot;word&amp;quot; characters (same as \w)&lt;br /&gt;
|-&lt;br /&gt;
| [:xdigit:] || hexadecimal digits (same as [0-9A-Fa-f])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;General comments about UTF-8 mode&#039;&#039;&#039;&amp;lt;/u&amp;gt; (use internaly by AutoIt to translate pattern) :&lt;br /&gt;
&lt;br /&gt;
	1. An unbraced hexadecimal escape sequence (such as \xb3) matches a two-byte UTF-8 character if the value is greater than 127.&lt;br /&gt;
&lt;br /&gt;
	2. Octal numbers up to \777 are recognized, and match two-byte UTF-8 characters for values greater than \177.&lt;br /&gt;
&lt;br /&gt;
	3. Repeat quantifiers apply to complete UTF-8 characters, not to individual bytes, for example: \x{100}{3}.&lt;br /&gt;
&lt;br /&gt;
	4. The dot metacharacter matches one UTF-8 character instead of a single byte.&lt;br /&gt;
&lt;br /&gt;
	5. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly test characters of any code value, but the characters that PCRE recognizes as digits, spaces, or word characters remain the same set as before, all with values less than 256. Note that this also applies to \b, because it is defined in terms of \w and \W.&lt;br /&gt;
&lt;br /&gt;
	6. Similarly, characters that match the POSIX named character classes are all low-valued characters.&lt;br /&gt;
&lt;br /&gt;
	7. However, the Perl 5.10 horizontal and vertical whitespace matching escapes (\h, \H, \v, and \V) do match all the appropriate Unicode characters.&lt;br /&gt;
&lt;br /&gt;
	8. Case-insensitive matching applies only to characters whose values are less than 128. PCRE supports case-insensitive matching only when there is a one-to-one mapping between a letter&#039;s cases. There are a small number of many-to-one mappings in Unicode; these are not supported by PCRE.&lt;br /&gt;
&lt;br /&gt;
See also the [[Regular Expression]] tutorial, in which you can run a script to test your regular expression(s).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
[[StringInStr]], [[StringRegExpReplace]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Option 1, using offset&lt;br /&gt;
Local $nOffset = 1&lt;br /&gt;
&lt;br /&gt;
Local $aArray&lt;br /&gt;
While 1&lt;br /&gt;
	$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 1, $nOffset)&lt;br /&gt;
&lt;br /&gt;
	If @error = 0 Then&lt;br /&gt;
		$nOffset = @extended&lt;br /&gt;
	Else&lt;br /&gt;
		ExitLoop&lt;br /&gt;
	EndIf&lt;br /&gt;
	For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 1 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
	Next&lt;br /&gt;
WEnd&lt;br /&gt;
&lt;br /&gt;
; Option 2, single return, php/preg_match() style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 2)&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 2 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 3, global return, old AutoIt style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 3)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 3 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 4, global return, php/preg_match_all() style&lt;br /&gt;
$aArray = StringRegExp(&#039;F1oF2oF3o&#039;, &#039;(F.o)*?&#039;, 4)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
&lt;br /&gt;
	Local $match = $aArray[$i]&lt;br /&gt;
	For $j = 0 To UBound($match) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 4 - &amp;quot; &amp;amp; $i &amp;amp; &#039;,&#039; &amp;amp; $j, $match[$j])&lt;br /&gt;
	Next&lt;br /&gt;
Next&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=ControlCommand&amp;diff=11890</id>
		<title>ControlCommand</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=ControlCommand&amp;diff=11890"/>
		<updated>2013-08-20T03:18:07Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;&lt;br /&gt;
Sends a command to a control.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
:ControlCommand ( &amp;quot;title&amp;quot;, &amp;quot;text&amp;quot;, controlID, &amp;quot;command&amp;quot; [, &amp;quot;option&amp;quot;] )&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| title || The title/hWnd/class of the window to access.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| text || The text of the window to access.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| controlID || The control to interact with.  See [[Controls]].&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| command || The command to send to the control.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| option || &#039;&#039;&#039;[optional]&#039;&#039;&#039; Additional parameter required by some commands.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
Depends on command as table below shows.  In case of an error (such as an invalid command or window/control), @error=1.&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Command&#039;&#039;&#039;, &#039;&#039;&#039;Option&#039;&#039;&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsVisible&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Control is visible, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsEnabled&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Control is enabled, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;ShowDropDown&amp;quot;, &amp;quot;&amp;quot; || Displays the ComboBox dropdown&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;HideDropDown&amp;quot;, &amp;quot;&amp;quot; || Hides the ComboBox dropdown&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;AddString&amp;quot;, &#039;string&#039; || Adds a string to the end in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;DelString&amp;quot;, occurrence || Deletes a string according to occurrence in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;FindString&amp;quot;, &#039;string&#039; || Returns occurrence ref of the exact string in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SetCurrentSelection&amp;quot;, &#039;&#039;occurrence&#039;&#039; || Sets selection to occurrence ref in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SelectString&amp;quot;, &#039;string&#039; || Sets selection according to string in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsChecked&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Button is checked, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;Check&amp;quot;, &amp;quot;&amp;quot; || Checks radio or check Button&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;UnCheck&amp;quot;, &amp;quot;&amp;quot; || Unchecks radio or check Button&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentLine&amp;quot;, &amp;quot;&amp;quot; || Returns the line # where the caret is in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentCol&amp;quot;, &amp;quot;&amp;quot; || Returns the column # where the caret is in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentSelection&amp;quot;, &amp;quot;&amp;quot; || Returns name of the currently selected item in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetLineCount&amp;quot;, &amp;quot;&amp;quot; || Returns # of lines in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetLine&amp;quot;, &#039;&#039;line&#039;&#039;# || Returns text at line # passed of an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetSelected&amp;quot;, &amp;quot;&amp;quot; || Returns selected text of an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;EditPaste&amp;quot;, &#039;string&#039; || Pastes the &#039;string&#039; at the Edit&#039;s caret position&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;CurrentTab&amp;quot;, &amp;quot;&amp;quot; || Returns the current Tab shown of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;TabRight&amp;quot;, &amp;quot;&amp;quot; || Moves to the next tab to the right of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;TabLeft&amp;quot;, &amp;quot;&amp;quot; || Moves to the next tab to the left of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SendCommandID&amp;quot;, &#039;&#039;Command ID&#039;&#039; || Simulates the WM_COMMAND message. Usually used for ToolbarWindow32 controls - use the ToolBar tab of Au3Info to get the Command ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
Some controls will resist automation unless they are the active window. Use the [[WinActivate]] function to force the control&#039;s window to the top before using &amp;lt;a href=&amp;quot;ControlCommand.htm&amp;quot;&amp;gt;ControlCommand()&amp;lt;/a&amp;gt; on these controls.&lt;br /&gt;
&lt;br /&gt;
Certain commands that work on normal Combo and ListBoxes do not work on &amp;quot;ComboLBox&amp;quot; controls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
[[ControlClick]], [[ControlDisable]], [[ControlEnable]], [[ControlFocus]], [[ControlGetPos]], [[ControlGetText]], [[ControlHide]], [[ControlMove]], [[ControlSetText]], [[ControlShow]], [[StatusbarGetText]], [[WinActivate]], [[WinMenuSelectItem]], [[WinGetClassList]], [[ControlGetFocus]], [[ControlListView]], [[ControlSend]], [[ControlTreeView]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	; Run Notepad&lt;br /&gt;
	Run(&amp;quot;notepad.exe&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	; Wait 10 seconds for the Notepad window to appear.&lt;br /&gt;
	Local $hWnd = WinWait(&amp;quot;[CLASS:Notepad]&amp;quot;, &amp;quot;&amp;quot;, 10)&lt;br /&gt;
&lt;br /&gt;
	; Send a command to the edit control of Notepad to find the number of lines. The handle returned by WinWait is used for the &amp;quot;title&amp;quot; parameter of ControlCommand.&lt;br /&gt;
	Local $iCount = ControlCommand($hWnd, &amp;quot;&amp;quot;, &amp;quot;Edit1&amp;quot;, &amp;quot;GetLineCount&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	; Display the number of lines.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;The number of lines in Notepad are: &amp;quot; &amp;amp; $iCount)&lt;br /&gt;
&lt;br /&gt;
	; Close the Notepad window using the handle returned by WinWait.&lt;br /&gt;
	WinClose($hWnd)&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=ControlCommand&amp;diff=11889</id>
		<title>ControlCommand</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=ControlCommand&amp;diff=11889"/>
		<updated>2013-08-20T03:06:27Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;&lt;br /&gt;
Sends a command to a control.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
:ControlCommand ( &amp;quot;title&amp;quot;, &amp;quot;text&amp;quot;, controlID, &amp;quot;command&amp;quot; [, &amp;quot;option&amp;quot;] )&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| title || The title/hWnd/class of the window to access.&lt;br /&gt;
|-&lt;br /&gt;
| text || The text of the window to access.&lt;br /&gt;
|-&lt;br /&gt;
| controlID || The control to interact with.  See [[Controls]].&lt;br /&gt;
|-&lt;br /&gt;
| command || The command to send to the control.&lt;br /&gt;
|-&lt;br /&gt;
| option || &#039;&#039;&#039;[optional]&#039;&#039;&#039; Additional parameter required by some commands.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
Depends on command as table below shows.  In case of an error (such as an invalid command or window/control), @error=1.&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Command&#039;&#039;&#039;, &#039;&#039;&#039;Option&#039;&#039;&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsVisible&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Control is visible, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsEnabled&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Control is enabled, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;ShowDropDown&amp;quot;, &amp;quot;&amp;quot; || Displays the ComboBox dropdown&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;HideDropDown&amp;quot;, &amp;quot;&amp;quot; || Hides the ComboBox dropdown&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;AddString&amp;quot;, &#039;string&#039; || Adds a string to the end in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;DelString&amp;quot;, occurrence || Deletes a string according to occurrence in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;FindString&amp;quot;, &#039;string&#039; || Returns occurrence ref of the exact string in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SetCurrentSelection&amp;quot;, &#039;&#039;occurrence&#039;&#039; || Sets selection to occurrence ref in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SelectString&amp;quot;, &#039;string&#039; || Sets selection according to string in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsChecked&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Button is checked, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;Check&amp;quot;, &amp;quot;&amp;quot; || Checks radio or check Button&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;UnCheck&amp;quot;, &amp;quot;&amp;quot; || Unchecks radio or check Button&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentLine&amp;quot;, &amp;quot;&amp;quot; || Returns the line # where the caret is in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentCol&amp;quot;, &amp;quot;&amp;quot; || Returns the column # where the caret is in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentSelection&amp;quot;, &amp;quot;&amp;quot; || Returns name of the currently selected item in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetLineCount&amp;quot;, &amp;quot;&amp;quot; || Returns # of lines in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetLine&amp;quot;, &#039;&#039;line&#039;&#039;# || Returns text at line # passed of an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetSelected&amp;quot;, &amp;quot;&amp;quot; || Returns selected text of an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;EditPaste&amp;quot;, &#039;string&#039; || Pastes the &#039;string&#039; at the Edit&#039;s caret position&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;CurrentTab&amp;quot;, &amp;quot;&amp;quot; || Returns the current Tab shown of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;TabRight&amp;quot;, &amp;quot;&amp;quot; || Moves to the next tab to the right of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;TabLeft&amp;quot;, &amp;quot;&amp;quot; || Moves to the next tab to the left of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SendCommandID&amp;quot;, &#039;&#039;Command ID&#039;&#039; || Simulates the WM_COMMAND message. Usually used for ToolbarWindow32 controls - use the ToolBar tab of Au3Info to get the Command ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
Some controls will resist automation unless they are the active window. Use the [[WinActivate]] function to force the control&#039;s window to the top before using &amp;lt;a href=&amp;quot;ControlCommand.htm&amp;quot;&amp;gt;ControlCommand()&amp;lt;/a&amp;gt; on these controls.&lt;br /&gt;
&lt;br /&gt;
Certain commands that work on normal Combo and ListBoxes do not work on &amp;quot;ComboLBox&amp;quot; controls.&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
[[ControlClick]], [[ControlDisable]], [[ControlEnable]], [[ControlFocus]], [[ControlGetPos]], [[ControlGetText]], [[ControlHide]], [[ControlMove]], [[ControlSetText]], [[ControlShow]], [[StatusbarGetText]], [[WinActivate]], [[WinMenuSelectItem]], [[WinGetClassList]], [[ControlGetFocus]], [[ControlListView]], [[ControlSend]], [[ControlTreeView]]&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	; Run Notepad&lt;br /&gt;
	Run(&amp;quot;notepad.exe&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	; Wait 10 seconds for the Notepad window to appear.&lt;br /&gt;
	Local $hWnd = WinWait(&amp;quot;[CLASS:Notepad]&amp;quot;, &amp;quot;&amp;quot;, 10)&lt;br /&gt;
&lt;br /&gt;
	; Send a command to the edit control of Notepad to find the number of lines. The handle returned by WinWait is used for the &amp;quot;title&amp;quot; parameter of ControlCommand.&lt;br /&gt;
	Local $iCount = ControlCommand($hWnd, &amp;quot;&amp;quot;, &amp;quot;Edit1&amp;quot;, &amp;quot;GetLineCount&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	; Display the number of lines.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;The number of lines in Notepad are: &amp;quot; &amp;amp; $iCount)&lt;br /&gt;
&lt;br /&gt;
	; Close the Notepad window using the handle returned by WinWait.&lt;br /&gt;
	WinClose($hWnd)&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=ControlCommand&amp;diff=11888</id>
		<title>ControlCommand</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=ControlCommand&amp;diff=11888"/>
		<updated>2013-08-19T19:46:34Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Description&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;&lt;br /&gt;
Sends a command to a control.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
:ControlCommand ( &amp;quot;title&amp;quot;, &amp;quot;text&amp;quot;, controlID, &amp;quot;command&amp;quot; [, &amp;quot;option&amp;quot;] )&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| title || The title/hWnd/class of the window to access.&lt;br /&gt;
|-&lt;br /&gt;
| text || The text of the window to access.&lt;br /&gt;
|-&lt;br /&gt;
| controlID || The control to interact with.  See [[Controls]].&lt;br /&gt;
|-&lt;br /&gt;
| command || The command to send to the control.&lt;br /&gt;
|-&lt;br /&gt;
| option || &#039;&#039;&#039;[optional]&#039;&#039;&#039; Additional parameter required by some commands.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
Depends on command as table below shows.  In case of an error (such as an invalid command or window/control), @error=1.&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Command&#039;&#039;&#039;, &#039;&#039;&#039;Option&#039;&#039;&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsVisible&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Control is visible, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsEnabled&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Control is enabled, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;ShowDropDown&amp;quot;, &amp;quot;&amp;quot; || Displays the ComboBox dropdown&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;HideDropDown&amp;quot;, &amp;quot;&amp;quot; || Hides the ComboBox dropdown&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;AddString&amp;quot;, &#039;string&#039; || Adds a string to the end in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;DelString&amp;quot;, occurrence || Deletes a string according to occurrence in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;FindString&amp;quot;, &#039;string&#039; || Returns occurrence ref of the exact string in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SetCurrentSelection&amp;quot;, &#039;&#039;occurrence&#039;&#039; || Sets selection to occurrence ref in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SelectString&amp;quot;, &#039;string&#039; || Sets selection according to string in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsChecked&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Button is checked, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;Check&amp;quot;, &amp;quot;&amp;quot; || Checks radio or check Button&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;UnCheck&amp;quot;, &amp;quot;&amp;quot; || Unchecks radio or check Button&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentLine&amp;quot;, &amp;quot;&amp;quot; || Returns the line # where the caret is in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentCol&amp;quot;, &amp;quot;&amp;quot; || Returns the column # where the caret is in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentSelection&amp;quot;, &amp;quot;&amp;quot; || Returns name of the currently selected item in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetLineCount&amp;quot;, &amp;quot;&amp;quot; || Returns # of lines in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetLine&amp;quot;, &#039;&#039;line&#039;&#039;# || Returns text at line # passed of an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetSelected&amp;quot;, &amp;quot;&amp;quot; || Returns selected text of an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;EditPaste&amp;quot;, &#039;string&#039; || Pastes the &#039;string&#039; at the Edit&#039;s caret position&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;CurrentTab&amp;quot;, &amp;quot;&amp;quot; || Returns the current Tab shown of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;TabRight&amp;quot;, &amp;quot;&amp;quot; || Moves to the next tab to the right of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;TabLeft&amp;quot;, &amp;quot;&amp;quot; || Moves to the next tab to the left of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SendCommandID&amp;quot;, &#039;&#039;Command ID&#039;&#039; || Simulates the WM_COMMAND message. Usually used for ToolbarWindow32 controls - use the ToolBar tab of Au3Info to get the Command ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
Some controls will resist automation unless they are the active window. Use the [[WinActivate]] function to force the control&#039;s window to the top before using &amp;lt;a href=&amp;quot;ControlCommand.htm&amp;quot;&amp;gt;ControlCommand()&amp;lt;/a&amp;gt; on these controls.&lt;br /&gt;
&lt;br /&gt;
Certain commands that work on normal Combo and ListBoxes do not work on &amp;quot;ComboLBox&amp;quot; controls.&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
[[ControlClick]], [[ControlDisable]], [[ControlEnable]], [[ControlFocus]], [[ControlGetPos]], [[ControlGetText]], [[ControlHide]], [[ControlMove]], [[ControlSetText]], [[ControlShow]], [[StatusbarGetText]], [[WinActivate]], [[WinMenuSelectItem]], [[WinGetClassList]], [[ControlGetFocus]], [[ControlListView]], [[ControlSend]], [[ControlTreeView]]&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	; Run Notepad&lt;br /&gt;
	Run(&amp;quot;notepad.exe&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	; Wait 10 seconds for the Notepad window to appear.&lt;br /&gt;
	Local $hWnd = WinWait(&amp;quot;[CLASS:Notepad]&amp;quot;, &amp;quot;&amp;quot;, 10)&lt;br /&gt;
&lt;br /&gt;
	; Send a command to the edit control of Notepad to find the number of lines. The handle returned by WinWait is used for the &amp;quot;title&amp;quot; parameter of ControlCommand.&lt;br /&gt;
	Local $iCount = ControlCommand($hWnd, &amp;quot;&amp;quot;, &amp;quot;Edit1&amp;quot;, &amp;quot;GetLineCount&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	; Display the number of lines.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;The number of lines in Notepad are: &amp;quot; &amp;amp; $iCount)&lt;br /&gt;
&lt;br /&gt;
	; Close the Notepad window using the handle returned by WinWait.&lt;br /&gt;
	WinClose($hWnd)&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=ControlCommand&amp;diff=11887</id>
		<title>ControlCommand</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=ControlCommand&amp;diff=11887"/>
		<updated>2013-08-19T18:28:49Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Description&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;&lt;br /&gt;
Sends a command to a control.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
:ControlCommand ( &amp;quot;title&amp;quot;, &amp;quot;text&amp;quot;, controlID, &amp;quot;command&amp;quot; [, &amp;quot;option&amp;quot;] )&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| title || The title/hWnd/class of the window to access.&lt;br /&gt;
|-&lt;br /&gt;
| text || The text of the window to access.&lt;br /&gt;
|-&lt;br /&gt;
| controlID || The control to interact with.  See [../intro/controls.htm Controls].&lt;br /&gt;
|-&lt;br /&gt;
| command || The command to send to the control.&lt;br /&gt;
|-&lt;br /&gt;
| option || &#039;&#039;&#039;[optional]&#039;&#039;&#039; Additional parameter required by some commands.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
Depends on command as table below shows.  In case of an error (such as an invalid command or window/control), @error=1.&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Command&#039;&#039;&#039;, &#039;&#039;&#039;Option&#039;&#039;&#039;&lt;br /&gt;
! | &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsVisible&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Control is visible, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsEnabled&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Control is enabled, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;ShowDropDown&amp;quot;, &amp;quot;&amp;quot; || Displays the ComboBox dropdown&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;HideDropDown&amp;quot;, &amp;quot;&amp;quot; || Hides the ComboBox dropdown&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;AddString&amp;quot;, &#039;string&#039; || Adds a string to the end in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;DelString&amp;quot;, occurrence || Deletes a string according to occurrence in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;FindString&amp;quot;, &#039;string&#039; || Returns occurrence ref of the exact string in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SetCurrentSelection&amp;quot;, &#039;&#039;occurrence&#039;&#039; || Sets selection to occurrence ref in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SelectString&amp;quot;, &#039;string&#039; || Sets selection according to string in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsChecked&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Button is checked, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;Check&amp;quot;, &amp;quot;&amp;quot; || Checks radio or check Button&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;UnCheck&amp;quot;, &amp;quot;&amp;quot; || Unchecks radio or check Button&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentLine&amp;quot;, &amp;quot;&amp;quot; || Returns the line # where the caret is in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentCol&amp;quot;, &amp;quot;&amp;quot; || Returns the column # where the caret is in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentSelection&amp;quot;, &amp;quot;&amp;quot; || Returns name of the currently selected item in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetLineCount&amp;quot;, &amp;quot;&amp;quot; || Returns # of lines in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetLine&amp;quot;, &#039;&#039;line&#039;&#039;# || Returns text at line # passed of an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetSelected&amp;quot;, &amp;quot;&amp;quot; || Returns selected text of an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;EditPaste&amp;quot;, &#039;string&#039; || Pastes the &#039;string&#039; at the Edit&#039;s caret position&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;CurrentTab&amp;quot;, &amp;quot;&amp;quot; || Returns the current Tab shown of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;TabRight&amp;quot;, &amp;quot;&amp;quot; || Moves to the next tab to the right of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;TabLeft&amp;quot;, &amp;quot;&amp;quot; || Moves to the next tab to the left of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SendCommandID&amp;quot;, &#039;&#039;Command ID&#039;&#039; || Simulates the WM_COMMAND message. Usually used for ToolbarWindow32 controls - use the ToolBar tab of Au3Info to get the Command ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
Some controls will resist automation unless they are the active window. Use the [[WinActivate()]] function to force the control&#039;s window to the top before using [[WinActivate()]] on these controls.&lt;br /&gt;
&lt;br /&gt;
Certain commands that work on normal Combo and ListBoxes do not work on &amp;quot;ComboLBox&amp;quot; controls.&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
[[ControlClick]], [[ControlDisable]], [[ControlEnable]], [[ControlFocus]], [[ControlGetPos]], [[ControlGetText]], [[ControlHide]], [[ControlMove]], [[ControlSetText]], [[ControlShow]], [[StatusbarGetText]], [[WinActivate]], [[WinMenuSelectItem]], [[WinGetClassList]], [[ControlGetFocus]], [[ControlListView]], [[ControlSend]], [[ControlTreeView]]&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	; Run Notepad&lt;br /&gt;
	Run(&amp;quot;notepad.exe&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	; Wait 10 seconds for the Notepad window to appear.&lt;br /&gt;
	Local $hWnd = WinWait(&amp;quot;[CLASS:Notepad]&amp;quot;, &amp;quot;&amp;quot;, 10)&lt;br /&gt;
&lt;br /&gt;
	; Send a command to the edit control of Notepad to find the number of lines. The handle returned by WinWait is used for the &amp;quot;title&amp;quot; parameter of ControlCommand.&lt;br /&gt;
	Local $iCount = ControlCommand($hWnd, &amp;quot;&amp;quot;, &amp;quot;Edit1&amp;quot;, &amp;quot;GetLineCount&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	; Display the number of lines.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;The number of lines in Notepad are: &amp;quot; &amp;amp; $iCount)&lt;br /&gt;
&lt;br /&gt;
	; Close the Notepad window using the handle returned by WinWait.&lt;br /&gt;
	WinClose($hWnd)&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11886</id>
		<title>StringRegExp</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11886"/>
		<updated>2013-08-19T17:31:26Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Description&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;&lt;br /&gt;
Check if a string fits a given regular expression pattern.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
:StringRegExp ( &amp;quot;test&amp;quot;, &amp;quot;pattern&amp;quot; [, flag = 0 [, offset = 1]] )&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| test || The string to check&lt;br /&gt;
|-&lt;br /&gt;
| pattern || The regular expression to compare.&lt;br /&gt;
|-&lt;br /&gt;
| flag || &#039;&#039;&#039;[optional]&#039;&#039;&#039; A number to indicate how the function behaves.  See below for details.  The default is 0.&lt;br /&gt;
|-&lt;br /&gt;
| offset || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The string position to start the match (starts at 1)  The default is 1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Flag&#039;&#039;&#039; || &#039;&#039;&#039;Values&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Returns 1 (matched) or 0 (no match)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Return array of matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Return array of matches including the full match (Perl / PHP style).&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Return array of global matches.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Return an array of arrays containing global matches including the full match (Perl / PHP style).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&#039;&#039;Flag = 0 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 2  || Bad pattern. @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 1 or 2 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.  Check @extended for next offset&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 3 or 4 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
The flag parameter can have one of 5 values (0 through 4).  0 gives a true (1) or false (0) as to whether the pattern was found or not.  1 and 2 find the first match and returns it in an array.  3 and 4 find multiple hits and fills the array with all the matching text.  2 and 4 include the full matching text as the first record, not just the capturing groups, which is all you get with flag 1 and 3.&lt;br /&gt;
&lt;br /&gt;
Regular expression notation is a compact way of specifying a pattern for strings that can be searched.  Regular expressions are character strings in which plain text characters indicate what text should exist in the target string, and a some characters are given special meanings to indicate what variability is allowed in the target string.  AutoIt regular expressions are normally case-sensitive.&lt;br /&gt;
&lt;br /&gt;
Regular expressions are constructed of one or more of the following simple regular expression specifiers.  If the character is not in the following table, then it will match only itself.&lt;br /&gt;
&lt;br /&gt;
Repeating characters (*, +, ?, {...} ) will try to match the largest set possible, which allows the following characters to match as well, unless followed immediately by a question mark; then it will find the smallest pattern that allows the following characters to match as well.&lt;br /&gt;
&lt;br /&gt;
Nested groups are allowed, but keep in mind that all the groups, except non-capturing groups, assign to the returned array, with the outer groups assigning after the inner groups.&lt;br /&gt;
&lt;br /&gt;
Complete description can be found &#039;&#039;&#039;[http://www.autoitscript.com/autoit3/pcrepattern.html here]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution&#039;&#039;&#039;: bad regular expressions can produce a quasi-infinite loop hogging the CPU, and can even cause a crash.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;Matching Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [ ... ] || Match any character in the set.  e.g. &#039;&#039;&#039;[aeiou]&#039;&#039;&#039; matches any lower-case vowel.  A contiguous set can be defined using a dash between the starting and ending characters.  e.g. &#039;&#039;&#039;[a-z]&#039;&#039;&#039; matches any lower case character.  To include a dash (&#039;&#039;&#039;-&#039;&#039;&#039;) in a set, use it as the first or last character of the set.  To include a closing bracket in a set, use it as the first character of the set.  e.g. &#039;&#039;&#039;[][]&#039;&#039;&#039; will match either [ or ].  Note that special characters &#039;&#039;&#039;do not&#039;&#039;&#039; retain their special meanings inside a set, with the exception of &#039;&#039;&#039;\\&#039;&#039;&#039;,  &#039;&#039;&#039;\^&#039;&#039;&#039;, &#039;&#039;&#039;\-&#039;&#039;&#039;,&#039;&#039;&#039;\[&#039;&#039;&#039; and &#039;&#039;&#039;\]&#039;&#039;&#039; match the escaped character inside a set.&lt;br /&gt;
|-&lt;br /&gt;
| [^ ... ] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the set.  e.g. &#039;&#039;&#039;[^0-9]&#039;&#039;&#039; matches any non-digit.  To include a caret (&#039;&#039;&#039;^&#039;&#039;&#039;) in a set, put it after the beginning of the set or escape it (\^).&lt;br /&gt;
|-&lt;br /&gt;
| [:class:] || Match a character in the given class of characters.  Valid classes are: alpha (any alphabetic character), alnum (any alphanumeric character), lower (any lower-case letter), upper (any upper-case letter), digit (any decimal digit 0-9), xdigit (any hexadecimal digit, 0-9, A-F, a-f), space (any whitespace character), blank (only a space or tab), print (any printable character), graph (any printable character except spaces), cntrl (any control character [ascii 127 or &amp;lt;32]) or punct (any punctuation character). So [0-9] is equivalent to &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;:digit:&amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| [^:class:] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the class, but only if the first character.&lt;br /&gt;
|-&lt;br /&gt;
| ( ... ) || Group. The elements in the group are treated in order and can be repeated together.  e.g. &#039;&#039;&#039;(ab)+&#039;&#039;&#039; will match &amp;quot;ab&amp;quot; or &amp;quot;abab&amp;quot;, but not &amp;quot;aba&amp;quot;.  A group will also store the text matched for use in back-references and in the array returned by the function, depending on flag value.&lt;br /&gt;
|-&lt;br /&gt;
| (?#....) || comment (not nestable).&lt;br /&gt;
|-&lt;br /&gt;
| (?i) || Case-insensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-insensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i) || (default) Case-sensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-sensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?: ... ) || Non-capturing group.  Behaves just like a normal group, but does not record the matching characters in the array nor can the matched text be used for back-referencing.&lt;br /&gt;
|-&lt;br /&gt;
| (?i: ... ) || Case-insensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-insensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i: ... ) || Case-sensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-sensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?J) || allow duplicate names.&lt;br /&gt;
|-&lt;br /&gt;
| (?m) || ^ and $ match newlines within data.&lt;br /&gt;
|-&lt;br /&gt;
| (?s) || . matches anything including newline. (by default &amp;quot;.&amp;quot; don&#039;t match newline)&lt;br /&gt;
|-&lt;br /&gt;
| (?U) || Invert greediness of quantifiers.&lt;br /&gt;
|-&lt;br /&gt;
| (?x) || Ignore whitespace and # comments.&lt;br /&gt;
|-&lt;br /&gt;
| (?-...) || unset option(s).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;.&#039;&#039;&#039; || Match any single character (except newline).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; || Or.  The expression on one side &#039;&#039;&#039;or&#039;&#039;&#039; the other can be matched.&lt;br /&gt;
|-&lt;br /&gt;
| \ || &#039;&#039;Escape&#039;&#039; a special character (have it match the actual character) or introduce a special character type (see below).&lt;br /&gt;
|-&lt;br /&gt;
| \\ || Match an actual backslash (\).&lt;br /&gt;
|-&lt;br /&gt;
| \a || Alarm, that is, the BEL character ([[Chr]](7)).&lt;br /&gt;
|-&lt;br /&gt;
| \A || Match only at beginning of string.&lt;br /&gt;
|-&lt;br /&gt;
| \b || Matches at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \B || Matches when not at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \c || Match a control character, based on the next character.  For example, &#039;&#039;&#039;\cM&#039;&#039;&#039; matches ctrl-M.&lt;br /&gt;
|-&lt;br /&gt;
| \d || Match any digit (0-9).&lt;br /&gt;
|-&lt;br /&gt;
| \D || Match any non-digit.&lt;br /&gt;
|-&lt;br /&gt;
| \e || Match an escape character ([[Chr]](27)).&lt;br /&gt;
|-&lt;br /&gt;
| \E || end case modification.&lt;br /&gt;
|-&lt;br /&gt;
| \f || Match an formfeed character ([[Chr]](12)).&lt;br /&gt;
|-&lt;br /&gt;
| \G || first matching position in subject.&lt;br /&gt;
|-&lt;br /&gt;
| \h || any horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \H || any character that is not a horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \n || Match a linefeed (@LF, [[Chr]](10)).&lt;br /&gt;
|-&lt;br /&gt;
| \K || reset start of match.&lt;br /&gt;
|-&lt;br /&gt;
| \N || a character that is not a newline&lt;br /&gt;
|-&lt;br /&gt;
| \Q || quote (disable) pattern metacharacters till \E.&lt;br /&gt;
|-&lt;br /&gt;
| \r || Match a carriage return (@CR, [[Chr]](13)).&lt;br /&gt;
|-&lt;br /&gt;
| \R || a newline sequence.&lt;br /&gt;
|-&lt;br /&gt;
| \s || Match any whitespace character: [[Chr]](9) through [[Chr]](13) which are Horizontal Tab, Line Feed, Vertical Tab, Form Feed, and Carriage Return, and the standard space ( [[Chr]](32) ).&lt;br /&gt;
|-&lt;br /&gt;
| \S || Match any non-whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \t || Match a tab character ([[Chr]](9)).&lt;br /&gt;
|-&lt;br /&gt;
| \v || any vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \V || any character that is not a vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \w || Match any &amp;quot;word&amp;quot; character: a-z, A-Z, 0-9 or underscore (_).&lt;br /&gt;
|-&lt;br /&gt;
| \W || Match any non-word character.&lt;br /&gt;
|-&lt;br /&gt;
| \X || A Unicode extended grapheme cluster, that is an unbreakable sequence of codepoints which represent a single character for the user.&lt;br /&gt;
|-&lt;br /&gt;
| \ddd || Match character with octal code ddd, or backreference if found. Match the prior group number given exactly. For example, &#039;&#039;&#039;([:alpha:])\1&#039;&#039;&#039; would match a double letter.&lt;br /&gt;
|-&lt;br /&gt;
| \xhh || character with hex code hh.&lt;br /&gt;
|-&lt;br /&gt;
| \x{hhh..} || Match character with hex code hhh..&lt;br /&gt;
|-&lt;br /&gt;
| \z || Match only at end of string.&lt;br /&gt;
|-&lt;br /&gt;
| \Z || Match only at end of string, or before newline at the end.&lt;br /&gt;
|-&lt;br /&gt;
| (?= ... ) || Positive look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;= ... ) || Positive look behind.&lt;br /&gt;
|-&lt;br /&gt;
| (?! ... ) || Negative look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;! ... ) || Negative look behind.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Repeating Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group exactly &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;,} || Repeat the previous character, set or group at least &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {0,&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group at most &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;} || Repeat the previous character, set or group between &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; times, inclusive.&lt;br /&gt;
|-&lt;br /&gt;
| * || Repeat the previous character, set or group 0 or more times.  Equivalent to {0,}&lt;br /&gt;
|-&lt;br /&gt;
| + || Repeat the previous character, set or group 1 or more times.  Equivalent to {1,}&lt;br /&gt;
|-&lt;br /&gt;
| ? || The previous character, set or group may or may not appear.  Equivalent to {0, 1}&lt;br /&gt;
|-&lt;br /&gt;
| ? (after a repeating character) || Find the smallest match instead of the largest.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Character Classes&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [:alnum:] || letters and digits (same as [0-9A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:alpha:] || letters (same as [A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:ascii:] || character codes (same as [[Chr]](0) ... [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:blank:] || space or tab only (same as [[Chr]](9) and [[Chr]](32))&lt;br /&gt;
|-&lt;br /&gt;
| [:cntrl:] || control characters (same as [[Chr]](0) ... [[Chr]](31) and [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:digit:] || decimal digits (same as \d or [0-9])&lt;br /&gt;
|-&lt;br /&gt;
| [:graph:] || printing characters, excluding space (same as [[Chr]](33) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:lower:] || lower case letters (same as [a-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:print:] || printing characters, including space (same as [[Chr]](32) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:punct:] || printing characters, excluding [:alnum:] and [:cntrl:], (33-47, 58-64, 91-96, 123-126)&lt;br /&gt;
|-&lt;br /&gt;
| [:space:] || white space (not quite the same as \s, it includes VT: [[Chr]](11)) (same as [\f\n\r\t\v ])&lt;br /&gt;
|-&lt;br /&gt;
| [:upper:] || upper case letters (same as [A-Z])&lt;br /&gt;
|-&lt;br /&gt;
| [:word:] || &amp;quot;word&amp;quot; characters (same as \w)&lt;br /&gt;
|-&lt;br /&gt;
| [:xdigit:] || hexadecimal digits (same as [0-9A-Fa-f])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;General comments about UTF-8 mode&#039;&#039;&#039;&amp;lt;/u&amp;gt; (use internaly by AutoIt to translate pattern) :&lt;br /&gt;
&lt;br /&gt;
	1. An unbraced hexadecimal escape sequence (such as \xb3) matches a two-byte UTF-8 character if the value is greater than 127.&lt;br /&gt;
&lt;br /&gt;
	2. Octal numbers up to \777 are recognized, and match two-byte UTF-8 characters for values greater than \177.&lt;br /&gt;
&lt;br /&gt;
	3. Repeat quantifiers apply to complete UTF-8 characters, not to individual bytes, for example: \x{100}{3}.&lt;br /&gt;
&lt;br /&gt;
	4. The dot metacharacter matches one UTF-8 character instead of a single byte.&lt;br /&gt;
&lt;br /&gt;
	5. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly test characters of any code value, but the characters that PCRE recognizes as digits, spaces, or word characters remain the same set as before, all with values less than 256. Note that this also applies to \b, because it is defined in terms of \w and \W.&lt;br /&gt;
&lt;br /&gt;
	6. Similarly, characters that match the POSIX named character classes are all low-valued characters.&lt;br /&gt;
&lt;br /&gt;
	7. However, the Perl 5.10 horizontal and vertical whitespace matching escapes (\h, \H, \v, and \V) do match all the appropriate Unicode characters.&lt;br /&gt;
&lt;br /&gt;
	8. Case-insensitive matching applies only to characters whose values are less than 128. PCRE supports case-insensitive matching only when there is a one-to-one mapping between a letter&#039;s cases. There are a small number of many-to-one mappings in Unicode; these are not supported by PCRE.&lt;br /&gt;
&lt;br /&gt;
See also the [../tutorials/regexp/regexp.htm Regular Expression] tutorial, in which you can run a script to test your regular expression(s).&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
[[StringInStr]], [[StringRegExpReplace]]&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Option 1, using offset&lt;br /&gt;
Local $nOffset = 1&lt;br /&gt;
&lt;br /&gt;
Local $aArray&lt;br /&gt;
While 1&lt;br /&gt;
	$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 1, $nOffset)&lt;br /&gt;
&lt;br /&gt;
	If @error = 0 Then&lt;br /&gt;
		$nOffset = @extended&lt;br /&gt;
	Else&lt;br /&gt;
		ExitLoop&lt;br /&gt;
	EndIf&lt;br /&gt;
	For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 1 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
	Next&lt;br /&gt;
WEnd&lt;br /&gt;
&lt;br /&gt;
; Option 2, single return, php/preg_match() style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 2)&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 2 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 3, global return, old AutoIt style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 3)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 3 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 4, global return, php/preg_match_all() style&lt;br /&gt;
$aArray = StringRegExp(&#039;F1oF2oF3o&#039;, &#039;(F.o)*?&#039;, 4)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
&lt;br /&gt;
	Local $match = $aArray[$i]&lt;br /&gt;
	For $j = 0 To UBound($match) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 4 - &amp;quot; &amp;amp; $i &amp;amp; &#039;,&#039; &amp;amp; $j, $match[$j])&lt;br /&gt;
	Next&lt;br /&gt;
Next&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11885</id>
		<title>StringRegExp</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11885"/>
		<updated>2013-08-19T17:31:01Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Description&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;&lt;br /&gt;
Check if a string fits a given regular expression pattern.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
:StringRegExp ( &amp;quot;test&amp;quot;, &amp;quot;pattern&amp;quot; [, flag = 0 [, offset = 1]] )&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| test || The string to check&lt;br /&gt;
|-&lt;br /&gt;
| pattern || The regular expression to compare.&lt;br /&gt;
|-&lt;br /&gt;
| flag || &#039;&#039;&#039;[optional]&#039;&#039;&#039; A number to indicate how the function behaves.  See below for details.  The default is 0.&lt;br /&gt;
|-&lt;br /&gt;
| offset || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The string position to start the match (starts at 1)  The default is 1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Flag&#039;&#039;&#039; || &#039;&#039;&#039;Values&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Returns 1 (matched) or 0 (no match)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Return array of matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Return array of matches including the full match (Perl / PHP style).&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Return array of global matches.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Return an array of arrays containing global matches including the full match (Perl / PHP style).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&#039;&#039;Flag = 0 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 2  || Bad pattern. @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 1 or 2 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.  Check @extended for next offset&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 3 or 4 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
The flag parameter can have one of 5 values (0 through 4).  0 gives a true (1) or false (0) as to whether the pattern was found or not.  1 and 2 find the first match and returns it in an array.  3 and 4 find multiple hits and fills the array with all the matching text.  2 and 4 include the full matching text as the first record, not just the capturing groups, which is all you get with flag 1 and 3.&lt;br /&gt;
&lt;br /&gt;
Regular expression notation is a compact way of specifying a pattern for strings that can be searched.  Regular expressions are character strings in which plain text characters indicate what text should exist in the target string, and a some characters are given special meanings to indicate what variability is allowed in the target string.  AutoIt regular expressions are normally case-sensitive.&lt;br /&gt;
&lt;br /&gt;
Regular expressions are constructed of one or more of the following simple regular expression specifiers.  If the character is not in the following table, then it will match only itself.&lt;br /&gt;
&lt;br /&gt;
Repeating characters (*, +, ?, {...} ) will try to match the largest set possible, which allows the following characters to match as well, unless followed immediately by a question mark; then it will find the smallest pattern that allows the following characters to match as well.&lt;br /&gt;
&lt;br /&gt;
Nested groups are allowed, but keep in mind that all the groups, except non-capturing groups, assign to the returned array, with the outer groups assigning after the inner groups.&lt;br /&gt;
&lt;br /&gt;
Complete description can be found &#039;&#039;&#039;[http://www.autoitscript.com/autoit3/pcrepattern.html here]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution&#039;&#039;&#039;: bad regular expressions can produce a quasi-infinite loop hogging the CPU, and can even cause a crash.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;Matching Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [ ... ] || Match any character in the set.  e.g. &#039;&#039;&#039;[aeiou]&#039;&#039;&#039; matches any lower-case vowel.  A contiguous set can be defined using a dash between the starting and ending characters.  e.g. &#039;&#039;&#039;[a-z]&#039;&#039;&#039; matches any lower case character.  To include a dash (&#039;&#039;&#039;-&#039;&#039;&#039;) in a set, use it as the first or last character of the set.  To include a closing bracket in a set, use it as the first character of the set.  e.g. &#039;&#039;&#039;[][]&#039;&#039;&#039; will match either [ or ].  Note that special characters &#039;&#039;&#039;do not&#039;&#039;&#039; retain their special meanings inside a set, with the exception of &#039;&#039;&#039;\\&#039;&#039;&#039;,  &#039;&#039;&#039;\^&#039;&#039;&#039;, &#039;&#039;&#039;\-&#039;&#039;&#039;,&#039;&#039;&#039;\[&#039;&#039;&#039; and &#039;&#039;&#039;\]&#039;&#039;&#039; match the escaped character inside a set.&lt;br /&gt;
|-&lt;br /&gt;
| [^ ... ] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the set.  e.g. &#039;&#039;&#039;[^0-9]&#039;&#039;&#039; matches any non-digit.  To include a caret (&#039;&#039;&#039;^&#039;&#039;&#039;) in a set, put it after the beginning of the set or escape it (\^).&lt;br /&gt;
|-&lt;br /&gt;
| [:class:] || Match a character in the given class of characters.  Valid classes are: alpha (any alphabetic character), alnum (any alphanumeric character), lower (any lower-case letter), upper (any upper-case letter), digit (any decimal digit 0-9), xdigit (any hexadecimal digit, 0-9, A-F, a-f), space (any whitespace character), blank (only a space or tab), print (any printable character), graph (any printable character except spaces), cntrl (any control character [ascii 127 or &amp;lt;32]) or punct (any punctuation character). So [0-9] is equivalent to &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;:digit:&amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| [^:class:] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the class, but only if the first character.&lt;br /&gt;
|-&lt;br /&gt;
| ( ... ) || Group. The elements in the group are treated in order and can be repeated together.  e.g. &#039;&#039;&#039;(ab)+&#039;&#039;&#039; will match &amp;quot;ab&amp;quot; or &amp;quot;abab&amp;quot;, but not &amp;quot;aba&amp;quot;.  A group will also store the text matched for use in back-references and in the array returned by the function, depending on flag value.&lt;br /&gt;
|-&lt;br /&gt;
| (?#....) || comment (not nestable).&lt;br /&gt;
|-&lt;br /&gt;
| (?i) || Case-insensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-insensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i) || (default) Case-sensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-sensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?: ... ) || Non-capturing group.  Behaves just like a normal group, but does not record the matching characters in the array nor can the matched text be used for back-referencing.&lt;br /&gt;
|-&lt;br /&gt;
| (?i: ... ) || Case-insensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-insensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i: ... ) || Case-sensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-sensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?J) || allow duplicate names.&lt;br /&gt;
|-&lt;br /&gt;
| (?m) || ^ and $ match newlines within data.&lt;br /&gt;
|-&lt;br /&gt;
| (?s) || . matches anything including newline. (by default &amp;quot;.&amp;quot; don&#039;t match newline)&lt;br /&gt;
|-&lt;br /&gt;
| (?U) || Invert greediness of quantifiers.&lt;br /&gt;
|-&lt;br /&gt;
| (?x) || Ignore whitespace and # comments.&lt;br /&gt;
|-&lt;br /&gt;
| (?-...) || unset option(s).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;.&#039;&#039;&#039; || Match any single character (except newline).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; || Or.  The expression on one side &#039;&#039;&#039;or&#039;&#039;&#039; the other can be matched.&lt;br /&gt;
|-&lt;br /&gt;
| \ || &#039;&#039;Escape&#039;&#039; a special character (have it match the actual character) or introduce a special character type (see below).&lt;br /&gt;
|-&lt;br /&gt;
| \\ || Match an actual backslash (\).&lt;br /&gt;
|-&lt;br /&gt;
| \a || Alarm, that is, the BEL character ([[Chr]](7)).&lt;br /&gt;
|-&lt;br /&gt;
| \A || Match only at beginning of string.&lt;br /&gt;
|-&lt;br /&gt;
| \b || Matches at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \B || Matches when not at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \c || Match a control character, based on the next character.  For example, &#039;&#039;&#039;\cM&#039;&#039;&#039; matches ctrl-M.&lt;br /&gt;
|-&lt;br /&gt;
| \d || Match any digit (0-9).&lt;br /&gt;
|-&lt;br /&gt;
| \D || Match any non-digit.&lt;br /&gt;
|-&lt;br /&gt;
| \e || Match an escape character ([[Chr]](27)).&lt;br /&gt;
|-&lt;br /&gt;
| \E || end case modification.&lt;br /&gt;
|-&lt;br /&gt;
| \f || Match an formfeed character ([[Chr]](12)).&lt;br /&gt;
|-&lt;br /&gt;
| \G || first matching position in subject.&lt;br /&gt;
|-&lt;br /&gt;
| \h || any horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \H || any character that is not a horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \n || Match a linefeed (@LF, [[Chr]](10)).&lt;br /&gt;
|-&lt;br /&gt;
| \K || reset start of match.&lt;br /&gt;
|-&lt;br /&gt;
| \N || a character that is not a newline&lt;br /&gt;
|-&lt;br /&gt;
| \Q || quote (disable) pattern metacharacters till \E.&lt;br /&gt;
|-&lt;br /&gt;
| \r || Match a carriage return (@CR, [[Chr]](13)).&lt;br /&gt;
|-&lt;br /&gt;
| \R || a newline sequence.&lt;br /&gt;
|-&lt;br /&gt;
| \s || Match any whitespace character: [[Chr]](9) through [[Chr]](13) which are Horizontal Tab, Line Feed, Vertical Tab, Form Feed, and Carriage Return, and the standard space ( [[Chr]](32) ).&lt;br /&gt;
|-&lt;br /&gt;
| \S || Match any non-whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \t || Match a tab character ([[Chr]](9)).&lt;br /&gt;
|-&lt;br /&gt;
| \v || any vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \V || any character that is not a vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \w || Match any &amp;quot;word&amp;quot; character: a-z, A-Z, 0-9 or underscore (_).&lt;br /&gt;
|-&lt;br /&gt;
| \W || Match any non-word character.&lt;br /&gt;
|-&lt;br /&gt;
| \X || A Unicode extended grapheme cluster, that is an unbreakable sequence of codepoints which represent a single character for the user.&lt;br /&gt;
|-&lt;br /&gt;
| \ddd || Match character with octal code ddd, or backreference if found. Match the prior group number given exactly. For example, &#039;&#039;&#039;([:alpha:])\1&#039;&#039;&#039; would match a double letter.&lt;br /&gt;
|-&lt;br /&gt;
| \xhh || character with hex code hh.&lt;br /&gt;
|-&lt;br /&gt;
| \x{hhh..} || Match character with hex code hhh..&lt;br /&gt;
|-&lt;br /&gt;
| \z || Match only at end of string.&lt;br /&gt;
|-&lt;br /&gt;
| \Z || Match only at end of string, or before newline at the end.&lt;br /&gt;
|-&lt;br /&gt;
| (?= ... ) || Positive look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;= ... ) || Positive look behind.&lt;br /&gt;
|-&lt;br /&gt;
| (?! ... ) || Negative look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;! ... ) || Negative look behind.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Repeating Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group exactly &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;,} || Repeat the previous character, set or group at least &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {0,&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group at most &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;} || Repeat the previous character, set or group between &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; times, inclusive.&lt;br /&gt;
|-&lt;br /&gt;
| * || Repeat the previous character, set or group 0 or more times.  Equivalent to {0,}&lt;br /&gt;
|-&lt;br /&gt;
| + || Repeat the previous character, set or group 1 or more times.  Equivalent to {1,}&lt;br /&gt;
|-&lt;br /&gt;
| ? || The previous character, set or group may or may not appear.  Equivalent to {0, 1}&lt;br /&gt;
|-&lt;br /&gt;
| ? (after a repeating character) || Find the smallest match instead of the largest.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Character Classes&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [:alnum:] || letters and digits (same as [0-9A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:alpha:] || letters (same as [A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:ascii:] || character codes (same as [[Chr]](0) ... [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:blank:] || space or tab only (same as [[Chr]](9) and [[Chr]](32))&lt;br /&gt;
|-&lt;br /&gt;
| [:cntrl:] || control characters (same as [[Chr]](0) ... [[Chr]](31) and [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:digit:] || decimal digits (same as \d or [0-9])&lt;br /&gt;
|-&lt;br /&gt;
| [:graph:] || printing characters, excluding space (same as [[Chr]](33) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:lower:] || lower case letters (same as [a-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:print:] || printing characters, including space (same as [[Chr]](32) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:punct:] || printing characters, excluding [:alnum:] and [:cntrl:], (33-47, 58-64, 91-96, 123-126)&lt;br /&gt;
|-&lt;br /&gt;
| [:space:] || white space (not quite the same as \s, it includes VT: [[Chr]](11)) (same as [\f\n\r\t\v ])&lt;br /&gt;
|-&lt;br /&gt;
| [:upper:] || upper case letters (same as [A-Z])&lt;br /&gt;
|-&lt;br /&gt;
| [:word:] || &amp;quot;word&amp;quot; characters (same as \w)&lt;br /&gt;
|-&lt;br /&gt;
| [:xdigit:] || hexadecimal digits (same as [0-9A-Fa-f])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;General comments about UTF-8 mode&#039;&#039;&#039;&amp;lt;/u&amp;gt; (use internaly by AutoIt to translate pattern) :&lt;br /&gt;
&lt;br /&gt;
	1. An unbraced hexadecimal escape sequence (such as \xb3) matches a two-byte UTF-8 character if the value is greater than 127.&lt;br /&gt;
&lt;br /&gt;
	2. Octal numbers up to \777 are recognized, and match two-byte UTF-8 characters for values greater than \177.&lt;br /&gt;
&lt;br /&gt;
	3. Repeat quantifiers apply to complete UTF-8 characters, not to individual bytes, for example: \x{100}{3}.&lt;br /&gt;
&lt;br /&gt;
	4. The dot metacharacter matches one UTF-8 character instead of a single byte.&lt;br /&gt;
&lt;br /&gt;
	5. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly test characters of any code value, but the characters that PCRE recognizes as digits, spaces, or word characters remain the same set as before, all with values less than 256. Note that this also applies to \b, because it is defined in terms of \w and \W.&lt;br /&gt;
&lt;br /&gt;
	6. Similarly, characters that match the POSIX named character classes are all low-valued characters.&lt;br /&gt;
&lt;br /&gt;
	7. However, the Perl 5.10 horizontal and vertical whitespace matching escapes (\h, \H, \v, and \V) do match all the appropriate Unicode characters.&lt;br /&gt;
&lt;br /&gt;
	8. Case-insensitive matching applies only to characters whose values are less than 128. PCRE supports case-insensitive matching only when there is a one-to-one mapping between a letter&#039;s cases. There are a small number of many-to-one mappings in Unicode; these are not supported by PCRE.&lt;br /&gt;
&lt;br /&gt;
See also the [../tutorials/regexp/regexp.htm Regular Expression] tutorial, in which you can run a script to test your regular expression(s).&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
[[StringInStr]], [[StringRegExpReplace]]&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Option 1, using offset&lt;br /&gt;
Local $nOffset = 1&lt;br /&gt;
&lt;br /&gt;
Local $aArray&lt;br /&gt;
While 1&lt;br /&gt;
	$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 1, $nOffset)&lt;br /&gt;
&lt;br /&gt;
	If @error = 0 Then&lt;br /&gt;
		$nOffset = @extended&lt;br /&gt;
	Else&lt;br /&gt;
		ExitLoop&lt;br /&gt;
	EndIf&lt;br /&gt;
	For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 1 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
	Next&lt;br /&gt;
WEnd&lt;br /&gt;
&lt;br /&gt;
; Option 2, single return, php/preg_match() style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 2)&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 2 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 3, global return, old AutoIt style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 3)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 3 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 4, global return, php/preg_match_all() style&lt;br /&gt;
$aArray = StringRegExp(&#039;F1oF2oF3o&#039;, &#039;(F.o)*?&#039;, 4)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
&lt;br /&gt;
	Local $match = $aArray[$i]&lt;br /&gt;
	For $j = 0 To UBound($match) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 4 - &amp;quot; &amp;amp; $i &amp;amp; &#039;,&#039; &amp;amp; $j, $match[$j])&lt;br /&gt;
	Next&lt;br /&gt;
Next&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11884</id>
		<title>StringRegExp</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11884"/>
		<updated>2013-08-19T17:27:40Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font face=&#039;Segoe UI, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Autogenerated Wiki Page. See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Description&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;&lt;br /&gt;
Check if a string fits a given regular expression pattern.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
:StringRegExp ( &amp;quot;test&amp;quot;, &amp;quot;pattern&amp;quot; [, flag = 0 [, offset = 1]] )&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| test || The string to check&lt;br /&gt;
|-&lt;br /&gt;
| pattern || The regular expression to compare.&lt;br /&gt;
|-&lt;br /&gt;
| flag || &#039;&#039;&#039;[optional]&#039;&#039;&#039; A number to indicate how the function behaves.  See below for details.  The default is 0.&lt;br /&gt;
|-&lt;br /&gt;
| offset || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The string position to start the match (starts at 1)  The default is 1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Flag&#039;&#039;&#039; || &#039;&#039;&#039;Values&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Returns 1 (matched) or 0 (no match)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Return array of matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Return array of matches including the full match (Perl / PHP style).&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Return array of global matches.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Return an array of arrays containing global matches including the full match (Perl / PHP style).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&#039;&#039;Flag = 0 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 2  || Bad pattern. @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 1 or 2 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.  Check @extended for next offset&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 3 or 4 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
The flag parameter can have one of 5 values (0 through 4).  0 gives a true (1) or false (0) as to whether the pattern was found or not.  1 and 2 find the first match and returns it in an array.  3 and 4 find multiple hits and fills the array with all the matching text.  2 and 4 include the full matching text as the first record, not just the capturing groups, which is all you get with flag 1 and 3.&lt;br /&gt;
&lt;br /&gt;
Regular expression notation is a compact way of specifying a pattern for strings that can be searched.  Regular expressions are character strings in which plain text characters indicate what text should exist in the target string, and a some characters are given special meanings to indicate what variability is allowed in the target string.  AutoIt regular expressions are normally case-sensitive.&lt;br /&gt;
&lt;br /&gt;
Regular expressions are constructed of one or more of the following simple regular expression specifiers.  If the character is not in the following table, then it will match only itself.&lt;br /&gt;
&lt;br /&gt;
Repeating characters (*, +, ?, {...} ) will try to match the largest set possible, which allows the following characters to match as well, unless followed immediately by a question mark; then it will find the smallest pattern that allows the following characters to match as well.&lt;br /&gt;
&lt;br /&gt;
Nested groups are allowed, but keep in mind that all the groups, except non-capturing groups, assign to the returned array, with the outer groups assigning after the inner groups.&lt;br /&gt;
&lt;br /&gt;
Complete description can be found &#039;&#039;&#039;[http://www.autoitscript.com/autoit3/pcrepattern.html here]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution&#039;&#039;&#039;: bad regular expressions can produce a quasi-infinite loop hogging the CPU, and can even cause a crash.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;Matching Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [ ... ] || Match any character in the set.  e.g. &#039;&#039;&#039;[aeiou]&#039;&#039;&#039; matches any lower-case vowel.  A contiguous set can be defined using a dash between the starting and ending characters.  e.g. &#039;&#039;&#039;[a-z]&#039;&#039;&#039; matches any lower case character.  To include a dash (&#039;&#039;&#039;-&#039;&#039;&#039;) in a set, use it as the first or last character of the set.  To include a closing bracket in a set, use it as the first character of the set.  e.g. &#039;&#039;&#039;[][]&#039;&#039;&#039; will match either [ or ].  Note that special characters &#039;&#039;&#039;do not&#039;&#039;&#039; retain their special meanings inside a set, with the exception of &#039;&#039;&#039;\\&#039;&#039;&#039;,  &#039;&#039;&#039;\^&#039;&#039;&#039;, &#039;&#039;&#039;\-&#039;&#039;&#039;,&#039;&#039;&#039;\[&#039;&#039;&#039; and &#039;&#039;&#039;\]&#039;&#039;&#039; match the escaped character inside a set.&lt;br /&gt;
|-&lt;br /&gt;
| [^ ... ] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the set.  e.g. &#039;&#039;&#039;[^0-9]&#039;&#039;&#039; matches any non-digit.  To include a caret (&#039;&#039;&#039;^&#039;&#039;&#039;) in a set, put it after the beginning of the set or escape it (\^).&lt;br /&gt;
|-&lt;br /&gt;
| [:class:] || Match a character in the given class of characters.  Valid classes are: alpha (any alphabetic character), alnum (any alphanumeric character), lower (any lower-case letter), upper (any upper-case letter), digit (any decimal digit 0-9), xdigit (any hexadecimal digit, 0-9, A-F, a-f), space (any whitespace character), blank (only a space or tab), print (any printable character), graph (any printable character except spaces), cntrl (any control character [ascii 127 or &amp;lt;32]) or punct (any punctuation character). So [0-9] is equivalent to &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;:digit:&amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| [^:class:] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the class, but only if the first character.&lt;br /&gt;
|-&lt;br /&gt;
| ( ... ) || Group. The elements in the group are treated in order and can be repeated together.  e.g. &#039;&#039;&#039;(ab)+&#039;&#039;&#039; will match &amp;quot;ab&amp;quot; or &amp;quot;abab&amp;quot;, but not &amp;quot;aba&amp;quot;.  A group will also store the text matched for use in back-references and in the array returned by the function, depending on flag value.&lt;br /&gt;
|-&lt;br /&gt;
| (?#....) || comment (not nestable).&lt;br /&gt;
|-&lt;br /&gt;
| (?i) || Case-insensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-insensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i) || (default) Case-sensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-sensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?: ... ) || Non-capturing group.  Behaves just like a normal group, but does not record the matching characters in the array nor can the matched text be used for back-referencing.&lt;br /&gt;
|-&lt;br /&gt;
| (?i: ... ) || Case-insensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-insensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i: ... ) || Case-sensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-sensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?J) || allow duplicate names.&lt;br /&gt;
|-&lt;br /&gt;
| (?m) || ^ and $ match newlines within data.&lt;br /&gt;
|-&lt;br /&gt;
| (?s) || . matches anything including newline. (by default &amp;quot;.&amp;quot; don&#039;t match newline)&lt;br /&gt;
|-&lt;br /&gt;
| (?U) || Invert greediness of quantifiers.&lt;br /&gt;
|-&lt;br /&gt;
| (?x) || Ignore whitespace and # comments.&lt;br /&gt;
|-&lt;br /&gt;
| (?-...) || unset option(s).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;.&#039;&#039;&#039; || Match any single character (except newline).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; || Or.  The expression on one side &#039;&#039;&#039;or&#039;&#039;&#039; the other can be matched.&lt;br /&gt;
|-&lt;br /&gt;
| \ || &#039;&#039;Escape&#039;&#039; a special character (have it match the actual character) or introduce a special character type (see below).&lt;br /&gt;
|-&lt;br /&gt;
| \\ || Match an actual backslash (\).&lt;br /&gt;
|-&lt;br /&gt;
| \a || Alarm, that is, the BEL character ([[Chr]](7)).&lt;br /&gt;
|-&lt;br /&gt;
| \A || Match only at beginning of string.&lt;br /&gt;
|-&lt;br /&gt;
| \b || Matches at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \B || Matches when not at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \c || Match a control character, based on the next character.  For example, &#039;&#039;&#039;\cM&#039;&#039;&#039; matches ctrl-M.&lt;br /&gt;
|-&lt;br /&gt;
| \d || Match any digit (0-9).&lt;br /&gt;
|-&lt;br /&gt;
| \D || Match any non-digit.&lt;br /&gt;
|-&lt;br /&gt;
| \e || Match an escape character ([[Chr]](27)).&lt;br /&gt;
|-&lt;br /&gt;
| \E || end case modification.&lt;br /&gt;
|-&lt;br /&gt;
| \f || Match an formfeed character ([[Chr]](12)).&lt;br /&gt;
|-&lt;br /&gt;
| \G || first matching position in subject.&lt;br /&gt;
|-&lt;br /&gt;
| \h || any horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \H || any character that is not a horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \n || Match a linefeed (@LF, [[Chr]](10)).&lt;br /&gt;
|-&lt;br /&gt;
| \K || reset start of match.&lt;br /&gt;
|-&lt;br /&gt;
| \N || a character that is not a newline&lt;br /&gt;
|-&lt;br /&gt;
| \Q || quote (disable) pattern metacharacters till \E.&lt;br /&gt;
|-&lt;br /&gt;
| \r || Match a carriage return (@CR, [[Chr]](13)).&lt;br /&gt;
|-&lt;br /&gt;
| \R || a newline sequence.&lt;br /&gt;
|-&lt;br /&gt;
| \s || Match any whitespace character: [[Chr]](9) through [[Chr]](13) which are Horizontal Tab, Line Feed, Vertical Tab, Form Feed, and Carriage Return, and the standard space ( [[Chr]](32) ).&lt;br /&gt;
|-&lt;br /&gt;
| \S || Match any non-whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \t || Match a tab character ([[Chr]](9)).&lt;br /&gt;
|-&lt;br /&gt;
| \v || any vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \V || any character that is not a vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \w || Match any &amp;quot;word&amp;quot; character: a-z, A-Z, 0-9 or underscore (_).&lt;br /&gt;
|-&lt;br /&gt;
| \W || Match any non-word character.&lt;br /&gt;
|-&lt;br /&gt;
| \X || A Unicode extended grapheme cluster, that is an unbreakable sequence of codepoints which represent a single character for the user.&lt;br /&gt;
|-&lt;br /&gt;
| \ddd || Match character with octal code ddd, or backreference if found. Match the prior group number given exactly. For example, &#039;&#039;&#039;([:alpha:])\1&#039;&#039;&#039; would match a double letter.&lt;br /&gt;
|-&lt;br /&gt;
| \xhh || character with hex code hh.&lt;br /&gt;
|-&lt;br /&gt;
| \x{hhh..} || Match character with hex code hhh..&lt;br /&gt;
|-&lt;br /&gt;
| \z || Match only at end of string.&lt;br /&gt;
|-&lt;br /&gt;
| \Z || Match only at end of string, or before newline at the end.&lt;br /&gt;
|-&lt;br /&gt;
| (?= ... ) || Positive look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;= ... ) || Positive look behind.&lt;br /&gt;
|-&lt;br /&gt;
| (?! ... ) || Negative look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;! ... ) || Negative look behind.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Repeating Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group exactly &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;,} || Repeat the previous character, set or group at least &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {0,&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group at most &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;} || Repeat the previous character, set or group between &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; times, inclusive.&lt;br /&gt;
|-&lt;br /&gt;
| * || Repeat the previous character, set or group 0 or more times.  Equivalent to {0,}&lt;br /&gt;
|-&lt;br /&gt;
| + || Repeat the previous character, set or group 1 or more times.  Equivalent to {1,}&lt;br /&gt;
|-&lt;br /&gt;
| ? || The previous character, set or group may or may not appear.  Equivalent to {0, 1}&lt;br /&gt;
|-&lt;br /&gt;
| ? (after a repeating character) || Find the smallest match instead of the largest.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Character Classes&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [:alnum:] || letters and digits (same as [0-9A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:alpha:] || letters (same as [A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:ascii:] || character codes (same as [[Chr]](0) ... [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:blank:] || space or tab only (same as [[Chr]](9) and [[Chr]](32))&lt;br /&gt;
|-&lt;br /&gt;
| [:cntrl:] || control characters (same as [[Chr]](0) ... [[Chr]](31) and [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:digit:] || decimal digits (same as \d or [0-9])&lt;br /&gt;
|-&lt;br /&gt;
| [:graph:] || printing characters, excluding space (same as [[Chr]](33) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:lower:] || lower case letters (same as [a-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:print:] || printing characters, including space (same as [[Chr]](32) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:punct:] || printing characters, excluding [:alnum:] and [:cntrl:], (33-47, 58-64, 91-96, 123-126)&lt;br /&gt;
|-&lt;br /&gt;
| [:space:] || white space (not quite the same as \s, it includes VT: [[Chr]](11)) (same as [\f\n\r\t\v ])&lt;br /&gt;
|-&lt;br /&gt;
| [:upper:] || upper case letters (same as [A-Z])&lt;br /&gt;
|-&lt;br /&gt;
| [:word:] || &amp;quot;word&amp;quot; characters (same as \w)&lt;br /&gt;
|-&lt;br /&gt;
| [:xdigit:] || hexadecimal digits (same as [0-9A-Fa-f])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;General comments about UTF-8 mode&#039;&#039;&#039;&amp;lt;/u&amp;gt; (use internaly by AutoIt to translate pattern) :&lt;br /&gt;
&lt;br /&gt;
	1. An unbraced hexadecimal escape sequence (such as \xb3) matches a two-byte UTF-8 character if the value is greater than 127.&lt;br /&gt;
&lt;br /&gt;
	2. Octal numbers up to \777 are recognized, and match two-byte UTF-8 characters for values greater than \177.&lt;br /&gt;
&lt;br /&gt;
	3. Repeat quantifiers apply to complete UTF-8 characters, not to individual bytes, for example: \x{100}{3}.&lt;br /&gt;
&lt;br /&gt;
	4. The dot metacharacter matches one UTF-8 character instead of a single byte.&lt;br /&gt;
&lt;br /&gt;
	5. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly test characters of any code value, but the characters that PCRE recognizes as digits, spaces, or word characters remain the same set as before, all with values less than 256. Note that this also applies to \b, because it is defined in terms of \w and \W.&lt;br /&gt;
&lt;br /&gt;
	6. Similarly, characters that match the POSIX named character classes are all low-valued characters.&lt;br /&gt;
&lt;br /&gt;
	7. However, the Perl 5.10 horizontal and vertical whitespace matching escapes (\h, \H, \v, and \V) do match all the appropriate Unicode characters.&lt;br /&gt;
&lt;br /&gt;
	8. Case-insensitive matching applies only to characters whose values are less than 128. PCRE supports case-insensitive matching only when there is a one-to-one mapping between a letter&#039;s cases. There are a small number of many-to-one mappings in Unicode; these are not supported by PCRE.&lt;br /&gt;
&lt;br /&gt;
See also the [../tutorials/regexp/regexp.htm Regular Expression] tutorial, in which you can run a script to test your regular expression(s).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
[[StringInStr]], [[StringRegExpReplace]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Option 1, using offset&lt;br /&gt;
Local $nOffset = 1&lt;br /&gt;
&lt;br /&gt;
Local $aArray&lt;br /&gt;
While 1&lt;br /&gt;
	$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 1, $nOffset)&lt;br /&gt;
&lt;br /&gt;
	If @error = 0 Then&lt;br /&gt;
		$nOffset = @extended&lt;br /&gt;
	Else&lt;br /&gt;
		ExitLoop&lt;br /&gt;
	EndIf&lt;br /&gt;
	For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 1 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
	Next&lt;br /&gt;
WEnd&lt;br /&gt;
&lt;br /&gt;
; Option 2, single return, php/preg_match() style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 2)&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 2 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 3, global return, old AutoIt style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 3)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 3 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 4, global return, php/preg_match_all() style&lt;br /&gt;
$aArray = StringRegExp(&#039;F1oF2oF3o&#039;, &#039;(F.o)*?&#039;, 4)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
&lt;br /&gt;
	Local $match = $aArray[$i]&lt;br /&gt;
	For $j = 0 To UBound($match) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 4 - &amp;quot; &amp;amp; $i &amp;amp; &#039;,&#039; &amp;amp; $j, $match[$j])&lt;br /&gt;
	Next&lt;br /&gt;
Next&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11883</id>
		<title>StringRegExp</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11883"/>
		<updated>2013-08-19T17:25:35Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font face=&#039;Segoe UI, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Autogenerated Wiki Page. See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Description&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;&lt;br /&gt;
Check if a string fits a given regular expression pattern.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
:StringRegExp ( &amp;quot;test&amp;quot;, &amp;quot;pattern&amp;quot; [, flag = 0 [, offset = 1]] )&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| test || The string to check&lt;br /&gt;
|-&lt;br /&gt;
| pattern || The regular expression to compare.&lt;br /&gt;
|-&lt;br /&gt;
| flag || &#039;&#039;&#039;[optional]&#039;&#039;&#039; A number to indicate how the function behaves.  See below for details.  The default is 0.&lt;br /&gt;
|-&lt;br /&gt;
| offset || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The string position to start the match (starts at 1)  The default is 1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Flag&#039;&#039;&#039; || &#039;&#039;&#039;Values&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Returns 1 (matched) or 0 (no match)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Return array of matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Return array of matches including the full match (Perl / PHP style).&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Return array of global matches.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Return an array of arrays containing global matches including the full match (Perl / PHP style).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&#039;&#039;Flag = 0 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 2  || Bad pattern. @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 1 or 2 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.  Check @extended for next offset&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 3 or 4 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
The flag parameter can have one of 5 values (0 through 4).  0 gives a true (1) or false (0) as to whether the pattern was found or not.  1 and 2 find the first match and returns it in an array.  3 and 4 find multiple hits and fills the array with all the matching text.  2 and 4 include the full matching text as the first record, not just the capturing groups, which is all you get with flag 1 and 3.&lt;br /&gt;
&lt;br /&gt;
Regular expression notation is a compact way of specifying a pattern for strings that can be searched.  Regular expressions are character strings in which plain text characters indicate what text should exist in the target string, and a some characters are given special meanings to indicate what variability is allowed in the target string.  AutoIt regular expressions are normally case-sensitive.&lt;br /&gt;
&lt;br /&gt;
Regular expressions are constructed of one or more of the following simple regular expression specifiers.  If the character is not in the following table, then it will match only itself.&lt;br /&gt;
&lt;br /&gt;
Repeating characters (*, +, ?, {...} ) will try to match the largest set possible, which allows the following characters to match as well, unless followed immediately by a question mark; then it will find the smallest pattern that allows the following characters to match as well.&lt;br /&gt;
&lt;br /&gt;
Nested groups are allowed, but keep in mind that all the groups, except non-capturing groups, assign to the returned array, with the outer groups assigning after the inner groups.&lt;br /&gt;
&lt;br /&gt;
Complete description can be found &#039;&#039;&#039;[http://www.autoitscript.com/autoit3/pcrepattern.html here]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution&#039;&#039;&#039;: bad regular expressions can produce a quasi-infinite loop hogging the CPU, and can even cause a crash.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;Matching Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [ ... ] || Match any character in the set.  e.g. &#039;&#039;&#039;[aeiou]&#039;&#039;&#039; matches any lower-case vowel.  A contiguous set can be defined using a dash between the starting and ending characters.  e.g. &#039;&#039;&#039;[a-z]&#039;&#039;&#039; matches any lower case character.  To include a dash (&#039;&#039;&#039;-&#039;&#039;&#039;) in a set, use it as the first or last character of the set.  To include a closing bracket in a set, use it as the first character of the set.  e.g. &#039;&#039;&#039;[][]&#039;&#039;&#039; will match either [ or ].  Note that special characters &#039;&#039;&#039;do not&#039;&#039;&#039; retain their special meanings inside a set, with the exception of &#039;&#039;&#039;\\&#039;&#039;&#039;,  &#039;&#039;&#039;\^&#039;&#039;&#039;, &#039;&#039;&#039;\-&#039;&#039;&#039;,&#039;&#039;&#039;\[&#039;&#039;&#039; and &#039;&#039;&#039;\]&#039;&#039;&#039; match the escaped character inside a set.&lt;br /&gt;
|-&lt;br /&gt;
| [^ ... ] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the set.  e.g. &#039;&#039;&#039;[^0-9]&#039;&#039;&#039; matches any non-digit.  To include a caret (&#039;&#039;&#039;^&#039;&#039;&#039;) in a set, put it after the beginning of the set or escape it (\^).&lt;br /&gt;
|-&lt;br /&gt;
| [:class:] || Match a character in the given class of characters.  Valid classes are: alpha (any alphabetic character), alnum (any alphanumeric character), lower (any lower-case letter), upper (any upper-case letter), digit (any decimal digit 0-9), xdigit (any hexadecimal digit, 0-9, A-F, a-f), space (any whitespace character), blank (only a space or tab), print (any printable character), graph (any printable character except spaces), cntrl (any control character [ascii 127 or &amp;lt;32]) or punct (any punctuation character). So [0-9] is equivalent to &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;:digit:&amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| [^:class:] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the class, but only if the first character.&lt;br /&gt;
|-&lt;br /&gt;
| ( ... ) || Group. The elements in the group are treated in order and can be repeated together.  e.g. &#039;&#039;&#039;(ab)+&#039;&#039;&#039; will match &amp;quot;ab&amp;quot; or &amp;quot;abab&amp;quot;, but not &amp;quot;aba&amp;quot;.  A group will also store the text matched for use in back-references and in the array returned by the function, depending on flag value.&lt;br /&gt;
|-&lt;br /&gt;
| (?#....) || comment (not nestable).&lt;br /&gt;
|-&lt;br /&gt;
| (?i) || Case-insensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-insensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i) || (default) Case-sensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-sensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?: ... ) || Non-capturing group.  Behaves just like a normal group, but does not record the matching characters in the array nor can the matched text be used for back-referencing.&lt;br /&gt;
|-&lt;br /&gt;
| (?i: ... ) || Case-insensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-insensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i: ... ) || Case-sensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-sensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?J) || allow duplicate names.&lt;br /&gt;
|-&lt;br /&gt;
| (?m) || ^ and $ match newlines within data.&lt;br /&gt;
|-&lt;br /&gt;
| (?s) || . matches anything including newline. (by default &amp;quot;.&amp;quot; don&#039;t match newline)&lt;br /&gt;
|-&lt;br /&gt;
| (?U) || Invert greediness of quantifiers.&lt;br /&gt;
|-&lt;br /&gt;
| (?x) || Ignore whitespace and # comments.&lt;br /&gt;
|-&lt;br /&gt;
| (?-...) || unset option(s).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;.&#039;&#039;&#039; || Match any single character (except newline).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; || Or.  The expression on one side &#039;&#039;&#039;or&#039;&#039;&#039; the other can be matched.&lt;br /&gt;
|-&lt;br /&gt;
| \ || &#039;&#039;Escape&#039;&#039; a special character (have it match the actual character) or introduce a special character type (see below).&lt;br /&gt;
|-&lt;br /&gt;
| \\ || Match an actual backslash (\).&lt;br /&gt;
|-&lt;br /&gt;
| \a || Alarm, that is, the BEL character ([[Chr]](7)).&lt;br /&gt;
|-&lt;br /&gt;
| \A || Match only at beginning of string.&lt;br /&gt;
|-&lt;br /&gt;
| \b || Matches at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \B || Matches when not at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \c || Match a control character, based on the next character.  For example, &#039;&#039;&#039;\cM&#039;&#039;&#039; matches ctrl-M.&lt;br /&gt;
|-&lt;br /&gt;
| \d || Match any digit (0-9).&lt;br /&gt;
|-&lt;br /&gt;
| \D || Match any non-digit.&lt;br /&gt;
|-&lt;br /&gt;
| \e || Match an escape character ([[Chr]](27)).&lt;br /&gt;
|-&lt;br /&gt;
| \E || end case modification.&lt;br /&gt;
|-&lt;br /&gt;
| \f || Match an formfeed character ([[Chr]](12)).&lt;br /&gt;
|-&lt;br /&gt;
| \G || first matching position in subject.&lt;br /&gt;
|-&lt;br /&gt;
| \h || any horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \H || any character that is not a horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \n || Match a linefeed (@LF, [[Chr]](10)).&lt;br /&gt;
|-&lt;br /&gt;
| \K || reset start of match.&lt;br /&gt;
|-&lt;br /&gt;
| \N || a character that is not a newline&lt;br /&gt;
|-&lt;br /&gt;
| \Q || quote (disable) pattern metacharacters till \E.&lt;br /&gt;
|-&lt;br /&gt;
| \r || Match a carriage return (@CR, [[Chr]](13)).&lt;br /&gt;
|-&lt;br /&gt;
| \R || a newline sequence.&lt;br /&gt;
|-&lt;br /&gt;
| \s || Match any whitespace character: [[Chr]](9) through [[Chr]](13) which are Horizontal Tab, Line Feed, Vertical Tab, Form Feed, and Carriage Return, and the standard space ( [[Chr]](32) ).&lt;br /&gt;
|-&lt;br /&gt;
| \S || Match any non-whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \t || Match a tab character ([[Chr]](9)).&lt;br /&gt;
|-&lt;br /&gt;
| \v || any vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \V || any character that is not a vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \w || Match any &amp;quot;word&amp;quot; character: a-z, A-Z, 0-9 or underscore (_).&lt;br /&gt;
|-&lt;br /&gt;
| \W || Match any non-word character.&lt;br /&gt;
|-&lt;br /&gt;
| \X || A Unicode extended grapheme cluster, that is an unbreakable sequence of codepoints which represent a single character for the user.&lt;br /&gt;
|-&lt;br /&gt;
| \ddd || Match character with octal code ddd, or backreference if found. Match the prior group number given exactly. For example, &#039;&#039;&#039;([:alpha:])\1&#039;&#039;&#039; would match a double letter.&lt;br /&gt;
|-&lt;br /&gt;
| \xhh || character with hex code hh.&lt;br /&gt;
|-&lt;br /&gt;
| \x{hhh..} || Match character with hex code hhh..&lt;br /&gt;
|-&lt;br /&gt;
| \z || Match only at end of string.&lt;br /&gt;
|-&lt;br /&gt;
| \Z || Match only at end of string, or before newline at the end.&lt;br /&gt;
|-&lt;br /&gt;
| (?= ... ) || Positive look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;= ... ) || Positive look behind.&lt;br /&gt;
|-&lt;br /&gt;
| (?! ... ) || Negative look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;! ... ) || Negative look behind.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Repeating Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group exactly &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;,} || Repeat the previous character, set or group at least &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {0,&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group at most &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;} || Repeat the previous character, set or group between &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; times, inclusive.&lt;br /&gt;
|-&lt;br /&gt;
| * || Repeat the previous character, set or group 0 or more times.  Equivalent to {0,}&lt;br /&gt;
|-&lt;br /&gt;
| + || Repeat the previous character, set or group 1 or more times.  Equivalent to {1,}&lt;br /&gt;
|-&lt;br /&gt;
| ? || The previous character, set or group may or may not appear.  Equivalent to {0, 1}&lt;br /&gt;
|-&lt;br /&gt;
| ? (after a repeating character) || Find the smallest match instead of the largest.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Character Classes&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [:alnum:] || letters and digits (same as [0-9A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:alpha:] || letters (same as [A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:ascii:] || character codes (same as [[Chr]](0) ... [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:blank:] || space or tab only (same as [[Chr]](9) and [[Chr]](32))&lt;br /&gt;
|-&lt;br /&gt;
| [:cntrl:] || control characters (same as [[Chr]](0) ... [[Chr]](31) and [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:digit:] || decimal digits (same as \d or [0-9])&lt;br /&gt;
|-&lt;br /&gt;
| [:graph:] || printing characters, excluding space (same as [[Chr]](33) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:lower:] || lower case letters (same as [a-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:print:] || printing characters, including space (same as [[Chr]](32) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:punct:] || printing characters, excluding [:alnum:] and [:cntrl:], (33-47, 58-64, 91-96, 123-126)&lt;br /&gt;
|-&lt;br /&gt;
| [:space:] || white space (not quite the same as \s, it includes VT: [[Chr]](11)) (same as [\f\n\r\t\v ])&lt;br /&gt;
|-&lt;br /&gt;
| [:upper:] || upper case letters (same as [A-Z])&lt;br /&gt;
|-&lt;br /&gt;
| [:word:] || &amp;quot;word&amp;quot; characters (same as \w)&lt;br /&gt;
|-&lt;br /&gt;
| [:xdigit:] || hexadecimal digits (same as [0-9A-Fa-f])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;General comments about UTF-8 mode&#039;&#039;&#039;&amp;lt;/u&amp;gt; (use internaly by AutoIt to translate pattern) :&lt;br /&gt;
&lt;br /&gt;
	1. An unbraced hexadecimal escape sequence (such as \xb3) matches a two-byte UTF-8 character if the value is greater than 127.&lt;br /&gt;
&lt;br /&gt;
	2. Octal numbers up to \777 are recognized, and match two-byte UTF-8 characters for values greater than \177.&lt;br /&gt;
&lt;br /&gt;
	3. Repeat quantifiers apply to complete UTF-8 characters, not to individual bytes, for example: \x{100}{3}.&lt;br /&gt;
&lt;br /&gt;
	4. The dot metacharacter matches one UTF-8 character instead of a single byte.&lt;br /&gt;
&lt;br /&gt;
	5. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly test characters of any code value, but the characters that PCRE recognizes as digits, spaces, or word characters remain the same set as before, all with values less than 256. Note that this also applies to \b, because it is defined in terms of \w and \W.&lt;br /&gt;
&lt;br /&gt;
	6. Similarly, characters that match the POSIX named character classes are all low-valued characters.&lt;br /&gt;
&lt;br /&gt;
	7. However, the Perl 5.10 horizontal and vertical whitespace matching escapes (\h, \H, \v, and \V) do match all the appropriate Unicode characters.&lt;br /&gt;
&lt;br /&gt;
	8. Case-insensitive matching applies only to characters whose values are less than 128. PCRE supports case-insensitive matching only when there is a one-to-one mapping between a letter&#039;s cases. There are a small number of many-to-one mappings in Unicode; these are not supported by PCRE.&lt;br /&gt;
&lt;br /&gt;
See also the [../tutorials/regexp/regexp.htm Regular Expression] tutorial, in which you can run a script to test your regular expression(s).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
[[StringInStr]], [[StringRegExpReplace]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Option 1, using offset&lt;br /&gt;
Local $nOffset = 1&lt;br /&gt;
&lt;br /&gt;
Local $aArray&lt;br /&gt;
While 1&lt;br /&gt;
	$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 1, $nOffset)&lt;br /&gt;
&lt;br /&gt;
	If @error = 0 Then&lt;br /&gt;
		$nOffset = @extended&lt;br /&gt;
	Else&lt;br /&gt;
		ExitLoop&lt;br /&gt;
	EndIf&lt;br /&gt;
	For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 1 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
	Next&lt;br /&gt;
WEnd&lt;br /&gt;
&lt;br /&gt;
; Option 2, single return, php/preg_match() style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 2)&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 2 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 3, global return, old AutoIt style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 3)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 3 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 4, global return, php/preg_match_all() style&lt;br /&gt;
$aArray = StringRegExp(&#039;F1oF2oF3o&#039;, &#039;(F.o)*?&#039;, 4)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
&lt;br /&gt;
	Local $match = $aArray[$i]&lt;br /&gt;
	For $j = 0 To UBound($match) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 4 - &amp;quot; &amp;amp; $i &amp;amp; &#039;,&#039; &amp;amp; $j, $match[$j])&lt;br /&gt;
	Next&lt;br /&gt;
Next&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11882</id>
		<title>StringRegExp</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11882"/>
		<updated>2013-08-19T17:14:00Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: Looks similar to the helpfile.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
&amp;lt;font face=&#039;Segoe UI, Lucida Grande, Verdana, Helvetica, sans-serif&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Description&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;font size=&#039;3&#039; weight=&#039;normal&#039;&amp;gt;&lt;br /&gt;
Check if a string fits a given regular expression pattern.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&#039;Syntax&#039; style=&#039;background-color:#FFFFAA;&#039;&amp;gt;&lt;br /&gt;
:StringRegExp ( &amp;quot;test&amp;quot;, &amp;quot;pattern&amp;quot; [, flag = 0 [, offset = 1]] )&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Parameters&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| test || The string to check&lt;br /&gt;
|-&lt;br /&gt;
| pattern || The regular expression to compare.&lt;br /&gt;
|-&lt;br /&gt;
| flag || &#039;&#039;&#039;[optional]&#039;&#039;&#039; A number to indicate how the function behaves.  See below for details.  The default is 0.&lt;br /&gt;
|-&lt;br /&gt;
| offset || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The string position to start the match (starts at 1)  The default is 1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Flag&#039;&#039;&#039; || &#039;&#039;&#039;Values&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Returns 1 (matched) or 0 (no match)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Return array of matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Return array of matches including the full match (Perl / PHP style).&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Return array of global matches.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Return an array of arrays containing global matches including the full match (Perl / PHP style).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Return Value&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&#039;&#039;Flag = 0 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 2  || Bad pattern. @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 1 or 2 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.  Check @extended for next offset&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 3 or 4 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Remarks&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
The flag parameter can have one of 5 values (0 through 4).  0 gives a true (1) or false (0) as to whether the pattern was found or not.  1 and 2 find the first match and returns it in an array.  3 and 4 find multiple hits and fills the array with all the matching text.  2 and 4 include the full matching text as the first record, not just the capturing groups, which is all you get with flag 1 and 3.&lt;br /&gt;
&lt;br /&gt;
Regular expression notation is a compact way of specifying a pattern for strings that can be searched.  Regular expressions are character strings in which plain text characters indicate what text should exist in the target string, and a some characters are given special meanings to indicate what variability is allowed in the target string.  AutoIt regular expressions are normally case-sensitive.&lt;br /&gt;
&lt;br /&gt;
Regular expressions are constructed of one or more of the following simple regular expression specifiers.  If the character is not in the following table, then it will match only itself.&lt;br /&gt;
&lt;br /&gt;
Repeating characters (*, +, ?, {...} ) will try to match the largest set possible, which allows the following characters to match as well, unless followed immediately by a question mark; then it will find the smallest pattern that allows the following characters to match as well.&lt;br /&gt;
&lt;br /&gt;
Nested groups are allowed, but keep in mind that all the groups, except non-capturing groups, assign to the returned array, with the outer groups assigning after the inner groups.&lt;br /&gt;
&lt;br /&gt;
Complete description can be found &#039;&#039;&#039;[http://www.autoitscript.com/autoit3/pcrepattern.html here]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution&#039;&#039;&#039;: bad regular expressions can produce a quasi-infinite loop hogging the CPU, and can even cause a crash.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;Matching Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [ ... ] || Match any character in the set.  e.g. &#039;&#039;&#039;[aeiou]&#039;&#039;&#039; matches any lower-case vowel.  A contiguous set can be defined using a dash between the starting and ending characters.  e.g. &#039;&#039;&#039;[a-z]&#039;&#039;&#039; matches any lower case character.  To include a dash (&#039;&#039;&#039;-&#039;&#039;&#039;) in a set, use it as the first or last character of the set.  To include a closing bracket in a set, use it as the first character of the set.  e.g. &#039;&#039;&#039;[][]&#039;&#039;&#039; will match either [ or ].  Note that special characters &#039;&#039;&#039;do not&#039;&#039;&#039; retain their special meanings inside a set, with the exception of &#039;&#039;&#039;\\&#039;&#039;&#039;,  &#039;&#039;&#039;\^&#039;&#039;&#039;, &#039;&#039;&#039;\-&#039;&#039;&#039;,&#039;&#039;&#039;\[&#039;&#039;&#039; and &#039;&#039;&#039;\]&#039;&#039;&#039; match the escaped character inside a set.&lt;br /&gt;
|-&lt;br /&gt;
| [^ ... ] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the set.  e.g. &#039;&#039;&#039;[^0-9]&#039;&#039;&#039; matches any non-digit.  To include a caret (&#039;&#039;&#039;^&#039;&#039;&#039;) in a set, put it after the beginning of the set or escape it (\^).&lt;br /&gt;
|-&lt;br /&gt;
| [:class:] || Match a character in the given class of characters.  Valid classes are: alpha (any alphabetic character), alnum (any alphanumeric character), lower (any lower-case letter), upper (any upper-case letter), digit (any decimal digit 0-9), xdigit (any hexadecimal digit, 0-9, A-F, a-f), space (any whitespace character), blank (only a space or tab), print (any printable character), graph (any printable character except spaces), cntrl (any control character [ascii 127 or &amp;lt;32]) or punct (any punctuation character). So [0-9] is equivalent to &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;:digit:&amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| [^:class:] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the class, but only if the first character.&lt;br /&gt;
|-&lt;br /&gt;
| ( ... ) || Group. The elements in the group are treated in order and can be repeated together.  e.g. &#039;&#039;&#039;(ab)+&#039;&#039;&#039; will match &amp;quot;ab&amp;quot; or &amp;quot;abab&amp;quot;, but not &amp;quot;aba&amp;quot;.  A group will also store the text matched for use in back-references and in the array returned by the function, depending on flag value.&lt;br /&gt;
|-&lt;br /&gt;
| (?#....) || comment (not nestable).&lt;br /&gt;
|-&lt;br /&gt;
| (?i) || Case-insensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-insensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i) || (default) Case-sensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-sensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?: ... ) || Non-capturing group.  Behaves just like a normal group, but does not record the matching characters in the array nor can the matched text be used for back-referencing.&lt;br /&gt;
|-&lt;br /&gt;
| (?i: ... ) || Case-insensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-insensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i: ... ) || Case-sensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-sensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?J) || allow duplicate names.&lt;br /&gt;
|-&lt;br /&gt;
| (?m) || ^ and $ match newlines within data.&lt;br /&gt;
|-&lt;br /&gt;
| (?s) || . matches anything including newline. (by default &amp;quot;.&amp;quot; don&#039;t match newline)&lt;br /&gt;
|-&lt;br /&gt;
| (?U) || Invert greediness of quantifiers.&lt;br /&gt;
|-&lt;br /&gt;
| (?x) || Ignore whitespace and # comments.&lt;br /&gt;
|-&lt;br /&gt;
| (?-...) || unset option(s).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;.&#039;&#039;&#039; || Match any single character (except newline).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; || Or.  The expression on one side &#039;&#039;&#039;or&#039;&#039;&#039; the other can be matched.&lt;br /&gt;
|-&lt;br /&gt;
| \ || &#039;&#039;Escape&#039;&#039; a special character (have it match the actual character) or introduce a special character type (see below).&lt;br /&gt;
|-&lt;br /&gt;
| \\ || Match an actual backslash (\).&lt;br /&gt;
|-&lt;br /&gt;
| \a || Alarm, that is, the BEL character ([[Chr]](7)).&lt;br /&gt;
|-&lt;br /&gt;
| \A || Match only at beginning of string.&lt;br /&gt;
|-&lt;br /&gt;
| \b || Matches at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \B || Matches when not at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \c || Match a control character, based on the next character.  For example, &#039;&#039;&#039;\cM&#039;&#039;&#039; matches ctrl-M.&lt;br /&gt;
|-&lt;br /&gt;
| \d || Match any digit (0-9).&lt;br /&gt;
|-&lt;br /&gt;
| \D || Match any non-digit.&lt;br /&gt;
|-&lt;br /&gt;
| \e || Match an escape character ([[Chr]](27)).&lt;br /&gt;
|-&lt;br /&gt;
| \E || end case modification.&lt;br /&gt;
|-&lt;br /&gt;
| \f || Match an formfeed character ([[Chr]](12)).&lt;br /&gt;
|-&lt;br /&gt;
| \G || first matching position in subject.&lt;br /&gt;
|-&lt;br /&gt;
| \h || any horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \H || any character that is not a horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \n || Match a linefeed (@LF, [[Chr]](10)).&lt;br /&gt;
|-&lt;br /&gt;
| \K || reset start of match.&lt;br /&gt;
|-&lt;br /&gt;
| \N || a character that is not a newline&lt;br /&gt;
|-&lt;br /&gt;
| \Q || quote (disable) pattern metacharacters till \E.&lt;br /&gt;
|-&lt;br /&gt;
| \r || Match a carriage return (@CR, [[Chr]](13)).&lt;br /&gt;
|-&lt;br /&gt;
| \R || a newline sequence.&lt;br /&gt;
|-&lt;br /&gt;
| \s || Match any whitespace character: [[Chr]](9) through [[Chr]](13) which are Horizontal Tab, Line Feed, Vertical Tab, Form Feed, and Carriage Return, and the standard space ( [[Chr]](32) ).&lt;br /&gt;
|-&lt;br /&gt;
| \S || Match any non-whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \t || Match a tab character ([[Chr]](9)).&lt;br /&gt;
|-&lt;br /&gt;
| \v || any vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \V || any character that is not a vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \w || Match any &amp;quot;word&amp;quot; character: a-z, A-Z, 0-9 or underscore (_).&lt;br /&gt;
|-&lt;br /&gt;
| \W || Match any non-word character.&lt;br /&gt;
|-&lt;br /&gt;
| \X || A Unicode extended grapheme cluster, that is an unbreakable sequence of codepoints which represent a single character for the user.&lt;br /&gt;
|-&lt;br /&gt;
| \ddd || Match character with octal code ddd, or backreference if found. Match the prior group number given exactly. For example, &#039;&#039;&#039;([:alpha:])\1&#039;&#039;&#039; would match a double letter.&lt;br /&gt;
|-&lt;br /&gt;
| \xhh || character with hex code hh.&lt;br /&gt;
|-&lt;br /&gt;
| \x{hhh..} || Match character with hex code hhh..&lt;br /&gt;
|-&lt;br /&gt;
| \z || Match only at end of string.&lt;br /&gt;
|-&lt;br /&gt;
| \Z || Match only at end of string, or before newline at the end.&lt;br /&gt;
|-&lt;br /&gt;
| (?= ... ) || Positive look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;= ... ) || Positive look behind.&lt;br /&gt;
|-&lt;br /&gt;
| (?! ... ) || Negative look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;! ... ) || Negative look behind.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Repeating Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group exactly &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;,} || Repeat the previous character, set or group at least &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {0,&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group at most &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;} || Repeat the previous character, set or group between &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; times, inclusive.&lt;br /&gt;
|-&lt;br /&gt;
| * || Repeat the previous character, set or group 0 or more times.  Equivalent to {0,}&lt;br /&gt;
|-&lt;br /&gt;
| + || Repeat the previous character, set or group 1 or more times.  Equivalent to {1,}&lt;br /&gt;
|-&lt;br /&gt;
| ? || The previous character, set or group may or may not appear.  Equivalent to {0, 1}&lt;br /&gt;
|-&lt;br /&gt;
| ? (after a repeating character) || Find the smallest match instead of the largest.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Character Classes&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [:alnum:] || letters and digits (same as [0-9A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:alpha:] || letters (same as [A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:ascii:] || character codes (same as [[Chr]](0) ... [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:blank:] || space or tab only (same as [[Chr]](9) and [[Chr]](32))&lt;br /&gt;
|-&lt;br /&gt;
| [:cntrl:] || control characters (same as [[Chr]](0) ... [[Chr]](31) and [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:digit:] || decimal digits (same as \d or [0-9])&lt;br /&gt;
|-&lt;br /&gt;
| [:graph:] || printing characters, excluding space (same as [[Chr]](33) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:lower:] || lower case letters (same as [a-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:print:] || printing characters, including space (same as [[Chr]](32) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:punct:] || printing characters, excluding [:alnum:] and [:cntrl:], (33-47, 58-64, 91-96, 123-126)&lt;br /&gt;
|-&lt;br /&gt;
| [:space:] || white space (not quite the same as \s, it includes VT: [[Chr]](11)) (same as [\f\n\r\t\v ])&lt;br /&gt;
|-&lt;br /&gt;
| [:upper:] || upper case letters (same as [A-Z])&lt;br /&gt;
|-&lt;br /&gt;
| [:word:] || &amp;quot;word&amp;quot; characters (same as \w)&lt;br /&gt;
|-&lt;br /&gt;
| [:xdigit:] || hexadecimal digits (same as [0-9A-Fa-f])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;General comments about UTF-8 mode&#039;&#039;&#039;&amp;lt;/u&amp;gt; (use internaly by AutoIt to translate pattern) :&lt;br /&gt;
&lt;br /&gt;
	1. An unbraced hexadecimal escape sequence (such as \xb3) matches a two-byte UTF-8 character if the value is greater than 127.&lt;br /&gt;
&lt;br /&gt;
	2. Octal numbers up to \777 are recognized, and match two-byte UTF-8 characters for values greater than \177.&lt;br /&gt;
&lt;br /&gt;
	3. Repeat quantifiers apply to complete UTF-8 characters, not to individual bytes, for example: \x{100}{3}.&lt;br /&gt;
&lt;br /&gt;
	4. The dot metacharacter matches one UTF-8 character instead of a single byte.&lt;br /&gt;
&lt;br /&gt;
	5. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly test characters of any code value, but the characters that PCRE recognizes as digits, spaces, or word characters remain the same set as before, all with values less than 256. Note that this also applies to \b, because it is defined in terms of \w and \W.&lt;br /&gt;
&lt;br /&gt;
	6. Similarly, characters that match the POSIX named character classes are all low-valued characters.&lt;br /&gt;
&lt;br /&gt;
	7. However, the Perl 5.10 horizontal and vertical whitespace matching escapes (\h, \H, \v, and \V) do match all the appropriate Unicode characters.&lt;br /&gt;
&lt;br /&gt;
	8. Case-insensitive matching applies only to characters whose values are less than 128. PCRE supports case-insensitive matching only when there is a one-to-one mapping between a letter&#039;s cases. There are a small number of many-to-one mappings in Unicode; these are not supported by PCRE.&lt;br /&gt;
&lt;br /&gt;
See also the [../tutorials/regexp/regexp.htm Regular Expression] tutorial, in which you can run a script to test your regular expression(s).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Related&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
[[StringInStr]], [[StringRegExpReplace]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;font size=&#039;4&#039;&amp;gt;&amp;lt;div id=&#039;Section&#039; style=&#039;color:#DB7100;&#039;&amp;gt;Example&amp;lt;/div&amp;gt;&amp;lt;/font&amp;gt;===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Option 1, using offset&lt;br /&gt;
Local $nOffset = 1&lt;br /&gt;
&lt;br /&gt;
Local $aArray&lt;br /&gt;
While 1&lt;br /&gt;
	$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 1, $nOffset)&lt;br /&gt;
&lt;br /&gt;
	If @error = 0 Then&lt;br /&gt;
		$nOffset = @extended&lt;br /&gt;
	Else&lt;br /&gt;
		ExitLoop&lt;br /&gt;
	EndIf&lt;br /&gt;
	For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 1 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
	Next&lt;br /&gt;
WEnd&lt;br /&gt;
&lt;br /&gt;
; Option 2, single return, php/preg_match() style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 2)&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 2 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 3, global return, old AutoIt style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 3)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 3 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 4, global return, php/preg_match_all() style&lt;br /&gt;
$aArray = StringRegExp(&#039;F1oF2oF3o&#039;, &#039;(F.o)*?&#039;, 4)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
&lt;br /&gt;
	Local $match = $aArray[$i]&lt;br /&gt;
	For $j = 0 To UBound($match) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 4 - &amp;quot; &amp;amp; $i &amp;amp; &#039;,&#039; &amp;amp; $j, $match[$j])&lt;br /&gt;
	Next&lt;br /&gt;
Next&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11881</id>
		<title>StringRegExp</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11881"/>
		<updated>2013-08-19T15:08:43Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
==Description==&lt;br /&gt;
Check if a string fits a given regular expression pattern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
StringRegExp ( &amp;quot;test&amp;quot;, &amp;quot;pattern&amp;quot; [, flag = 0 [, offset = 1]] )&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| test || The string to check&lt;br /&gt;
|-&lt;br /&gt;
| pattern || The regular expression to compare.&lt;br /&gt;
|-&lt;br /&gt;
| flag || &#039;&#039;&#039;[optional]&#039;&#039;&#039; A number to indicate how the function behaves.  See below for details.  The default is 0.&lt;br /&gt;
|-&lt;br /&gt;
| offset || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The string position to start the match (starts at 1)  The default is 1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Flag&#039;&#039;&#039; || &#039;&#039;&#039;Values&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Returns 1 (matched) or 0 (no match)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Return array of matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Return array of matches including the full match (Perl / PHP style).&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Return array of global matches.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Return an array of arrays containing global matches including the full match (Perl / PHP style).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
&#039;&#039;Flag = 0 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 2  || Bad pattern. @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 1 or 2 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.  Check @extended for next offset&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 3 or 4 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Remarks==&lt;br /&gt;
The flag parameter can have one of 5 values (0 through 4).  0 gives a true (1) or false (0) as to whether the pattern was found or not.  1 and 2 find the first match and returns it in an array.  3 and 4 find multiple hits and fills the array with all the matching text.  2 and 4 include the full matching text as the first record, not just the capturing groups, which is all you get with flag 1 and 3.&lt;br /&gt;
&lt;br /&gt;
Regular expression notation is a compact way of specifying a pattern for strings that can be searched.  Regular expressions are character strings in which plain text characters indicate what text should exist in the target string, and a some characters are given special meanings to indicate what variability is allowed in the target string.  AutoIt regular expressions are normally case-sensitive.&lt;br /&gt;
&lt;br /&gt;
Regular expressions are constructed of one or more of the following simple regular expression specifiers.  If the character is not in the following table, then it will match only itself.&lt;br /&gt;
&lt;br /&gt;
Repeating characters (*, +, ?, {...} ) will try to match the largest set possible, which allows the following characters to match as well, unless followed immediately by a question mark; then it will find the smallest pattern that allows the following characters to match as well.&lt;br /&gt;
&lt;br /&gt;
Nested groups are allowed, but keep in mind that all the groups, except non-capturing groups, assign to the returned array, with the outer groups assigning after the inner groups.&lt;br /&gt;
&lt;br /&gt;
Complete description can be found &#039;&#039;&#039;[http://www.autoitscript.com/autoit3/pcrepattern.html here]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution&#039;&#039;&#039;: bad regular expressions can produce a quasi-infinite loop hogging the CPU, and can even cause a crash.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;Matching Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [ ... ] || Match any character in the set.  e.g. &#039;&#039;&#039;[aeiou]&#039;&#039;&#039; matches any lower-case vowel.  A contiguous set can be defined using a dash between the starting and ending characters.  e.g. &#039;&#039;&#039;[a-z]&#039;&#039;&#039; matches any lower case character.  To include a dash (&#039;&#039;&#039;-&#039;&#039;&#039;) in a set, use it as the first or last character of the set.  To include a closing bracket in a set, use it as the first character of the set.  e.g. &#039;&#039;&#039;[][]&#039;&#039;&#039; will match either [ or ].  Note that special characters &#039;&#039;&#039;do not&#039;&#039;&#039; retain their special meanings inside a set, with the exception of &#039;&#039;&#039;\\&#039;&#039;&#039;,  &#039;&#039;&#039;\^&#039;&#039;&#039;, &#039;&#039;&#039;\-&#039;&#039;&#039;,&#039;&#039;&#039;\[&#039;&#039;&#039; and &#039;&#039;&#039;\]&#039;&#039;&#039; match the escaped character inside a set.&lt;br /&gt;
|-&lt;br /&gt;
| [^ ... ] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the set.  e.g. &#039;&#039;&#039;[^0-9]&#039;&#039;&#039; matches any non-digit.  To include a caret (&#039;&#039;&#039;^&#039;&#039;&#039;) in a set, put it after the beginning of the set or escape it (\^).&lt;br /&gt;
|-&lt;br /&gt;
| [:class:] || Match a character in the given class of characters.  Valid classes are: alpha (any alphabetic character), alnum (any alphanumeric character), lower (any lower-case letter), upper (any upper-case letter), digit (any decimal digit 0-9), xdigit (any hexadecimal digit, 0-9, A-F, a-f), space (any whitespace character), blank (only a space or tab), print (any printable character), graph (any printable character except spaces), cntrl (any control character [ascii 127 or &amp;lt;32]) or punct (any punctuation character). So [0-9] is equivalent to &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;:digit:&amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| [^:class:] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the class, but only if the first character.&lt;br /&gt;
|-&lt;br /&gt;
| ( ... ) || Group. The elements in the group are treated in order and can be repeated together.  e.g. &#039;&#039;&#039;(ab)+&#039;&#039;&#039; will match &amp;quot;ab&amp;quot; or &amp;quot;abab&amp;quot;, but not &amp;quot;aba&amp;quot;.  A group will also store the text matched for use in back-references and in the array returned by the function, depending on flag value.&lt;br /&gt;
|-&lt;br /&gt;
| (?#....) || comment (not nestable).&lt;br /&gt;
|-&lt;br /&gt;
| (?i) || Case-insensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-insensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i) || (default) Case-sensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-sensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?: ... ) || Non-capturing group.  Behaves just like a normal group, but does not record the matching characters in the array nor can the matched text be used for back-referencing.&lt;br /&gt;
|-&lt;br /&gt;
| (?i: ... ) || Case-insensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-insensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i: ... ) || Case-sensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-sensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?J) || allow duplicate names.&lt;br /&gt;
|-&lt;br /&gt;
| (?m) || ^ and $ match newlines within data.&lt;br /&gt;
|-&lt;br /&gt;
| (?s) || . matches anything including newline. (by default &amp;quot;.&amp;quot; don&#039;t match newline)&lt;br /&gt;
|-&lt;br /&gt;
| (?U) || Invert greediness of quantifiers.&lt;br /&gt;
|-&lt;br /&gt;
| (?x) || Ignore whitespace and # comments.&lt;br /&gt;
|-&lt;br /&gt;
| (?-...) || unset option(s).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;.&#039;&#039;&#039; || Match any single character (except newline).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; || Or.  The expression on one side &#039;&#039;&#039;or&#039;&#039;&#039; the other can be matched.&lt;br /&gt;
|-&lt;br /&gt;
| \ || &#039;&#039;Escape&#039;&#039; a special character (have it match the actual character) or introduce a special character type (see below).&lt;br /&gt;
|-&lt;br /&gt;
| \\ || Match an actual backslash (\).&lt;br /&gt;
|-&lt;br /&gt;
| \a || Alarm, that is, the BEL character ([[Chr]](7)).&lt;br /&gt;
|-&lt;br /&gt;
| \A || Match only at beginning of string.&lt;br /&gt;
|-&lt;br /&gt;
| \b || Matches at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \B || Matches when not at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \c || Match a control character, based on the next character.  For example, &#039;&#039;&#039;\cM&#039;&#039;&#039; matches ctrl-M.&lt;br /&gt;
|-&lt;br /&gt;
| \d || Match any digit (0-9).&lt;br /&gt;
|-&lt;br /&gt;
| \D || Match any non-digit.&lt;br /&gt;
|-&lt;br /&gt;
| \e || Match an escape character ([[Chr]](27)).&lt;br /&gt;
|-&lt;br /&gt;
| \E || end case modification.&lt;br /&gt;
|-&lt;br /&gt;
| \f || Match an formfeed character ([[Chr]](12)).&lt;br /&gt;
|-&lt;br /&gt;
| \G || first matching position in subject.&lt;br /&gt;
|-&lt;br /&gt;
| \h || any horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \H || any character that is not a horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \n || Match a linefeed (@LF, [[Chr]](10)).&lt;br /&gt;
|-&lt;br /&gt;
| \K || reset start of match.&lt;br /&gt;
|-&lt;br /&gt;
| \N || a character that is not a newline&lt;br /&gt;
|-&lt;br /&gt;
| \Q || quote (disable) pattern metacharacters till \E.&lt;br /&gt;
|-&lt;br /&gt;
| \r || Match a carriage return (@CR, [[Chr]](13)).&lt;br /&gt;
|-&lt;br /&gt;
| \R || a newline sequence.&lt;br /&gt;
|-&lt;br /&gt;
| \s || Match any whitespace character: [[Chr]](9) through [[Chr]](13) which are Horizontal Tab, Line Feed, Vertical Tab, Form Feed, and Carriage Return, and the standard space ( [[Chr]](32) ).&lt;br /&gt;
|-&lt;br /&gt;
| \S || Match any non-whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \t || Match a tab character ([[Chr]](9)).&lt;br /&gt;
|-&lt;br /&gt;
| \v || any vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \V || any character that is not a vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \w || Match any &amp;quot;word&amp;quot; character: a-z, A-Z, 0-9 or underscore (_).&lt;br /&gt;
|-&lt;br /&gt;
| \W || Match any non-word character.&lt;br /&gt;
|-&lt;br /&gt;
| \X || A Unicode extended grapheme cluster, that is an unbreakable sequence of codepoints which represent a single character for the user.&lt;br /&gt;
|-&lt;br /&gt;
| \ddd || Match character with octal code ddd, or backreference if found. Match the prior group number given exactly. For example, &#039;&#039;&#039;([:alpha:])\1&#039;&#039;&#039; would match a double letter.&lt;br /&gt;
|-&lt;br /&gt;
| \xhh || character with hex code hh.&lt;br /&gt;
|-&lt;br /&gt;
| \x{hhh..} || Match character with hex code hhh..&lt;br /&gt;
|-&lt;br /&gt;
| \z || Match only at end of string.&lt;br /&gt;
|-&lt;br /&gt;
| \Z || Match only at end of string, or before newline at the end.&lt;br /&gt;
|-&lt;br /&gt;
| (?= ... ) || Positive look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;= ... ) || Positive look behind.&lt;br /&gt;
|-&lt;br /&gt;
| (?! ... ) || Negative look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;! ... ) || Negative look behind.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Repeating Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group exactly &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;,} || Repeat the previous character, set or group at least &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {0,&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group at most &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;} || Repeat the previous character, set or group between &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; times, inclusive.&lt;br /&gt;
|-&lt;br /&gt;
| * || Repeat the previous character, set or group 0 or more times.  Equivalent to {0,}&lt;br /&gt;
|-&lt;br /&gt;
| + || Repeat the previous character, set or group 1 or more times.  Equivalent to {1,}&lt;br /&gt;
|-&lt;br /&gt;
| ? || The previous character, set or group may or may not appear.  Equivalent to {0, 1}&lt;br /&gt;
|-&lt;br /&gt;
| ? (after a repeating character) || Find the smallest match instead of the largest.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Character Classes&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [:alnum:] || letters and digits (same as [0-9A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:alpha:] || letters (same as [A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:ascii:] || character codes (same as [[Chr]](0) ... [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:blank:] || space or tab only (same as [[Chr]](9) and [[Chr]](32))&lt;br /&gt;
|-&lt;br /&gt;
| [:cntrl:] || control characters (same as [[Chr]](0) ... [[Chr]](31) and [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:digit:] || decimal digits (same as \d or [0-9])&lt;br /&gt;
|-&lt;br /&gt;
| [:graph:] || printing characters, excluding space (same as [[Chr]](33) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:lower:] || lower case letters (same as [a-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:print:] || printing characters, including space (same as [[Chr]](32) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:punct:] || printing characters, excluding [:alnum:] and [:cntrl:], (33-47, 58-64, 91-96, 123-126)&lt;br /&gt;
|-&lt;br /&gt;
| [:space:] || white space (not quite the same as \s, it includes VT: [[Chr]](11)) (same as [\f\n\r\t\v ])&lt;br /&gt;
|-&lt;br /&gt;
| [:upper:] || upper case letters (same as [A-Z])&lt;br /&gt;
|-&lt;br /&gt;
| [:word:] || &amp;quot;word&amp;quot; characters (same as \w)&lt;br /&gt;
|-&lt;br /&gt;
| [:xdigit:] || hexadecimal digits (same as [0-9A-Fa-f])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;General comments about UTF-8 mode&#039;&#039;&#039;&amp;lt;/u&amp;gt; (use internaly by AutoIt to translate pattern) :&lt;br /&gt;
&lt;br /&gt;
	1. An unbraced hexadecimal escape sequence (such as \xb3) matches a two-byte UTF-8 character if the value is greater than 127.&lt;br /&gt;
&lt;br /&gt;
	2. Octal numbers up to \777 are recognized, and match two-byte UTF-8 characters for values greater than \177.&lt;br /&gt;
&lt;br /&gt;
	3. Repeat quantifiers apply to complete UTF-8 characters, not to individual bytes, for example: \x{100}{3}.&lt;br /&gt;
&lt;br /&gt;
	4. The dot metacharacter matches one UTF-8 character instead of a single byte.&lt;br /&gt;
&lt;br /&gt;
	5. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly test characters of any code value, but the characters that PCRE recognizes as digits, spaces, or word characters remain the same set as before, all with values less than 256. Note that this also applies to \b, because it is defined in terms of \w and \W.&lt;br /&gt;
&lt;br /&gt;
	6. Similarly, characters that match the POSIX named character classes are all low-valued characters.&lt;br /&gt;
&lt;br /&gt;
	7. However, the Perl 5.10 horizontal and vertical whitespace matching escapes (\h, \H, \v, and \V) do match all the appropriate Unicode characters.&lt;br /&gt;
&lt;br /&gt;
	8. Case-insensitive matching applies only to characters whose values are less than 128. PCRE supports case-insensitive matching only when there is a one-to-one mapping between a letter&#039;s cases. There are a small number of many-to-one mappings in Unicode; these are not supported by PCRE.&lt;br /&gt;
&lt;br /&gt;
See also the [../tutorials/regexp/regexp.htm Regular Expression] tutorial, in which you can run a script to test your regular expression(s).&lt;br /&gt;
&lt;br /&gt;
==Related==&lt;br /&gt;
[[StringInStr]], [[StringRegExpReplace]]&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Option 1, using offset&lt;br /&gt;
Local $nOffset = 1&lt;br /&gt;
&lt;br /&gt;
Local $aArray&lt;br /&gt;
While 1&lt;br /&gt;
	$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 1, $nOffset)&lt;br /&gt;
&lt;br /&gt;
	If @error = 0 Then&lt;br /&gt;
		$nOffset = @extended&lt;br /&gt;
	Else&lt;br /&gt;
		ExitLoop&lt;br /&gt;
	EndIf&lt;br /&gt;
	For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 1 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
	Next&lt;br /&gt;
WEnd&lt;br /&gt;
&lt;br /&gt;
; Option 2, single return, php/preg_match() style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 2)&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 2 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 3, global return, old AutoIt style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 3)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 3 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 4, global return, php/preg_match_all() style&lt;br /&gt;
$aArray = StringRegExp(&#039;F1oF2oF3o&#039;, &#039;(F.o)*?&#039;, 4)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
&lt;br /&gt;
	Local $match = $aArray[$i]&lt;br /&gt;
	For $j = 0 To UBound($match) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 4 - &amp;quot; &amp;amp; $i &amp;amp; &#039;,&#039; &amp;amp; $j, $match[$j])&lt;br /&gt;
	Next&lt;br /&gt;
Next&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=Best_coding_practices&amp;diff=11880</id>
		<title>Best coding practices</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=Best_coding_practices&amp;diff=11880"/>
		<updated>2013-08-19T14:25:52Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: Merged Magic Numbers into this article.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Outlined in this section is a detailed explanation of what is to be considered the best coding practices within AutoIt.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Names of Variables ==&lt;br /&gt;
The Hungarian notation is adopted however it&#039;s simplified and regroup all the types of numbers in one type.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! prefix !! covering type !! initialization&lt;br /&gt;
|-&lt;br /&gt;
| i || Numbers (any type) || $i = 0&lt;br /&gt;
|-&lt;br /&gt;
| a || Arrays || $a = 0 or $a[0]&lt;br /&gt;
|-&lt;br /&gt;
| s || Strings (chars included) || $s = &amp;quot;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| f || Booleans || $f = False or $f = True &lt;br /&gt;
|-&lt;br /&gt;
| b || Binaries || $b = &amp;quot;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| h || Handles (and GUI handles) || $h = 0&lt;br /&gt;
|-&lt;br /&gt;
| k (not decided) || Keywords || Null (not decided)&lt;br /&gt;
|-&lt;br /&gt;
| fu (not decided) || Functions || Null (not decided)&lt;br /&gt;
|-&lt;br /&gt;
| p || Pointers || $p = 0&lt;br /&gt;
|-&lt;br /&gt;
| tag || Structures definition || $tag = &amp;quot;&amp;quot; (should directly be filled)&lt;br /&gt;
|-&lt;br /&gt;
| t || Structures || $t = 0&lt;br /&gt;
|-&lt;br /&gt;
| o || Objects || $o = 0&lt;br /&gt;
|-&lt;br /&gt;
| v || Various || $v = 0 or $v = &amp;quot;&amp;quot; (or $v = Null)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The variables are named following this schema:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! type (lower case) !! [optional] subtype (lower case) !! var name (first letter in upper case)&lt;br /&gt;
|-&lt;br /&gt;
| i || f || MyFlag&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
; Assign a Local variable the number 5.&lt;br /&gt;
Local $iSomeVar = 5&lt;br /&gt;
&lt;br /&gt;
; Assign a Local variable the number 1.&lt;br /&gt;
Local $ifMyFlag = 1&lt;br /&gt;
&lt;br /&gt;
; Assign a Local variable an array of numbers.&lt;br /&gt;
Local $aiArray = 0&lt;br /&gt;
&lt;br /&gt;
; Re-declare the array to size and fill it.&lt;br /&gt;
Local $aiArray[3] = [0, 0.25, 3 / 4]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Always initialize a variable on it&#039;s declaration, and declare all the same type of variable on the same line.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
;Bad&lt;br /&gt;
Local $iSomeVar1, $aiArray = 0&lt;br /&gt;
Local $iSomeVar2 = 5&lt;br /&gt;
&lt;br /&gt;
;Good&lt;br /&gt;
Local $iSomeVar1 = 0, $iSomeVar2 = 5&lt;br /&gt;
Local $aiArray = 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can still categorize your variables and declare for example the $iSomeVar2 on another line.&lt;br /&gt;
&lt;br /&gt;
Example2:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;Constants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Local $vValue ; Bad, this is initially blank.&lt;br /&gt;
Local $vVal = 0 ; Good&lt;br /&gt;
&lt;br /&gt;
MsgBox($MB_SYSTEMMODAL, &#039;&#039;, &#039;$vValue: &#039; &amp;amp; $vValue &amp;amp; @CRLF &amp;amp; &#039;$vVal: &#039; &amp;amp; $vVal)&lt;br /&gt;
&lt;br /&gt;
; In C++ $vValue would display the previous value that was residing in the memory address $vValue points to. AutoIt&lt;br /&gt;
; is a little less forgiving in that it initialises the variable as being blank and doesn&#039;t throw any error, unlike some moder C++ compilers.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scopes of Variables ==&lt;br /&gt;
To make the transition, the variables are also named according to their scope.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Global UDF variable !! Global variable !! Local variable&lt;br /&gt;
|-&lt;br /&gt;
| $__iSomeVar or $g__iSomeVar || $_iSomeVar or $g_iSomeVar || $iSomeVar&lt;br /&gt;
|}&lt;br /&gt;
With this method, you will avoid non wanted re-assignments.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MessageBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Assign a Global variable the number 0.&lt;br /&gt;
Global $iSomeVar1 = 0&lt;br /&gt;
; Assign a Global variable the number 5.&lt;br /&gt;
Global $_iSomeVar2 = 5&lt;br /&gt;
&lt;br /&gt;
_SomeFunc()&lt;br /&gt;
&lt;br /&gt;
Func _SomeFunc()&lt;br /&gt;
	; Assign Local variables respectively the numbers 3 and 4.&lt;br /&gt;
	Local $iSomeVar1 = 3, $iSomeVar2 = 4&lt;br /&gt;
&lt;br /&gt;
	; Note: The user inadvertently re-assigned the global variable $iSomeVar1, because this one is not named as &amp;quot;global&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
	; Display the value of $iSomeVar1.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;Value of $iSomeVar1: &amp;quot; &amp;amp; $iSomeVar1)&lt;br /&gt;
&lt;br /&gt;
	; Display the value of $iSomeVar2.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;Value of $iSomeVar2: &amp;quot; &amp;amp; $iSomeVar2)&lt;br /&gt;
&lt;br /&gt;
	; Display the value of $_iSomeVar2.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;Value of $_iSomeVar2: &amp;quot; &amp;amp; $_iSomeVar2)&lt;br /&gt;
EndFunc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A variable declared globally (with the Global keyword) is visible anywhere in the script.&lt;br /&gt;
Always declare your global variables in the global scope, not in the functions. It will prevent another function to use it before its declaration and the declaration is implicit (see [[#jumpsec1|examples]]).&lt;br /&gt;
&lt;br /&gt;
* A variable declared locally (with the Local keyword), has a visibility which depends of the scope where it&#039;s declared.&lt;br /&gt;
:Declaration in the global scope: the variable is nonetheless visible everywhere; declare it as Local if this one is only used in the same scope.&lt;br /&gt;
:Declaration in a function: the variable is visible by the function itself and nowhere else.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Structure of a code scope:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
; Global scope.&lt;br /&gt;
&lt;br /&gt;
; Include the Constants file, it contains various constants; it&#039;s needed here for the $MB_SYSTEMMODAL flag of the MsgBox function).&lt;br /&gt;
#include &amp;lt;MessageBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; This scope is either Global or Local, depending on where do you use the variables.&lt;br /&gt;
&lt;br /&gt;
; Assign a Global variable the number 0 (which corresponds to an initialization of a variable number), its scope is Global because it&#039;s used at least in one function.&lt;br /&gt;
Global $_iVar1 = 0&lt;br /&gt;
&lt;br /&gt;
; Assign a Local variable the string &amp;quot;foo&amp;quot;, its scope is Local because it&#039;s use is restricted to this scope.&lt;br /&gt;
Local $_sVar2 = &amp;quot;foo&amp;quot;&lt;br /&gt;
&lt;br /&gt;
; Display the content of $_sVar2&lt;br /&gt;
MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;Value of $sVar2: &amp;quot; &amp;amp; $_sVar2)&lt;br /&gt;
&lt;br /&gt;
; Re-assign a Local variable the string returned by the function _MyFunc1.&lt;br /&gt;
$_sVar2 = _MyFunc1()&lt;br /&gt;
&lt;br /&gt;
; Re-Display the content of $_sVar2&lt;br /&gt;
MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;Value of $sVar2: &amp;quot; &amp;amp; $_sVar2)&lt;br /&gt;
&lt;br /&gt;
; Declare a function (its main utility is described later in Functions, we can see one here which is to create a Local scope).&lt;br /&gt;
Func _MyFunc1()&lt;br /&gt;
	; Local scope.&lt;br /&gt;
&lt;br /&gt;
	; Display the content of $_iVar1.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;Value of $_iVar1: &amp;quot; &amp;amp; $_iVar1)&lt;br /&gt;
&lt;br /&gt;
	; Assign a Local variable the string &amp;quot;bar&amp;quot;, its scope is Local because it&#039;s use is restricted to the function&#039;s scope.&lt;br /&gt;
	Local $sVar3 = &amp;quot;bar&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	; Display the content of $sVar3.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;Value of $sVar3: &amp;quot; &amp;amp; $sVar3)&lt;br /&gt;
&lt;br /&gt;
	; Return the $sVar3 content, it will be visible (if used) to the scope where the function is called.&lt;br /&gt;
	Return $sVar3&lt;br /&gt;
EndFunc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Concerning the Dim keyword, its recommended usage is limited to empty an existing array:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
; Include the Array UDF, it&#039;s needed here for the _ArrayDisplay function.&lt;br /&gt;
#include &amp;lt;Array.au3&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
; Assign a Local variable an array containing numbers with a size of 5.&lt;br /&gt;
; Note than an array is based 0 index, to access the first element the code is: $aiArray[0].&lt;br /&gt;
Local $aArray[5] = [1, 2, 3, 4, 5]&lt;br /&gt;
 &lt;br /&gt;
; Display the contents.&lt;br /&gt;
_ArrayDisplay($aArray)&lt;br /&gt;
 &lt;br /&gt;
; Empty the array (and keep its size).&lt;br /&gt;
Dim $aArray[5]&lt;br /&gt;
 &lt;br /&gt;
; Display the contents.&lt;br /&gt;
_ArrayDisplay($aArray)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Remark: The variable type of the emptied array is a string, every variable non initialized is a string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And for the ReDim keyword, limit its use to resize an array you want to keep its content:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
; Include the Array UDF, it&#039;s needed here for the _ArrayDisplay function.&lt;br /&gt;
#include &amp;lt;Array.au3&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
; Assign a Local variable an array containing numbers with a size of 5.&lt;br /&gt;
; Note than an array is based 0 index, to access the first element the code is: $aiArray[0].&lt;br /&gt;
Local $aArray[5] = [1, 2, 3, 4, 5]&lt;br /&gt;
 &lt;br /&gt;
; Display the contents.&lt;br /&gt;
_ArrayDisplay($aArray)&lt;br /&gt;
 &lt;br /&gt;
; Resize the array (and keep its content).&lt;br /&gt;
Dim $aArray[3]&lt;br /&gt;
 &lt;br /&gt;
; Display the contents.&lt;br /&gt;
_ArrayDisplay($aArray)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why using Dim over Local/Global is not always a good option:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MessageBoxConstants.au3&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Dim $vVariableThatIsGlobal = &amp;quot;This is a variable that has &amp;quot;&amp;quot;Program Scope&amp;quot;&amp;quot; aka Global.&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;An example of why Dim can cause more problems than solve them.&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
Example()&lt;br /&gt;
 &lt;br /&gt;
Func Example()&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, $vVariableThatIsGlobal) ; That looks alright to me as it displays the following text: This is a variable that has &amp;quot;Program Scope&amp;quot; aka Global.&lt;br /&gt;
 &lt;br /&gt;
	Local $vReturn = SomeFunc() ; Call some random function.&lt;br /&gt;
 &lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, $vReturn, $vVariableThatIsGlobal) ; The Global variable ($vVariableThatIsGlobal) changed because I totally forgot I had a duplicate variable name in &amp;quot;SomeFunc&amp;quot;.&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
 &lt;br /&gt;
Func SomeFunc()&lt;br /&gt;
	; This should create a variable in Local scope if the variable name doesn&amp;quot;t already exist.&lt;br /&gt;
	; For argument sake I totally forgot that I declared a variable already with the same name.&lt;br /&gt;
	; Well I only want this to be changed in the function and not the variable at the top of the script.&lt;br /&gt;
	; Should be OK right? Think again.&lt;br /&gt;
	Dim $vVariableThatIsGlobal = &amp;quot;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
	For $i = 1 To 10&lt;br /&gt;
		$vVariableThatIsGlobal &amp;amp;= $i ; This will return 12345678910 totally wiping the previous contents of $vVariableThatIsGlobal.&lt;br /&gt;
	Next&lt;br /&gt;
	Return $vVariableThatIsGlobal&lt;br /&gt;
EndFunc   ;==&amp;gt;SomeFunc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;jumpsec1&amp;quot;&amp;gt;Declaring Global variables in a Function is never a good idea:&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MessageBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Calling Example() first will initialise the Global variable $vVariableThatIsGlobal and therefore calling SomeFunc() won&#039;t return an error.&lt;br /&gt;
; Now look at Example 2.&lt;br /&gt;
Example()&lt;br /&gt;
 &lt;br /&gt;
Func Example()&lt;br /&gt;
	; Declaring a variable in a function can cause serious problems, hence why all Global variables should be declared at the top of a script.&lt;br /&gt;
	Global $vVariableThatIsGlobal = &#039;This is a variable that has &#039;&#039;File Scope&#039;&#039; aka Global.&#039;&lt;br /&gt;
	SomeFunc()&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
 &lt;br /&gt;
Func SomeFunc()&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &#039;&#039;, $vVariableThatIsGlobal) ; As the variable was initialised this will not return an error.&lt;br /&gt;
EndFunc   ;==&amp;gt;SomeFunc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MessageBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Calling SomeFunc() first will bypass the Global variable $vVariableThatIsGlobal being initialised and therefore AutoIt has no idea of what data the variable&lt;br /&gt;
; $vVariableThatIsGlobal contains.&lt;br /&gt;
SomeFunc()&lt;br /&gt;
 &lt;br /&gt;
Func Example()&lt;br /&gt;
	; Declaring a variable in a function can cause serious problems, hence why all Global variables should be declared at the top of a script.&lt;br /&gt;
	Global $vVariableThatIsGlobal = &#039;This is a variable that has &#039;&#039;File Scope&#039;&#039; aka Global.&#039;&lt;br /&gt;
	SomeFunc()&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
 &lt;br /&gt;
Func SomeFunc()&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &#039;&#039;, $vVariableThatIsGlobal) ; As the variable wasn&#039;t initialised this will return an error of &amp;quot;variable used without being declared.&amp;quot;&lt;br /&gt;
EndFunc   ;==&amp;gt;SomeFunc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Declaring variables in loops (For, While, Do etc..) can have an affect on efficiency:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MessageBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Declaring variables inside loops should be avoided as the variable is re-declared on each repetition.&lt;br /&gt;
For $i = 1 To 10 ; $i is in &#039;loop scope.&#039;&lt;br /&gt;
	Local $iInt = $i&lt;br /&gt;
Next&lt;br /&gt;
MsgBox($MB_SYSTEMMODAL, &#039;&#039;, $iInt) ; This will display 10.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MessageBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Declaring variables outside of loops is more efficent in the long run.&lt;br /&gt;
Local $iInt = 0&lt;br /&gt;
For $i = 1 To 10 ; $i is in &#039;loop scope.&#039;&lt;br /&gt;
	$iInt = $i&lt;br /&gt;
Next&lt;br /&gt;
MsgBox($MB_SYSTEMMODAL, &#039;&#039;, $iInt) ; This will display 10.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is no requirement to declare the iteration count variable in a loop:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
; Correct&lt;br /&gt;
Local Const $iCount = 99&lt;br /&gt;
Local $aArray[$iCount]&lt;br /&gt;
For $i = 0 To UBound($iCount) - 1 ; $i is only used in the loop, so there is no requirement to declare it.&lt;br /&gt;
	$aArray[$i] = $i&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Incorrect&lt;br /&gt;
Local Const $iCount = 99&lt;br /&gt;
Local $aArray[$iCount]&lt;br /&gt;
Local $i ; This is only used to store the iteration count value in the loop and therefore doesn&#039;t need to be declared. This is known as loop scope.&lt;br /&gt;
For $i = 0 To UBound($iCount) - 1&lt;br /&gt;
	$aArray[$i] = $i&lt;br /&gt;
Next&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As you can see, there is the Const keyword in the example, we are going to talk about it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Const, Static, Enum ==&lt;br /&gt;
&lt;br /&gt;
=== Const ===&lt;br /&gt;
We won&#039;t talk about the advantages of a constant variable, they are neglibible (for your information, an autoit constant variable is marked as read-only and remains a variable as read-only when compiled).&lt;br /&gt;
&lt;br /&gt;
The Const keyword may be used in a first by some of you to avoid re-assignments.&lt;br /&gt;
The best way to use them is not this last case, the constants should be used for real static variables, meaning that their value won&#039;t change regardless to the instance of the program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
;Bad&lt;br /&gt;
Local Const $hGUI = GUICreate(&amp;quot;MyGUI&amp;quot;)&lt;br /&gt;
; The handle of the window is unique, it&#039;s generated by Windows and changes.&lt;br /&gt;
&lt;br /&gt;
;Good&lt;br /&gt;
Local Const $iMyAge = 19&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Magic Numbers ==&lt;br /&gt;
&lt;br /&gt;
Magic numbers are arbitrary numbers interspersed throughout a program&#039;s source code which do not have an associated identifier.  The downside to this is not being able to derive a meaning from the number. &lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
MsgBox(262144, &amp;quot;Magic Numbers&amp;quot;, &amp;quot;It&#039;s Adventure Time!&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the magic number is 262144 with the identifier being $MB_TOPMOST according to the helpfile.&lt;br /&gt;
&lt;br /&gt;
More coming soon :)&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11879</id>
		<title>StringRegExp</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11879"/>
		<updated>2013-08-19T14:21:55Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
==Description==&lt;br /&gt;
Check if a string fits a given regular expression pattern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
StringRegExp ( &amp;quot;test&amp;quot;, &amp;quot;pattern&amp;quot; [, flag = 0 [, offset = 1]] )&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| test || The string to check&lt;br /&gt;
|-&lt;br /&gt;
| pattern || The regular expression to compare.&lt;br /&gt;
|-&lt;br /&gt;
| flag || &#039;&#039;&#039;[optional]&#039;&#039;&#039; A number to indicate how the function behaves.  See below for details.  The default is 0.&lt;br /&gt;
|-&lt;br /&gt;
| offset || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The string position to start the match (starts at 1)  The default is 1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Flag&#039;&#039;&#039; || &#039;&#039;&#039;Values&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Returns 1 (matched) or 0 (no match)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Return array of matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Return array of matches including the full match (Perl / PHP style).&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Return array of global matches.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Return an array of arrays containing global matches including the full match (Perl / PHP style).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
&#039;&#039;Flag = 0 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| @error || Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 2  || Bad pattern. @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 1 or 2 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| @error || Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.  Check @extended for next offset&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 3 or 4 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
| @error || Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Remarks==&lt;br /&gt;
The flag parameter can have one of 5 values (0 through 4).  0 gives a true (1) or false (0) as to whether the pattern was found or not.  1 and 2 find the first match and returns it in an array.  3 and 4 find multiple hits and fills the array with all the matching text.  2 and 4 include the full matching text as the first record, not just the capturing groups, which is all you get with flag 1 and 3.&lt;br /&gt;
&lt;br /&gt;
Regular expression notation is a compact way of specifying a pattern for strings that can be searched.  Regular expressions are character strings in which plain text characters indicate what text should exist in the target string, and a some characters are given special meanings to indicate what variability is allowed in the target string.  AutoIt regular expressions are normally case-sensitive.&lt;br /&gt;
&lt;br /&gt;
Regular expressions are constructed of one or more of the following simple regular expression specifiers.  If the character is not in the following table, then it will match only itself.&lt;br /&gt;
&lt;br /&gt;
Repeating characters (*, +, ?, {...} ) will try to match the largest set possible, which allows the following characters to match as well, unless followed immediately by a question mark; then it will find the smallest pattern that allows the following characters to match as well.&lt;br /&gt;
&lt;br /&gt;
Nested groups are allowed, but keep in mind that all the groups, except non-capturing groups, assign to the returned array, with the outer groups assigning after the inner groups.&lt;br /&gt;
&lt;br /&gt;
Complete description can be found &#039;&#039;&#039;[http://www.autoitscript.com/autoit3/pcrepattern.html here]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution&#039;&#039;&#039;: bad regular expressions can produce a quasi-infinite loop hogging the CPU, and can even cause a crash.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;Matching Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [ ... ] || Match any character in the set.  e.g. &#039;&#039;&#039;[aeiou]&#039;&#039;&#039; matches any lower-case vowel.  A contiguous set can be defined using a dash between the starting and ending characters.  e.g. &#039;&#039;&#039;[a-z]&#039;&#039;&#039; matches any lower case character.  To include a dash (&#039;&#039;&#039;-&#039;&#039;&#039;) in a set, use it as the first or last character of the set.  To include a closing bracket in a set, use it as the first character of the set.  e.g. &#039;&#039;&#039;[][]&#039;&#039;&#039; will match either [ or ].  Note that special characters &#039;&#039;&#039;do not&#039;&#039;&#039; retain their special meanings inside a set, with the exception of &#039;&#039;&#039;\\&#039;&#039;&#039;,  &#039;&#039;&#039;\^&#039;&#039;&#039;, &#039;&#039;&#039;\-&#039;&#039;&#039;,&#039;&#039;&#039;\[&#039;&#039;&#039; and &#039;&#039;&#039;\]&#039;&#039;&#039; match the escaped character inside a set.&lt;br /&gt;
|-&lt;br /&gt;
| [^ ... ] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the set.  e.g. &#039;&#039;&#039;[^0-9]&#039;&#039;&#039; matches any non-digit.  To include a caret (&#039;&#039;&#039;^&#039;&#039;&#039;) in a set, put it after the beginning of the set or escape it (\^).&lt;br /&gt;
|-&lt;br /&gt;
| [:class:] || Match a character in the given class of characters.  Valid classes are: alpha (any alphabetic character), alnum (any alphanumeric character), lower (any lower-case letter), upper (any upper-case letter), digit (any decimal digit 0-9), xdigit (any hexadecimal digit, 0-9, A-F, a-f), space (any whitespace character), blank (only a space or tab), print (any printable character), graph (any printable character except spaces), cntrl (any control character [ascii 127 or &amp;lt;32]) or punct (any punctuation character). So [0-9] is equivalent to &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;:digit:&amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| [^:class:] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the class, but only if the first character.&lt;br /&gt;
|-&lt;br /&gt;
| ( ... ) || Group. The elements in the group are treated in order and can be repeated together.  e.g. &#039;&#039;&#039;(ab)+&#039;&#039;&#039; will match &amp;quot;ab&amp;quot; or &amp;quot;abab&amp;quot;, but not &amp;quot;aba&amp;quot;.  A group will also store the text matched for use in back-references and in the array returned by the function, depending on flag value.&lt;br /&gt;
|-&lt;br /&gt;
| (?#....) || comment (not nestable).&lt;br /&gt;
|-&lt;br /&gt;
| (?i) || Case-insensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-insensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i) || (default) Case-sensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-sensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?: ... ) || Non-capturing group.  Behaves just like a normal group, but does not record the matching characters in the array nor can the matched text be used for back-referencing.&lt;br /&gt;
|-&lt;br /&gt;
| (?i: ... ) || Case-insensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-insensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i: ... ) || Case-sensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-sensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?J) || allow duplicate names.&lt;br /&gt;
|-&lt;br /&gt;
| (?m) || ^ and $ match newlines within data.&lt;br /&gt;
|-&lt;br /&gt;
| (?s) || . matches anything including newline. (by default &amp;quot;.&amp;quot; don&#039;t match newline)&lt;br /&gt;
|-&lt;br /&gt;
| (?U) || Invert greediness of quantifiers.&lt;br /&gt;
|-&lt;br /&gt;
| (?x) || Ignore whitespace and # comments.&lt;br /&gt;
|-&lt;br /&gt;
| (?-...) || unset option(s).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;.&#039;&#039;&#039; || Match any single character (except newline).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; || Or.  The expression on one side &#039;&#039;&#039;or&#039;&#039;&#039; the other can be matched.&lt;br /&gt;
|-&lt;br /&gt;
| \ || &#039;&#039;Escape&#039;&#039; a special character (have it match the actual character) or introduce a special character type (see below).&lt;br /&gt;
|-&lt;br /&gt;
| \\ || Match an actual backslash (\).&lt;br /&gt;
|-&lt;br /&gt;
| \a || Alarm, that is, the BEL character ([[Chr]](7)).&lt;br /&gt;
|-&lt;br /&gt;
| \A || Match only at beginning of string.&lt;br /&gt;
|-&lt;br /&gt;
| \b || Matches at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \B || Matches when not at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \c || Match a control character, based on the next character.  For example, &#039;&#039;&#039;\cM&#039;&#039;&#039; matches ctrl-M.&lt;br /&gt;
|-&lt;br /&gt;
| \d || Match any digit (0-9).&lt;br /&gt;
|-&lt;br /&gt;
| \D || Match any non-digit.&lt;br /&gt;
|-&lt;br /&gt;
| \e || Match an escape character ([[Chr]](27)).&lt;br /&gt;
|-&lt;br /&gt;
| \E || end case modification.&lt;br /&gt;
|-&lt;br /&gt;
| \f || Match an formfeed character ([[Chr]](12)).&lt;br /&gt;
|-&lt;br /&gt;
| \G || first matching position in subject.&lt;br /&gt;
|-&lt;br /&gt;
| \h || any horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \H || any character that is not a horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \n || Match a linefeed (@LF, [[Chr]](10)).&lt;br /&gt;
|-&lt;br /&gt;
| \K || reset start of match.&lt;br /&gt;
|-&lt;br /&gt;
| \N || a character that is not a newline&lt;br /&gt;
|-&lt;br /&gt;
| \Q || quote (disable) pattern metacharacters till \E.&lt;br /&gt;
|-&lt;br /&gt;
| \r || Match a carriage return (@CR, [[Chr]](13)).&lt;br /&gt;
|-&lt;br /&gt;
| \R || a newline sequence.&lt;br /&gt;
|-&lt;br /&gt;
| \s || Match any whitespace character: [[Chr]](9) through [[Chr]](13) which are Horizontal Tab, Line Feed, Vertical Tab, Form Feed, and Carriage Return, and the standard space ( [[Chr]](32) ).&lt;br /&gt;
|-&lt;br /&gt;
| \S || Match any non-whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \t || Match a tab character ([[Chr]](9)).&lt;br /&gt;
|-&lt;br /&gt;
| \v || any vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \V || any character that is not a vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \w || Match any &amp;quot;word&amp;quot; character: a-z, A-Z, 0-9 or underscore (_).&lt;br /&gt;
|-&lt;br /&gt;
| \W || Match any non-word character.&lt;br /&gt;
|-&lt;br /&gt;
| \X || A Unicode extended grapheme cluster, that is an unbreakable sequence of codepoints which represent a single character for the user.&lt;br /&gt;
|-&lt;br /&gt;
| \ddd || Match character with octal code ddd, or backreference if found. Match the prior group number given exactly. For example, &#039;&#039;&#039;([:alpha:])\1&#039;&#039;&#039; would match a double letter.&lt;br /&gt;
|-&lt;br /&gt;
| \xhh || character with hex code hh.&lt;br /&gt;
|-&lt;br /&gt;
| \x{hhh..} || Match character with hex code hhh..&lt;br /&gt;
|-&lt;br /&gt;
| \z || Match only at end of string.&lt;br /&gt;
|-&lt;br /&gt;
| \Z || Match only at end of string, or before newline at the end.&lt;br /&gt;
|-&lt;br /&gt;
| (?= ... ) || Positive look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;= ... ) || Positive look behind.&lt;br /&gt;
|-&lt;br /&gt;
| (?! ... ) || Negative look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;! ... ) || Negative look behind.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Repeating Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group exactly &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;,} || Repeat the previous character, set or group at least &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {0,&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group at most &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;} || Repeat the previous character, set or group between &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; times, inclusive.&lt;br /&gt;
|-&lt;br /&gt;
| * || Repeat the previous character, set or group 0 or more times.  Equivalent to {0,}&lt;br /&gt;
|-&lt;br /&gt;
| + || Repeat the previous character, set or group 1 or more times.  Equivalent to {1,}&lt;br /&gt;
|-&lt;br /&gt;
| ? || The previous character, set or group may or may not appear.  Equivalent to {0, 1}&lt;br /&gt;
|-&lt;br /&gt;
| ? (after a repeating character) || Find the smallest match instead of the largest.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Character Classes&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [:alnum:] || letters and digits (same as [0-9A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:alpha:] || letters (same as [A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:ascii:] || character codes (same as [[Chr]](0) ... [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:blank:] || space or tab only (same as [[Chr]](9) and [[Chr]](32))&lt;br /&gt;
|-&lt;br /&gt;
| [:cntrl:] || control characters (same as [[Chr]](0) ... [[Chr]](31) and [[Chr]](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:digit:] || decimal digits (same as \d or [0-9])&lt;br /&gt;
|-&lt;br /&gt;
| [:graph:] || printing characters, excluding space (same as [[Chr]](33) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:lower:] || lower case letters (same as [a-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:print:] || printing characters, including space (same as [[Chr]](32) ... [[Chr]](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:punct:] || printing characters, excluding [:alnum:] and [:cntrl:], (33-47, 58-64, 91-96, 123-126)&lt;br /&gt;
|-&lt;br /&gt;
| [:space:] || white space (not quite the same as \s, it includes VT: [[Chr]](11)) (same as [\f\n\r\t\v ])&lt;br /&gt;
|-&lt;br /&gt;
| [:upper:] || upper case letters (same as [A-Z])&lt;br /&gt;
|-&lt;br /&gt;
| [:word:] || &amp;quot;word&amp;quot; characters (same as \w)&lt;br /&gt;
|-&lt;br /&gt;
| [:xdigit:] || hexadecimal digits (same as [0-9A-Fa-f])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;General comments about UTF-8 mode&#039;&#039;&#039;&amp;lt;/u&amp;gt; (use internaly by AutoIt to translate pattern) :&lt;br /&gt;
&lt;br /&gt;
	1. An unbraced hexadecimal escape sequence (such as \xb3) matches a two-byte UTF-8 character if the value is greater than 127.&lt;br /&gt;
&lt;br /&gt;
	2. Octal numbers up to \777 are recognized, and match two-byte UTF-8 characters for values greater than \177.&lt;br /&gt;
&lt;br /&gt;
	3. Repeat quantifiers apply to complete UTF-8 characters, not to individual bytes, for example: \x{100}{3}.&lt;br /&gt;
&lt;br /&gt;
	4. The dot metacharacter matches one UTF-8 character instead of a single byte.&lt;br /&gt;
&lt;br /&gt;
	5. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly test characters of any code value, but the characters that PCRE recognizes as digits, spaces, or word characters remain the same set as before, all with values less than 256. Note that this also applies to \b, because it is defined in terms of \w and \W.&lt;br /&gt;
&lt;br /&gt;
	6. Similarly, characters that match the POSIX named character classes are all low-valued characters.&lt;br /&gt;
&lt;br /&gt;
	7. However, the Perl 5.10 horizontal and vertical whitespace matching escapes (\h, \H, \v, and \V) do match all the appropriate Unicode characters.&lt;br /&gt;
&lt;br /&gt;
	8. Case-insensitive matching applies only to characters whose values are less than 128. PCRE supports case-insensitive matching only when there is a one-to-one mapping between a letter&#039;s cases. There are a small number of many-to-one mappings in Unicode; these are not supported by PCRE.&lt;br /&gt;
&lt;br /&gt;
See also the &amp;lt;a href=&amp;quot;../tutorials/regexp/regexp.htm&amp;quot;&amp;gt;Regular Expression&amp;lt;/a&amp;gt; tutorial, in which you can run a script to test your regular expression(s).&lt;br /&gt;
&lt;br /&gt;
==Related==&lt;br /&gt;
[[StringInStr]], [[StringRegExpReplace]]&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Option 1, using offset&lt;br /&gt;
Local $nOffset = 1&lt;br /&gt;
&lt;br /&gt;
Local $aArray&lt;br /&gt;
While 1&lt;br /&gt;
	$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 1, $nOffset)&lt;br /&gt;
&lt;br /&gt;
	If @error = 0 Then&lt;br /&gt;
		$nOffset = @extended&lt;br /&gt;
	Else&lt;br /&gt;
		ExitLoop&lt;br /&gt;
	EndIf&lt;br /&gt;
	For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 1 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
	Next&lt;br /&gt;
WEnd&lt;br /&gt;
&lt;br /&gt;
; Option 2, single return, php/preg_match() style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 2)&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 2 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 3, global return, old AutoIt style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 3)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 3 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 4, global return, php/preg_match_all() style&lt;br /&gt;
$aArray = StringRegExp(&#039;F1oF2oF3o&#039;, &#039;(F.o)*?&#039;, 4)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
&lt;br /&gt;
	Local $match = $aArray[$i]&lt;br /&gt;
	For $j = 0 To UBound($match) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 4 - &amp;quot; &amp;amp; $i &amp;amp; &#039;,&#039; &amp;amp; $j, $match[$j])&lt;br /&gt;
	Next&lt;br /&gt;
Next&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11877</id>
		<title>StringRegExp</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=StringRegExp&amp;diff=11877"/>
		<updated>2013-08-19T04:51:25Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: Created page with &amp;quot;&amp;lt;!-- Autogenerated Wiki Page. See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt; ==Description== Check if a string f...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Autogenerated Wiki Page. See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/--&amp;gt;&lt;br /&gt;
==Description==&lt;br /&gt;
Check if a string fits a given regular expression pattern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
StringRegExp ( &amp;quot;test&amp;quot;, &amp;quot;pattern&amp;quot; [, flag = 0 [, offset = 1]] )&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| test || The string to check&lt;br /&gt;
|-&lt;br /&gt;
| pattern || The regular expression to compare.&lt;br /&gt;
|-&lt;br /&gt;
| flag || &#039;&#039;&#039;[optional]&#039;&#039;&#039; A number to indicate how the function behaves.  See below for details.  The default is 0.&lt;br /&gt;
|-&lt;br /&gt;
| offset || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The string position to start the match (starts at 1)  The default is 1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Flag&#039;&#039;&#039; || &#039;&#039;&#039;Values&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Returns 1 (matched) or 0 (no match)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Return array of matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Return array of matches including the full match (Perl / PHP style).&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Return array of global matches.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Return an array of arrays containing global matches including the full match (Perl / PHP style).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
&#039;&#039;Flag = 0 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 2  || Bad pattern. @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 1 or 2 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.  Check @extended for next offset&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Flag = 3 or 4 :&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! | @error:&lt;br /&gt;
! | Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Array is valid.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Array is invalid.  No matches.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Bad pattern, array is invalid.  @extended = offset of error in pattern.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Remarks==&lt;br /&gt;
The flag parameter can have one of 5 values (0 through 4).  0 gives a true (1) or false (0) as to whether the pattern was found or not.  1 and 2 find the first match and returns it in an array.  3 and 4 find multiple hits and fills the array with all the matching text.  2 and 4 include the full matching text as the first record, not just the capturing groups, which is all you get with flag 1 and 3.&lt;br /&gt;
&lt;br /&gt;
Regular expression notation is a compact way of specifying a pattern for strings that can be searched.  Regular expressions are character strings in which plain text characters indicate what text should exist in the target string, and a some characters are given special meanings to indicate what variability is allowed in the target string.  AutoIt regular expressions are normally case-sensitive.&lt;br /&gt;
&lt;br /&gt;
Regular expressions are constructed of one or more of the following simple regular expression specifiers.  If the character is not in the following table, then it will match only itself.&lt;br /&gt;
&lt;br /&gt;
Repeating characters (*, +, ?, {...} ) will try to match the largest set possible, which allows the following characters to match as well, unless followed immediately by a question mark; then it will find the smallest pattern that allows the following characters to match as well.&lt;br /&gt;
&lt;br /&gt;
Nested groups are allowed, but keep in mind that all the groups, except non-capturing groups, assign to the returned array, with the outer groups assigning after the inner groups.&lt;br /&gt;
&lt;br /&gt;
Complete description can be found &#039;&#039;&#039;[http://www.autoitscript.com/autoit3/pcrepattern.html here]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution&#039;&#039;&#039;: bad regular expressions can produce a quasi-infinite loop hogging the CPU, and can even cause a crash.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;Matching Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [ ... ] || Match any character in the set.  e.g. &#039;&#039;&#039;[aeiou]&#039;&#039;&#039; matches any lower-case vowel.  A contiguous set can be defined using a dash between the starting and ending characters.  e.g. &#039;&#039;&#039;[a-z]&#039;&#039;&#039; matches any lower case character.  To include a dash (&#039;&#039;&#039;-&#039;&#039;&#039;) in a set, use it as the first or last character of the set.  To include a closing bracket in a set, use it as the first character of the set.  e.g. &#039;&#039;&#039;[][]&#039;&#039;&#039; will match either [ or ].  Note that special characters &#039;&#039;&#039;do not&#039;&#039;&#039; retain their special meanings inside a set, with the exception of &#039;&#039;&#039;\\&#039;&#039;&#039;,  &#039;&#039;&#039;\^&#039;&#039;&#039;, &#039;&#039;&#039;\-&#039;&#039;&#039;,&#039;&#039;&#039;\[&#039;&#039;&#039; and &#039;&#039;&#039;\]&#039;&#039;&#039; match the escaped character inside a set.&lt;br /&gt;
|-&lt;br /&gt;
| [^ ... ] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the set.  e.g. &#039;&#039;&#039;[^0-9]&#039;&#039;&#039; matches any non-digit.  To include a caret (&#039;&#039;&#039;^&#039;&#039;&#039;) in a set, put it after the beginning of the set or escape it (\^).&lt;br /&gt;
|-&lt;br /&gt;
| [:class:] || Match a character in the given class of characters.  Valid classes are: alpha (any alphabetic character), alnum (any alphanumeric character), lower (any lower-case letter), upper (any upper-case letter), digit (any decimal digit 0-9), xdigit (any hexadecimal digit, 0-9, A-F, a-f), space (any whitespace character), blank (only a space or tab), print (any printable character), graph (any printable character except spaces), cntrl (any control character [ascii 127 or &amp;lt;32]) or punct (any punctuation character). So [0-9] is equivalent to &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;:digit:&amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| [^:class:] || Match any character &#039;&#039;&#039;not&#039;&#039;&#039; in the class, but only if the first character.&lt;br /&gt;
|-&lt;br /&gt;
| ( ... ) || Group. The elements in the group are treated in order and can be repeated together.  e.g. &#039;&#039;&#039;(ab)+&#039;&#039;&#039; will match &amp;quot;ab&amp;quot; or &amp;quot;abab&amp;quot;, but not &amp;quot;aba&amp;quot;.  A group will also store the text matched for use in back-references and in the array returned by the function, depending on flag value.&lt;br /&gt;
|-&lt;br /&gt;
| (?#....) || comment (not nestable).&lt;br /&gt;
|-&lt;br /&gt;
| (?i) || Case-insensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-insensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i) || (default) Case-sensitivity flag.  This does not operate as a group.  It tells the regular expression engine to do case-sensitive matching from that point on.&lt;br /&gt;
|-&lt;br /&gt;
| (?: ... ) || Non-capturing group.  Behaves just like a normal group, but does not record the matching characters in the array nor can the matched text be used for back-referencing.&lt;br /&gt;
|-&lt;br /&gt;
| (?i: ... ) || Case-insensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-insensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?-i: ... ) || Case-sensitive non-capturing group.  Behaves just like a non-capturing group, but performs case-sensitive matches within the group.&lt;br /&gt;
|-&lt;br /&gt;
| (?J) || allow duplicate names.&lt;br /&gt;
|-&lt;br /&gt;
| (?m) || ^ and $ match newlines within data.&lt;br /&gt;
|-&lt;br /&gt;
| (?s) || . matches anything including newline. (by default &amp;quot;.&amp;quot; don&#039;t match newline)&lt;br /&gt;
|-&lt;br /&gt;
| (?U) || Invert greediness of quantifiers.&lt;br /&gt;
|-&lt;br /&gt;
| (?x) || Ignore whitespace and # comments.&lt;br /&gt;
|-&lt;br /&gt;
| (?-...) || unset option(s).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;.&#039;&#039;&#039; || Match any single character (except newline).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; || Or.  The expression on one side &#039;&#039;&#039;or&#039;&#039;&#039; the other can be matched.&lt;br /&gt;
|-&lt;br /&gt;
| \ || &#039;&#039;Escape&#039;&#039; a special character (have it match the actual character) or introduce a special character type (see below).&lt;br /&gt;
|-&lt;br /&gt;
| \\ || Match an actual backslash (\).&lt;br /&gt;
|-&lt;br /&gt;
| \a || Alarm, that is, the BEL character ([Chr](7)).&lt;br /&gt;
|-&lt;br /&gt;
| \A || Match only at beginning of string.&lt;br /&gt;
|-&lt;br /&gt;
| \b || Matches at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \B || Matches when not at a word boundary.&lt;br /&gt;
|-&lt;br /&gt;
| \c || Match a control character, based on the next character.  For example, &#039;&#039;&#039;\cM&#039;&#039;&#039; matches ctrl-M.&lt;br /&gt;
|-&lt;br /&gt;
| \d || Match any digit (0-9).&lt;br /&gt;
|-&lt;br /&gt;
| \D || Match any non-digit.&lt;br /&gt;
|-&lt;br /&gt;
| \e || Match an escape character ([Chr](27)).&lt;br /&gt;
|-&lt;br /&gt;
| \E || end case modification.&lt;br /&gt;
|-&lt;br /&gt;
| \f || Match an formfeed character ([Chr](12)).&lt;br /&gt;
|-&lt;br /&gt;
| \G || first matching position in subject.&lt;br /&gt;
|-&lt;br /&gt;
| \h || any horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \H || any character that is not a horizontal whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \n || Match a linefeed (@LF, [Chr](10)).&lt;br /&gt;
|-&lt;br /&gt;
| \K || reset start of match.&lt;br /&gt;
|-&lt;br /&gt;
| \N || a character that is not a newline&lt;br /&gt;
|-&lt;br /&gt;
| \Q || quote (disable) pattern metacharacters till \E.&lt;br /&gt;
|-&lt;br /&gt;
| \r || Match a carriage return (@CR, [Chr](13)).&lt;br /&gt;
|-&lt;br /&gt;
| \R || a newline sequence.&lt;br /&gt;
|-&lt;br /&gt;
| \s || Match any whitespace character: [Chr](9) through [Chr](13) which are Horizontal Tab, Line Feed, Vertical Tab, Form Feed, and Carriage Return, and the standard space ( [Chr](32) ).&lt;br /&gt;
|-&lt;br /&gt;
| \S || Match any non-whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \t || Match a tab character ([Chr](9)).&lt;br /&gt;
|-&lt;br /&gt;
| \v || any vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \V || any character that is not a vertical whitespace character.&lt;br /&gt;
|-&lt;br /&gt;
| \w || Match any &amp;quot;word&amp;quot; character: a-z, A-Z, 0-9 or underscore (_).&lt;br /&gt;
|-&lt;br /&gt;
| \W || Match any non-word character.&lt;br /&gt;
|-&lt;br /&gt;
| \X || A Unicode extended grapheme cluster, that is an unbreakable sequence of codepoints which represent a single character for the user.&lt;br /&gt;
|-&lt;br /&gt;
| \ddd || Match character with octal code ddd, or backreference if found. Match the prior group number given exactly. For example, &#039;&#039;&#039;([:alpha:])\1&#039;&#039;&#039; would match a double letter.&lt;br /&gt;
|-&lt;br /&gt;
| \xhh || character with hex code hh.&lt;br /&gt;
|-&lt;br /&gt;
| \x{hhh..} || Match character with hex code hhh..&lt;br /&gt;
|-&lt;br /&gt;
| \z || Match only at end of string.&lt;br /&gt;
|-&lt;br /&gt;
| \Z || Match only at end of string, or before newline at the end.&lt;br /&gt;
|-&lt;br /&gt;
| (?= ... ) || Positive look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;= ... ) || Positive look behind.&lt;br /&gt;
|-&lt;br /&gt;
| (?! ... ) || Negative look ahead.&lt;br /&gt;
|-&lt;br /&gt;
| (?&amp;amp;lt;! ... ) || Negative look behind.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Repeating Characters&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group exactly &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;,} || Repeat the previous character, set or group at least &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {0,&#039;&#039;x&#039;&#039;} || Repeat the previous character, set or group at most &#039;&#039;x&#039;&#039; times.&lt;br /&gt;
|-&lt;br /&gt;
| {&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;} || Repeat the previous character, set or group between &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; times, inclusive.&lt;br /&gt;
|-&lt;br /&gt;
| * || Repeat the previous character, set or group 0 or more times.  Equivalent to {0,}&lt;br /&gt;
|-&lt;br /&gt;
| + || Repeat the previous character, set or group 1 or more times.  Equivalent to {1,}&lt;br /&gt;
|-&lt;br /&gt;
| ? || The previous character, set or group may or may not appear.  Equivalent to {0, 1}&lt;br /&gt;
|-&lt;br /&gt;
| ? (after a repeating character) || Find the smallest match instead of the largest.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Character Classes&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [:alnum:] || letters and digits (same as [0-9A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:alpha:] || letters (same as [A-Za-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:ascii:] || character codes (same as [Chr](0) ... [Chr](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:blank:] || space or tab only (same as [Chr](9) and [Chr](32))&lt;br /&gt;
|-&lt;br /&gt;
| [:cntrl:] || control characters (same as [Chr](0) ... [Chr](31) and [Chr](127))&lt;br /&gt;
|-&lt;br /&gt;
| [:digit:] || decimal digits (same as \d or [0-9])&lt;br /&gt;
|-&lt;br /&gt;
| [:graph:] || printing characters, excluding space (same as [Chr](33) ... [Chr](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:lower:] || lower case letters (same as [a-z])&lt;br /&gt;
|-&lt;br /&gt;
| [:print:] || printing characters, including space (same as [Chr](32) ... [Chr](126))&lt;br /&gt;
|-&lt;br /&gt;
| [:punct:] || printing characters, excluding [:alnum:] and [:cntrl:], (33-47, 58-64, 91-96, 123-126)&lt;br /&gt;
|-&lt;br /&gt;
| [:space:] || white space (not quite the same as \s, it includes VT: [Chr](11)) (same as [\f\n\r\t\v ])&lt;br /&gt;
|-&lt;br /&gt;
| [:upper:] || upper case letters (same as [A-Z])&lt;br /&gt;
|-&lt;br /&gt;
| [:word:] || &amp;quot;word&amp;quot; characters (same as \w)&lt;br /&gt;
|-&lt;br /&gt;
| [:xdigit:] || hexadecimal digits (same as [0-9A-Fa-f])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;General comments about UTF-8 mode&#039;&#039;&#039;&amp;lt;/u&amp;gt; (use internaly by AutoIt to translate pattern) :&lt;br /&gt;
&lt;br /&gt;
	1. An unbraced hexadecimal escape sequence (such as \xb3) matches a two-byte UTF-8 character if the value is greater than 127.&lt;br /&gt;
&lt;br /&gt;
	2. Octal numbers up to \777 are recognized, and match two-byte UTF-8 characters for values greater than \177.&lt;br /&gt;
&lt;br /&gt;
	3. Repeat quantifiers apply to complete UTF-8 characters, not to individual bytes, for example: \x{100}{3}.&lt;br /&gt;
&lt;br /&gt;
	4. The dot metacharacter matches one UTF-8 character instead of a single byte.&lt;br /&gt;
&lt;br /&gt;
	5. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly test characters of any code value, but the characters that PCRE recognizes as digits, spaces, or word characters remain the same set as before, all with values less than 256. Note that this also applies to \b, because it is defined in terms of \w and \W.&lt;br /&gt;
&lt;br /&gt;
	6. Similarly, characters that match the POSIX named character classes are all low-valued characters.&lt;br /&gt;
&lt;br /&gt;
	7. However, the Perl 5.10 horizontal and vertical whitespace matching escapes (\h, \H, \v, and \V) do match all the appropriate Unicode characters.&lt;br /&gt;
&lt;br /&gt;
	8. Case-insensitive matching applies only to characters whose values are less than 128. PCRE supports case-insensitive matching only when there is a one-to-one mapping between a letter&#039;s cases. There are a small number of many-to-one mappings in Unicode; these are not supported by PCRE.&lt;br /&gt;
&lt;br /&gt;
See also the &amp;lt;a href=&amp;quot;../tutorials/regexp/regexp.htm&amp;quot;&amp;gt;Regular Expression&amp;lt;/a&amp;gt; tutorial, in which you can run a script to test your regular expression(s).&lt;br /&gt;
&lt;br /&gt;
==Related==&lt;br /&gt;
[StringInStr], [StringRegExpReplace]&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Option 1, using offset&lt;br /&gt;
Local $nOffset = 1&lt;br /&gt;
&lt;br /&gt;
Local $aArray&lt;br /&gt;
While 1&lt;br /&gt;
	$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 1, $nOffset)&lt;br /&gt;
&lt;br /&gt;
	If @error = 0 Then&lt;br /&gt;
		$nOffset = @extended&lt;br /&gt;
	Else&lt;br /&gt;
		ExitLoop&lt;br /&gt;
	EndIf&lt;br /&gt;
	For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 1 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
	Next&lt;br /&gt;
WEnd&lt;br /&gt;
&lt;br /&gt;
; Option 2, single return, php/preg_match() style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 2)&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 2 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 3, global return, old AutoIt style&lt;br /&gt;
$aArray = StringRegExp(&#039;&amp;lt;test&amp;gt;a&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;b&amp;lt;/test&amp;gt; &amp;lt;test&amp;gt;c&amp;lt;/Test&amp;gt;&#039;, &#039;&amp;lt;(?i)test&amp;gt;(.*?)&amp;lt;/(?i)test&amp;gt;&#039;, 3)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 3 - &amp;quot; &amp;amp; $i, $aArray[$i])&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
; Option 4, global return, php/preg_match_all() style&lt;br /&gt;
$aArray = StringRegExp(&#039;F1oF2oF3o&#039;, &#039;(F.o)*?&#039;, 4)&lt;br /&gt;
&lt;br /&gt;
For $i = 0 To UBound($aArray) - 1&lt;br /&gt;
&lt;br /&gt;
	Local $match = $aArray[$i]&lt;br /&gt;
	For $j = 0 To UBound($match) - 1&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;RegExp Test with Option 4 - &amp;quot; &amp;amp; $i &amp;amp; &#039;,&#039; &amp;amp; $j, $match[$j])&lt;br /&gt;
	Next&lt;br /&gt;
Next&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=GUIRegisterMsg&amp;diff=11876</id>
		<title>GUIRegisterMsg</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=GUIRegisterMsg&amp;diff=11876"/>
		<updated>2013-08-18T14:01:13Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
Register a user defined function for a known Windows Message ID (WM_MSG).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GUIRegisterMsg ( msgID, &amp;quot;function&amp;quot; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{| border=&#039;1&#039; class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| msgID || A Windows Message ID (see Appendix: [[Windows Message Codes]]).&lt;br /&gt;
|-&lt;br /&gt;
| function || The name of the user function to call when the message appears or an empty string &amp;quot;&amp;quot; to unregister a message.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
{|&lt;br /&gt;
| Success: || 	1&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Remarks==&lt;br /&gt;
To make the user function workable you have to define it with &#039;&#039;&#039;maximum 4 function parameters&#039;&#039;&#039; otherwise the function won&#039;t be called!&lt;br /&gt;
&lt;br /&gt;
i.e:&lt;br /&gt;
Func MyUserFunction($hWndGUI, $MsgID, $WParam, $LParam)&lt;br /&gt;
...&lt;br /&gt;
EndFunc&lt;br /&gt;
&lt;br /&gt;
Or&lt;br /&gt;
&lt;br /&gt;
Func MyUserFunction($hWndGUI, $MsgID)&lt;br /&gt;
...&lt;br /&gt;
EndFunc&lt;br /&gt;
&lt;br /&gt;
When the user function is called then these 4 parameters have the following values:&lt;br /&gt;
&lt;br /&gt;
{| border=&#039;1&#039; class=&#039;wikitable&#039;&lt;br /&gt;
! scope=&#039;col&#039; | &#039;&#039;&#039;Position&#039;&#039;&#039;&lt;br /&gt;
! scope=&#039;col&#039; | &#039;&#039;&#039;Parameter&#039;&#039;&#039;&lt;br /&gt;
! scope=&#039;col&#039; | &#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || hWnd || The Window handle of the GUI in which the message appears. &lt;br /&gt;
|-&lt;br /&gt;
| 2 || Msg || The Windows message ID. &lt;br /&gt;
|-&lt;br /&gt;
| 3 || wParam || The first message parameter as hex value. &lt;br /&gt;
|-&lt;br /&gt;
| 4 || lParam || The second message parameter as hex value. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Up to 256 user functions can be registered for message IDs.&lt;br /&gt;
&lt;br /&gt;
By default after finishing the user function the AutoIt internal message handler will be proceed.&lt;br /&gt;
That won&#039;t be if your &#039;&#039;&#039;Return&#039;&#039;&#039; a value (See WM_COMMAND in example) or if you use the keyword &#039;Return&#039; without any value.&lt;br /&gt;
By using &#039;Return&#039; without any return value the AutoIt internal message handler (if there is one for this message) will NOT be proceed!&lt;br /&gt;
&lt;br /&gt;
If you want AutoIt to run its internal handler for a message, return the variable &#039;&#039;&#039;$GUI_RUNDEFMSG&#039;&#039;&#039; (in GUIConstantsEx.au3) from the function (see also examples)!&lt;br /&gt;
&lt;br /&gt;
I.e. if you want to return earlier than the user function ends and also proceed the AutoIt internal message handler.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; blocking of running user functions which executes window messages with commands such as &amp;quot;[[MsgBox]]&amp;quot; can lead to unexpected behavior, the return to the system should be as fast as possible!&lt;br /&gt;
&lt;br /&gt;
Some controls consume internally specific Windows Message ID, so registering them will have no effect, e.g; WM_CHAR, WM_KEYDOWN, WM_KEYUP are consumed by an edit control.&lt;br /&gt;
&lt;br /&gt;
==Related==&lt;br /&gt;
[[GUICtrlGetHandle]]&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
; Create an ownerdrawn/colored button&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;GUIConstantsEx.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;WindowsConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;ButtonConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	Local Const $BS_OWNERDRAW = 0x0000000B&lt;br /&gt;
	Local $iButton = 0, $iButton2 = 0, $iMsg = 0&lt;br /&gt;
&lt;br /&gt;
	GUICreate(&amp;quot;My Ownerdrawn Created Button&amp;quot;, 300, 200)&lt;br /&gt;
&lt;br /&gt;
	$iButton = GUICtrlCreateButton(&amp;quot;&amp;quot;, 90, 50, 120, 30)&lt;br /&gt;
	GUICtrlSetStyle($iButton, BitOR($WS_TABSTOP, $BS_NOTIFY, $BS_OWNERDRAW)) ; Set the ownerdrawn flag&lt;br /&gt;
&lt;br /&gt;
	$iButton2 = GUICtrlCreateButton(&amp;quot;Normal Button&amp;quot;, 90, 110, 120, 30)&lt;br /&gt;
&lt;br /&gt;
	GUIRegisterMsg($WM_COMMAND, &amp;quot;MY_WM_COMMAND&amp;quot;)&lt;br /&gt;
	; WM_DRAWITEM has to registered before showing GUI otherwise the initial drawing isn&#039;t done&lt;br /&gt;
	GUIRegisterMsg($WM_DRAWITEM, &amp;quot;MY_WM_DRAWITEM&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	GUISetState()&lt;br /&gt;
&lt;br /&gt;
	While 1&lt;br /&gt;
		$iMsg = GUIGetMsg()&lt;br /&gt;
&lt;br /&gt;
		Switch $iMsg&lt;br /&gt;
			Case $GUI_EVENT_CLOSE&lt;br /&gt;
				ExitLoop&lt;br /&gt;
&lt;br /&gt;
			Case $iButton&lt;br /&gt;
				; Normally should not run through cause of our MY_WM_COMMAND function&lt;br /&gt;
				MsgBox($MB_SYSTEMMODAL, &amp;quot;Info&amp;quot;, &amp;quot;Button pressed&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
			Case $iButton2&lt;br /&gt;
				; Normally should not run through cause of our MY_WM_COMMAND function&lt;br /&gt;
				MsgBox($MB_SYSTEMMODAL, &amp;quot;Info&amp;quot;, &amp;quot;Button2 pressed&amp;quot;)&lt;br /&gt;
		EndSwitch&lt;br /&gt;
	WEnd&lt;br /&gt;
&lt;br /&gt;
	GUIDelete()&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&lt;br /&gt;
; React on a button click&lt;br /&gt;
Func MY_WM_COMMAND($hWnd, $Msg, $wParam, $lParam)&lt;br /&gt;
	Local $nNotifyCode = BitShift($wParam, 16)&lt;br /&gt;
	Local $nID = BitAND($wParam, 0x0000FFFF)&lt;br /&gt;
	Local $hCtrl = $lParam&lt;br /&gt;
&lt;br /&gt;
	If $nID &amp;lt;&amp;gt; 2 And $nNotifyCode = 0 Then ; Check for IDCANCEL - 2&lt;br /&gt;
		; Ownerdrawn buttons don&#039;t send something by pressing ENTER&lt;br /&gt;
		; So IDOK - 1 comes up, now check for the control that has the current focus&lt;br /&gt;
		If $nID = 1 Then&lt;br /&gt;
			Local $hFocus = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;GetFocus&amp;quot;)&lt;br /&gt;
			Local $nCtrlID = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;GetDlgCtrlID&amp;quot;, &amp;quot;hwnd&amp;quot;, $hFocus[0])&lt;br /&gt;
			PostButtonClick($hWnd, $nCtrlID[0])&lt;br /&gt;
		Else&lt;br /&gt;
			MsgBox($MB_SYSTEMMODAL, &amp;quot;MY_WM_COMMAND&amp;quot;, &amp;quot;GUIHWnd&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $hWnd &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;MsgID&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $Msg &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;wParam&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $wParam &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;lParam&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $lParam &amp;amp; @CRLF &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;WM_COMMAND - Infos:&amp;quot; &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;-----------------------------&amp;quot; &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;Code&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $nNotifyCode &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;CtrlID&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $nID &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;CtrlHWnd&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $hCtrl)&lt;br /&gt;
		EndIf&lt;br /&gt;
		Return 0 ; Only workout clicking on the button&lt;br /&gt;
	EndIf&lt;br /&gt;
	; Proceed the default AutoIt3 internal message commands.&lt;br /&gt;
	; You also can complete let the line out.&lt;br /&gt;
	;!&lt;br /&gt;
 But only &#039;Return&#039; (without any value) will not proceed&lt;br /&gt;
	; the default AutoIt3-message in the future!&lt;br /&gt;
&lt;br /&gt;
	Return $GUI_RUNDEFMSG&lt;br /&gt;
EndFunc   ;==&amp;gt;MY_WM_COMMAND&lt;br /&gt;
&lt;br /&gt;
; RePost a WM_COMMAND message to a ctrl in a gui window&lt;br /&gt;
Func PostButtonClick($hWnd, $nCtrlID)&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;PostMessage&amp;quot;, _&lt;br /&gt;
			&amp;quot;hwnd&amp;quot;, $hWnd, _&lt;br /&gt;
			&amp;quot;int&amp;quot;, $WM_COMMAND, _&lt;br /&gt;
			&amp;quot;int&amp;quot;, BitAND($nCtrlID, 0x0000FFFF), _&lt;br /&gt;
			&amp;quot;hwnd&amp;quot;, GUICtrlGetHandle($nCtrlID))&lt;br /&gt;
EndFunc   ;==&amp;gt;PostButtonClick&lt;br /&gt;
&lt;br /&gt;
; Draw the button&lt;br /&gt;
Func MY_WM_DRAWITEM($hWnd, $Msg, $wParam, $lParam)&lt;br /&gt;
	#forceref $Msg, $wParam, $lParam&lt;br /&gt;
	Local $stDrawItem = DllStructCreate(&amp;quot;uint;uint;uint;uint;uint;uint;uint;int[4];dword&amp;quot;, $lParam)&lt;br /&gt;
	Local Const $ODT_BUTTON = 4&lt;br /&gt;
&lt;br /&gt;
	Local $nCtlType = DllStructGetData($stDrawItem, 1)&lt;br /&gt;
	If $nCtlType = $ODT_BUTTON Then&lt;br /&gt;
		; Local $nCtrlID = DllStructGetData($stDrawItem, 2)&lt;br /&gt;
		Local $nItemState = DllStructGetData($stDrawItem, 5)&lt;br /&gt;
		Local $hCtrl = DllStructGetData($stDrawItem, 6)&lt;br /&gt;
		Local $hDC = DllStructGetData($stDrawItem, 7)&lt;br /&gt;
		Local $nLeft = DllStructGetData($stDrawItem, 8, 1)&lt;br /&gt;
		Local $nTop = DllStructGetData($stDrawItem, 8, 2)&lt;br /&gt;
		Local $nRight = DllStructGetData($stDrawItem, 8, 3)&lt;br /&gt;
		Local $nBottom = DllStructGetData($stDrawItem, 8, 4)&lt;br /&gt;
		Local $sText = &amp;quot;Ownerdrawn Button&amp;quot;&lt;br /&gt;
		Local $nTextColor = 0x5555DD&lt;br /&gt;
		Local $nBackColor = 0xFFEEDD&lt;br /&gt;
		DrawButton($hWnd, $hCtrl, $hDC, $nLeft, $nTop, $nRight, $nBottom, $nItemState, $sText, $nTextColor, $nBackColor)&lt;br /&gt;
		$stDrawItem = 0&lt;br /&gt;
		Return 1&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	$stDrawItem = 0&lt;br /&gt;
	Return $GUI_RUNDEFMSG ; Proceed the default AutoIt3 internal message commands&lt;br /&gt;
EndFunc   ;==&amp;gt;MY_WM_DRAWITEM&lt;br /&gt;
&lt;br /&gt;
; The main drawing procedure&lt;br /&gt;
Func DrawButton($hWnd, $hCtrl, $hDC, $nLeft, $nTop, $nRight, $nBottom, $nItemState, $sText, $nTextColor, $nBackColor)&lt;br /&gt;
	#forceref $hWnd&lt;br /&gt;
	;Local $bDefault	= FALSE&lt;br /&gt;
	Local Const $GWL_STYLE = -16&lt;br /&gt;
	Local Const $ODS_SELECTED = 0x0001&lt;br /&gt;
	Local Const $ODS_GRAYED = 0x0002&lt;br /&gt;
	Local Const $ODS_DISABLED = 0x0004&lt;br /&gt;
	; Local Const $ODS_CHECKED = 0x0008&lt;br /&gt;
	Local Const $ODS_FOCUS = 0x0010&lt;br /&gt;
	; Local Const $ODS_HOTLIGHT = 0x0040&lt;br /&gt;
	; Local Const $ODS_INACTIVE = 0x0080&lt;br /&gt;
	; Local Const $ODS_NOACCEL = 0x0100&lt;br /&gt;
	; Local Const $ODS_NOFOCUSRECT = 0x0200&lt;br /&gt;
	Local Const $DFC_BUTTON = 4&lt;br /&gt;
	Local Const $DFCS_BUTTONPUSH = 0x0010&lt;br /&gt;
	; Local $bChecked = BitAND($nItemState, $ODS_CHECKED)&lt;br /&gt;
	Local $bFocused = BitAND($nItemState, $ODS_FOCUS)&lt;br /&gt;
	Local $bGrayed = BitAND($nItemState, BitOR($ODS_GRAYED, $ODS_DISABLED))&lt;br /&gt;
	Local $bSelected = BitAND($nItemState, $ODS_SELECTED)&lt;br /&gt;
&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	Local $nClrTxt&lt;br /&gt;
	If $bGrayed Then&lt;br /&gt;
		$nClrTxt = SetTextColor($hDC, GetSysColor($COLOR_HIGHLIGHTTEXT))&lt;br /&gt;
	ElseIf $nTextColor = -1 Then&lt;br /&gt;
		$nClrTxt = SetTextColor($hDC, GetSysColor($COLOR_BTNTEXT))&lt;br /&gt;
	Else&lt;br /&gt;
		$nClrTxt = SetTextColor($hDC, $nTextColor)&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	Local $hBrush, $nClrSel&lt;br /&gt;
	If $nBackColor = -1 Then&lt;br /&gt;
		$hBrush = GetSysColorBrush($COLOR_BTNFACE)&lt;br /&gt;
		$nClrSel = GetSysColor($COLOR_BTNFACE)&lt;br /&gt;
	Else&lt;br /&gt;
		$hBrush = CreateSolidBrush($nBackColor)&lt;br /&gt;
		$nClrSel = $nBackColor;&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	Local $nClrBk = SetBkColor($hDC, $nClrSel)&lt;br /&gt;
	Local $hOldBrush = SelectObject($hDC, $hBrush)&lt;br /&gt;
&lt;br /&gt;
	Local $nTmpLeft = $nLeft&lt;br /&gt;
	Local $nTmpTop = $nTop&lt;br /&gt;
	Local $nTmpRight = $nRight&lt;br /&gt;
	Local $nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
	If $bSelected Then&lt;br /&gt;
		InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -1, -1)&lt;br /&gt;
		Local $hBrushSel = CreateSolidBrush(GetSysColor($COLOR_BTNSHADOW))&lt;br /&gt;
		FrameRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $hBrushSel)&lt;br /&gt;
		DeleteObject($hBrushSel)&lt;br /&gt;
	Else&lt;br /&gt;
		If $bFocused And Not $bSelected Then InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -1, -1)&lt;br /&gt;
		DrawFrameControl($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $DFC_BUTTON, $DFCS_BUTTONPUSH)&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	$nTmpLeft = $nLeft&lt;br /&gt;
	$nTmpTop = $nTop&lt;br /&gt;
	$nTmpRight = $nRight&lt;br /&gt;
	$nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
	If $bSelected Then&lt;br /&gt;
		InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -2, -2)&lt;br /&gt;
	Else&lt;br /&gt;
		If $bFocused And Not $bSelected Then&lt;br /&gt;
			InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -3, -3)&lt;br /&gt;
			$nTmpLeft -= 1&lt;br /&gt;
			$nTmpTop -= 1&lt;br /&gt;
		Else&lt;br /&gt;
			InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -2, -2)&lt;br /&gt;
			$nTmpLeft -= 1&lt;br /&gt;
			$nTmpTop -= 1&lt;br /&gt;
		EndIf&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	FillRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $hBrush)&lt;br /&gt;
&lt;br /&gt;
	If $bSelected Or $bGrayed Then&lt;br /&gt;
		$nTmpLeft = $nTmpLeft + 2&lt;br /&gt;
		$nTmpTop = $nTmpTop + 2&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	Local $uFlags = BitOR($DT_NOCLIP, $DT_CENTER, $DT_VCENTER)&lt;br /&gt;
&lt;br /&gt;
	If Not BitAND(GetWindowLong($hCtrl, $GWL_STYLE), $BS_MULTILINE) Then $uFlags = BitOR($uFlags, $DT_SINGLELINE)&lt;br /&gt;
&lt;br /&gt;
	DrawText($hDC, $sText, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $uFlags)&lt;br /&gt;
&lt;br /&gt;
	If $bGrayed Then&lt;br /&gt;
		$nTmpLeft = $nLeft&lt;br /&gt;
		$nTmpTop = $nTop&lt;br /&gt;
		$nTmpRight = $nRight&lt;br /&gt;
		$nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
		$nTmpLeft -= 1&lt;br /&gt;
&lt;br /&gt;
		$nClrTxt = SetTextColor($hDC, GetSysColor($COLOR_GRAYTEXT))&lt;br /&gt;
		DrawText($hDC, $sText, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, BitOR($DT_NOCLIP, $DT_CENTER, $DT_VCENTER, $DT_SINGLELINE))&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	$nTmpLeft = $nLeft&lt;br /&gt;
	$nTmpTop = $nTop&lt;br /&gt;
	$nTmpRight = $nRight&lt;br /&gt;
	$nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
	If $bFocused Then&lt;br /&gt;
		$hBrush = CreateSolidBrush(0)&lt;br /&gt;
		FrameRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $hBrush)&lt;br /&gt;
&lt;br /&gt;
		$nTmpLeft = $nLeft&lt;br /&gt;
		$nTmpTop = $nTop&lt;br /&gt;
		$nTmpRight = $nRight&lt;br /&gt;
		$nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
		InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -4, -4)&lt;br /&gt;
		DrawFocusRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom)&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	SelectObject($hDC, $hOldBrush)&lt;br /&gt;
	DeleteObject($hBrush)&lt;br /&gt;
	SetTextColor($hDC, $nClrTxt)&lt;br /&gt;
	SetBkColor($hDC, $nClrBk)&lt;br /&gt;
&lt;br /&gt;
	Return 1&lt;br /&gt;
EndFunc   ;==&amp;gt;DrawButton&lt;br /&gt;
&lt;br /&gt;
; Some graphic / windows functions&lt;br /&gt;
Func CreateSolidBrush($nColor)&lt;br /&gt;
	Local $hBrush = DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;CreateSolidBrush&amp;quot;, &amp;quot;int&amp;quot;, $nColor)&lt;br /&gt;
	Return $hBrush[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;CreateSolidBrush&lt;br /&gt;
&lt;br /&gt;
Func GetSysColor($nIndex)&lt;br /&gt;
	Local $nColor = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;GetSysColor&amp;quot;, &amp;quot;int&amp;quot;, $nIndex)&lt;br /&gt;
	Return $nColor[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;GetSysColor&lt;br /&gt;
&lt;br /&gt;
Func GetSysColorBrush($nIndex)&lt;br /&gt;
	Local $hBrush = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;GetSysColorBrush&amp;quot;, &amp;quot;int&amp;quot;, $nIndex)&lt;br /&gt;
	Return $hBrush[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;GetSysColorBrush&lt;br /&gt;
&lt;br /&gt;
Func DrawFrameControl($hDC, $nLeft, $nTop, $nRight, $nBottom, $nType, $nState)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;DrawFrameControl&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;int&amp;quot;, $nType, &amp;quot;int&amp;quot;, $nState)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;DrawFrameControl&lt;br /&gt;
&lt;br /&gt;
Func DrawFocusRect($hDC, $nLeft, $nTop, $nRight, $nBottom)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;DrawFocusRect&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect))&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;DrawFocusRect&lt;br /&gt;
&lt;br /&gt;
Func DrawText($hDC, $sText, $nLeft, $nTop, $nRight, $nBottom, $nFormat)&lt;br /&gt;
	Local $nLen = StringLen($sText)&lt;br /&gt;
&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	Local $stText = DllStructCreate(&amp;quot;char[260]&amp;quot;)&lt;br /&gt;
	DllStructSetData($stText, 1, $sText)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;DrawText&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stText), &amp;quot;int&amp;quot;, $nLen, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;int&amp;quot;, $nFormat)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
	$stText = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;DrawText&lt;br /&gt;
&lt;br /&gt;
Func FillRect($hDC, $nLeft, $nTop, $nRight, $nBottom, $hBrush)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;FillRect&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;hwnd&amp;quot;, $hBrush)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;FillRect&lt;br /&gt;
&lt;br /&gt;
Func FrameRect($hDC, $nLeft, $nTop, $nRight, $nBottom, $hBrush)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;FrameRect&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;hwnd&amp;quot;, $hBrush)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;FrameRect&lt;br /&gt;
&lt;br /&gt;
Func InflateRect(ByRef $nLeft, ByRef $nTop, ByRef $nRight, ByRef $nBottom, $nX, $nY)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;InflateRect&amp;quot;, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;int&amp;quot;, $nX, &amp;quot;int&amp;quot;, $nY)&lt;br /&gt;
&lt;br /&gt;
	$nLeft = DllStructGetData($stRect, 1)&lt;br /&gt;
	$nTop = DllStructGetData($stRect, 2)&lt;br /&gt;
	$nRight = DllStructGetData($stRect, 3)&lt;br /&gt;
	$nBottom = DllStructGetData($stRect, 4)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;InflateRect&lt;br /&gt;
&lt;br /&gt;
Func SetBkColor($hDC, $nColor)&lt;br /&gt;
	Local $nOldColor = DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;SetBkColor&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;int&amp;quot;, $nColor)&lt;br /&gt;
	Return $nOldColor[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;SetBkColor&lt;br /&gt;
&lt;br /&gt;
Func SetTextColor($hDC, $nColor)&lt;br /&gt;
	Local $nOldColor = DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;SetTextColor&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;int&amp;quot;, $nColor)&lt;br /&gt;
	Return $nOldColor[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;SetTextColor&lt;br /&gt;
&lt;br /&gt;
Func SelectObject($hDC, $hObj)&lt;br /&gt;
	Local $hOldObj = DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;SelectObject&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;hwnd&amp;quot;, $hObj)&lt;br /&gt;
	Return $hOldObj[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;SelectObject&lt;br /&gt;
&lt;br /&gt;
Func DeleteObject($hObj)&lt;br /&gt;
	DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;DeleteObject&amp;quot;, &amp;quot;hwnd&amp;quot;, $hObj)&lt;br /&gt;
EndFunc   ;==&amp;gt;DeleteObject&lt;br /&gt;
&lt;br /&gt;
Func GetWindowLong($hWnd, $nIndex)&lt;br /&gt;
	Local $nVal = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;GetWindowLong&amp;quot;, &amp;quot;hwnd&amp;quot;, $hWnd, &amp;quot;int&amp;quot;, $nIndex)&lt;br /&gt;
	Return $nVal[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;GetWindowLong&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11875</id>
		<title>AutoItSetOption</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11875"/>
		<updated>2013-08-18T10:36:08Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
Changes the operation of various AutoIt functions/parameters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AutoItSetOption ( &amp;quot;option&amp;quot; [, param] )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{| border=&#039;1&#039; class=&#039;wikitable&#039;&lt;br /&gt;
|-&lt;br /&gt;
| option || The option to change. See Remarks.&lt;br /&gt;
|-&lt;br /&gt;
| param || &#039;&#039;&#039;[optional]&#039;&#039;&#039; The value to assign to the option. The type and meaning vary by option. See remarks below. If the param is not provided, then the function just returns the value already assigned to the option. The keyword [[Default]] can be used for the parameter to reset the option to its default value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
{|&lt;br /&gt;
| Success: || 	Returns the value of the previous setting for the option.&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	Sets @error to non-zero. Failure will occur if the parameters are invalid (such as an option that doesn&#039;t exist).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Remarks==&lt;br /&gt;
You may use [[Opt]] as an alternative to AutoItSetOption&lt;br /&gt;
&lt;br /&gt;
Options are as follows:&lt;br /&gt;
{| border=&#039;1&#039; class=&#039;wikitable&#039;&lt;br /&gt;
! scope=&#039;col&#039; | Option&lt;br /&gt;
! scope=&#039;col&#039; | Param&lt;br /&gt;
|-&lt;br /&gt;
| CaretCoordMode || [[CaretCoordMode]] Sets the way coords are used in the caret functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = relative coords to the active window&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| ExpandEnvStrings || [[ExpandEnvStrings]] Changes how literal strings and % symbols are interpreted. By default strings are treated literally, this option allows you to use %environment% variables inside strings, e.g., &amp;quot;The temp directory is: %temp%&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = do not expand environment variables (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = expand environment variables&lt;br /&gt;
|-&lt;br /&gt;
| || Without this option the usual way would be: 	&amp;quot;The temp directory is: &amp;quot; &amp;amp; [[EnvGet]](&amp;quot;temp&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| ExpandVarStrings || [[ExpandVarStrings]] Changes how literal strings and variable/macro ($ and @) symbols are interpreted. By default strings are treated literally, this option allows you to use variables and macros inside strings, e.g., &amp;quot;The value of var1 is $var1$&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = do not expand variables (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = expand variables (when in this mode and you want to use a literal $ or @ then double it up: &amp;quot;This is a single dollar $$ sign&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| GUICloseOnESC || [[GUICloseOnESC]] When ESC is pressed on a GUI the $GUI_EVENT_CLOSE message is sent. This option toggles this behavior on and off.&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = Don&#039;t send the $GUI_EVENT_CLOSE message when ESC is pressed.&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = [[Send]] the $GUI_EVENT_CLOSE message when ESC is pressed (default).&lt;br /&gt;
|-&lt;br /&gt;
| GUICoordMode || [[GUICoordMode]] Alters the position of a control defined by [[GUICtrlSetPos]]&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = relative position to the start of the last control (upper left corner).&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = absolute coordinates (default) still relative to the dialog box.&lt;br /&gt;
|-&lt;br /&gt;
| || 2 = cell positioning relative to current cell. A -1 for left or top parameter don&#039;t increment the start.&lt;br /&gt;
|-&lt;br /&gt;
| || So next line is -1, offset; next cell is offset,-1; current cell is -1,-1.&lt;br /&gt;
|-&lt;br /&gt;
| || Obviously &amp;quot;offset&amp;quot; cannot be -1 which reserved to indicate the no increment. But if you can use a multiple of the width you choose to skip or go back.&lt;br /&gt;
|-&lt;br /&gt;
| GUIDataSeparatorChar || [[GUIDataSeparatorChar]] Define the character which delimits subitems in [[GUICtrlSetData]]&lt;br /&gt;
|-&lt;br /&gt;
| || The default character is &#039;|&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| GUIOnEventMode || [[GUIOnEventMode]] Enable/disable OnEvent functions notifications.&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = (default) disable.&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = enable.&lt;br /&gt;
|-&lt;br /&gt;
| GUIResizeMode || [[GUIResizeMode]] Change default resizing for a control.&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = (default) keep default control resizing.&lt;br /&gt;
|-&lt;br /&gt;
| || &amp;amp;lt;1024 = any type of resizing see [[GUICtrlSetResizing]]&lt;br /&gt;
|-&lt;br /&gt;
| GUIEventOptions || [[GUIEventOptions]] Change special event behavior or GUI function return values.&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = (default) Windows behavior on click on Minimize,Restore, Maximize, Resize.&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = suppress windows behavior on minimize, restore or maximize click button or window resize. Just sends the notification.&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDelay || [[MouseClickDelay]] Alters the length of the brief pause in between mouse clicks.&lt;br /&gt;
|-&lt;br /&gt;
| || Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDownDelay || [[MouseClickDownDelay]] Alters the length a click is held down before release.&lt;br /&gt;
|-&lt;br /&gt;
| || Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| MouseClickDragDelay || [[MouseClickDragDelay]] Alters the length of the brief pause at the start and end of a mouse drag operation.&lt;br /&gt;
|-&lt;br /&gt;
| || Time in milliseconds to pause (default=250).&lt;br /&gt;
|-&lt;br /&gt;
| MouseCoordMode || [[MouseCoordMode]] Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = relative coords to the active window&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| MustDeclareVars || [[MustDeclareVars]] If this option is used then all variables must be pre-declared with Local, Global or in some cases Dim before they can be used - removes the chance for misspelled variables causing bugs.&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = Variables don&#039;t need to be pre-declared (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = Variables must be pre-declared&lt;br /&gt;
|-&lt;br /&gt;
| PixelCoordMode || [[PixelCoordMode]] Sets the way coords are used in the pixel functions, either absolute coords or coords relative to the window defined by hwnd (default active window):&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = relative coords to the defined window&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 2 = relative coords to the client area of the defined window&lt;br /&gt;
|-&lt;br /&gt;
| SendAttachMode || [[SendAttachMode]] Specifies if AutoIt attaches input threads when using [[Send]] function. When not attaching (default mode=0) detecting the state of capslock/scrolllock and numlock can be unreliable under NT4. However, when you specify attach mode=1 the [[Send]](&amp;quot;{... down/up}&amp;quot;) syntax will not work and there may be problems with sending keys to &amp;quot;hung&amp;quot; windows. [[ControlSend]] ALWAYS attaches and is not affected by this mode.&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = don&#039;t attach (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = attach&lt;br /&gt;
|-&lt;br /&gt;
| SendCapslockMode || [[SendCapslockMode]] Specifies if AutoIt should store the state of capslock before a [[Send]] function and restore it afterwards.&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = don&#039;t store/restore&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = store and restore (default)&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDelay || [[SendKeyDelay]] Alters the length of the brief pause in between sent keystrokes. A value of 0 removes the delay completely.&lt;br /&gt;
|-&lt;br /&gt;
| || Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| SendKeyDownDelay || [[SendKeyDownDelay]] Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses you may need to raise this value from the default. A value of 0 removes the delay completely.&lt;br /&gt;
|-&lt;br /&gt;
| || Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| TCPTimeout || [[TCPTimeout]] Defines the time before TCP functions stop if no communication.&lt;br /&gt;
|-&lt;br /&gt;
| || Time in milliseconds before timeout (default=100).&lt;br /&gt;
|-&lt;br /&gt;
| TrayAutoPause || [[TrayAutoPause]] Script pauses when click on tray icon.&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = no pause&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = pause (default). If there is no DefaultMenu no pause will occurs.&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconDebug || [[TrayIconDebug]] If enabled shows the current script line in the tray icon tip to help debugging.&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = no debug information (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = show debug&lt;br /&gt;
|-&lt;br /&gt;
| TrayIconHide || [[TrayIconHide]] Hides the AutoIt tray icon. Note: The icon will still initially appear ~750 milliseconds.&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = show icon (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = hide icon&lt;br /&gt;
|-&lt;br /&gt;
| TrayMenuMode || [[TrayMenuMode]] Extend the behaviour of the script tray icon/menu. This can be done with a combination (adding) of the following values.&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = default menu items (Script Paused/Exit) are appended to the usercreated menu; usercreated checked items will automatically unchecked; if you double click the tray icon then the controlid is returned which has the &amp;quot;Default&amp;quot;-style (default).&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = no default menu&lt;br /&gt;
|-&lt;br /&gt;
| || 2 = user created checked items will not automatically unchecked if you click it&lt;br /&gt;
|-&lt;br /&gt;
| || 4 = don&#039;t return the menuitemID which has the &amp;quot;default&amp;quot;-style in the main contextmenu if you double click the tray icon&lt;br /&gt;
|-&lt;br /&gt;
| || 8 = turn off auto check of radio item groups&lt;br /&gt;
|-&lt;br /&gt;
| TrayOnEventMode || [[TrayOnEventMode]] Enable/disable OnEvent functions notifications for the tray.&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = (default) disable&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = enable&lt;br /&gt;
|-&lt;br /&gt;
| WinDetectHiddenText || [[WinDetectHiddenText]] Specifies if hidden window text can be &amp;quot;seen&amp;quot; by the window matching functions.&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = Do not detect hidden text (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = Detect hidden text&lt;br /&gt;
|-&lt;br /&gt;
| WinSearchChildren || [[WinSearchChildren]] Allows the window search routines to search child windows as well as top-level windows.&lt;br /&gt;
|-&lt;br /&gt;
| || 0 = Only search top-level windows (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = Search top-level and child windows&lt;br /&gt;
|-&lt;br /&gt;
| WinTextMatchMode || [[WinTextMatchMode]] Alters the method that is used to match window text during search operations.&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = Complete / Slow mode (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 2 = Quick mode&lt;br /&gt;
|-&lt;br /&gt;
| || In quick mode AutoIt can usually only &amp;quot;see&amp;quot; dialog text, button text and the captions of some controls. In the default mode much more text can be seen (for instance the contents of the Notepad window).&lt;br /&gt;
|-&lt;br /&gt;
| || If you are having performance problems when performing many window searches then changing to the &amp;quot;quick&amp;quot; mode may help.&lt;br /&gt;
|-&lt;br /&gt;
| WinTitleMatchMode || [[WinTitleMatchMode]] Alters the method that is used to match window titles during search operations.&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = Match the title from the start (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 2 = Match any substring in the title&lt;br /&gt;
|-&lt;br /&gt;
| || 3 = Exact title match&lt;br /&gt;
|-&lt;br /&gt;
| || 4 = Advanced mode, see &amp;lt;a href=&amp;quot;../intro/windowsadvanced.htm&amp;quot;&amp;gt;Window Titles &amp;amp; Text (Advanced)&amp;lt;/a&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| || -1 to -4 = force lower case match according to other type of match (case-insensitive match.)&lt;br /&gt;
|-&lt;br /&gt;
| WinWaitDelay || [[WinWaitDelay]] Alters how long a script should briefly pause after a successful window-related operation.&lt;br /&gt;
|-&lt;br /&gt;
| || Time in milliseconds to pause (default=250).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
; copy any you want to change   ;default value is listed first&lt;br /&gt;
&lt;br /&gt;
Opt(&amp;quot;CaretCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;ExpandEnvStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;ExpandVarStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;GUICloseOnESC&amp;quot;, 1) ;1=ESC  closes, 0=ESC won&#039;t close&lt;br /&gt;
Opt(&amp;quot;GUICoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=cell&lt;br /&gt;
Opt(&amp;quot;GUIDataSeparatorChar&amp;quot;, &amp;quot;|&amp;quot;) ;&amp;quot;|&amp;quot; is the default&lt;br /&gt;
Opt(&amp;quot;GUIOnEventMode&amp;quot;, 0) ;0=disabled, 1=OnEvent mode enabled&lt;br /&gt;
Opt(&amp;quot;GUIResizeMode&amp;quot;, 0) ;0=no resizing, &amp;lt;1024 special resizing&lt;br /&gt;
Opt(&amp;quot;GUIEventOptions&amp;quot;, 0) ;0=default, 1=just notification, 2=GUICtrlRead tab index&lt;br /&gt;
Opt(&amp;quot;MouseClickDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDownDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDragDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;MustDeclareVars&amp;quot;, 0) ;0=no, 1=require pre-declaration&lt;br /&gt;
Opt(&amp;quot;PixelCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;SendAttachMode&amp;quot;, 0) ;0=don&#039;t attach, 1=do attach&lt;br /&gt;
Opt(&amp;quot;SendCapslockMode&amp;quot;, 1) ;1=store and restore, 0=don&#039;t&lt;br /&gt;
Opt(&amp;quot;SendKeyDelay&amp;quot;, 5) ;5 milliseconds&lt;br /&gt;
Opt(&amp;quot;SendKeyDownDelay&amp;quot;, 1) ;1 millisecond&lt;br /&gt;
Opt(&amp;quot;TCPTimeout&amp;quot;, 100) ;100 milliseconds&lt;br /&gt;
Opt(&amp;quot;TrayAutoPause&amp;quot;, 1) ;0=no pause, 1=Pause&lt;br /&gt;
Opt(&amp;quot;TrayIconDebug&amp;quot;, 0) ;0=no info, 1=debug line info&lt;br /&gt;
Opt(&amp;quot;TrayIconHide&amp;quot;, 0) ;0=show, 1=hide tray icon&lt;br /&gt;
Opt(&amp;quot;TrayMenuMode&amp;quot;, 0) ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID  not return&lt;br /&gt;
Opt(&amp;quot;TrayOnEventMode&amp;quot;, 0) ;0=disable, 1=enable&lt;br /&gt;
Opt(&amp;quot;WinDetectHiddenText&amp;quot;, 0) ;0=don&#039;t detect, 1=do detect&lt;br /&gt;
Opt(&amp;quot;WinSearchChildren&amp;quot;, 1) ;0=no, 1=search children also&lt;br /&gt;
Opt(&amp;quot;WinTextMatchMode&amp;quot;, 1) ;1=complete, 2=quick&lt;br /&gt;
Opt(&amp;quot;WinTitleMatchMode&amp;quot;, 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase&lt;br /&gt;
Opt(&amp;quot;WinWaitDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=GUIRegisterMsg&amp;diff=11874</id>
		<title>GUIRegisterMsg</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=GUIRegisterMsg&amp;diff=11874"/>
		<updated>2013-08-18T09:01:43Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
Register a user defined function for a known Windows Message ID (WM_MSG).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GUIRegisterMsg ( msgID, &amp;quot;function&amp;quot; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{| border=&#039;1&#039; class=&#039;wikitable&#039;&lt;br /&gt;
| msgID || A Windows Message ID (see Appendix: [[Windows Message Codes]]).&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| function || The name of the user function to call when the message appears or an empty string &amp;quot;&amp;quot; to unregister a message.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
{|&lt;br /&gt;
| Success: || 1&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Remarks==&lt;br /&gt;
To make the user function workable you have to define it with &#039;&#039;&#039;maximum 4 function parameters&#039;&#039;&#039; otherwise the function won&#039;t be called!&lt;br /&gt;
&lt;br /&gt;
i.e:&lt;br /&gt;
Func MyUserFunction($hWndGUI, $MsgID, $WParam, $LParam)&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
EndFunc&lt;br /&gt;
&lt;br /&gt;
Or&lt;br /&gt;
&lt;br /&gt;
Func MyUserFunction($hWndGUI, $MsgID)&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
EndFunc&lt;br /&gt;
&lt;br /&gt;
When the user function is called then these 4 parameters have the following values:&lt;br /&gt;
&lt;br /&gt;
{| border=&#039;1&#039; class=&#039;wikitable&#039;&lt;br /&gt;
| &amp;lt;b&amp;gt;Position&amp;lt;/b&amp;gt; || &amp;lt;b&amp;gt;Parameter&amp;lt;/b&amp;gt; || &amp;lt;b&amp;gt;Meaning&amp;lt;/b&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| 1 || hWnd || The Window handle of the GUI in which the message appears. &lt;br /&gt;
|-&lt;br /&gt;
| 2 || Msg || The Windows message ID. &lt;br /&gt;
|-&lt;br /&gt;
| 3 || wParam || The first message parameter as hex value. &lt;br /&gt;
|-&lt;br /&gt;
| 4 || lParam || The second message parameter as hex value. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Up to 256 user functions can be registered for message IDs.&lt;br /&gt;
&lt;br /&gt;
By default after finishing the user function the AutoIt internal message handler will be proceed.&lt;br /&gt;
&lt;br /&gt;
That won&#039;t be if your &#039;&#039;&#039;Return&#039;&#039;&#039; a value (See WM_COMMAND in example) or if you use the keyword &#039;Return&#039; without any value.&lt;br /&gt;
&lt;br /&gt;
By using &#039;Return&#039; without any return value the AutoIt internal message handler (if there is one for this message) will NOT be proceed!&lt;br /&gt;
&lt;br /&gt;
If you want AutoIt to run its internal handler for a message, return the variable &#039;&#039;&#039;$GUI_RUNDEFMSG&#039;&#039;&#039; (in GUIConstantsEx.au3) from the function (see also examples)!&lt;br /&gt;
&lt;br /&gt;
I.e. if you want to return earlier than the user function ends and also proceed the AutoIt internal message handler.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; blocking of running user functions which executes window messages with commands such as &amp;quot;[[MsgBox]]&amp;quot; can lead to unexpected behavior, the return to the system should be as fast as possible!&lt;br /&gt;
&lt;br /&gt;
Some controls consume internally specific Windows Message ID, so registering them will have no effect, e.g; WM_CHAR, WM_KEYDOWN, WM_KEYUP are consumed by an edit control.&lt;br /&gt;
&lt;br /&gt;
==Related==&lt;br /&gt;
[[GUICtrlGetHandle]]&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
; Create an ownerdrawn/colored button&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;GUIConstantsEx.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;WindowsConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;ButtonConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	Local Const $BS_OWNERDRAW = 0x0000000B&lt;br /&gt;
	Local $iButton = 0, $iButton2 = 0, $iMsg = 0&lt;br /&gt;
&lt;br /&gt;
	GUICreate(&amp;quot;My Ownerdrawn Created Button&amp;quot;, 300, 200)&lt;br /&gt;
&lt;br /&gt;
	$iButton = GUICtrlCreateButton(&amp;quot;&amp;quot;, 90, 50, 120, 30)&lt;br /&gt;
	GUICtrlSetStyle($iButton, BitOR($WS_TABSTOP, $BS_NOTIFY, $BS_OWNERDRAW)) ; Set the ownerdrawn flag&lt;br /&gt;
&lt;br /&gt;
	$iButton2 = GUICtrlCreateButton(&amp;quot;Normal Button&amp;quot;, 90, 110, 120, 30)&lt;br /&gt;
&lt;br /&gt;
	GUIRegisterMsg($WM_COMMAND, &amp;quot;MY_WM_COMMAND&amp;quot;)&lt;br /&gt;
	; WM_DRAWITEM has to registered before showing GUI otherwise the initial drawing isn&#039;t done&lt;br /&gt;
	GUIRegisterMsg($WM_DRAWITEM, &amp;quot;MY_WM_DRAWITEM&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	GUISetState()&lt;br /&gt;
&lt;br /&gt;
	While 1&lt;br /&gt;
		$iMsg = GUIGetMsg()&lt;br /&gt;
&lt;br /&gt;
		Switch $iMsg&lt;br /&gt;
			Case $GUI_EVENT_CLOSE&lt;br /&gt;
				ExitLoop&lt;br /&gt;
&lt;br /&gt;
			Case $iButton&lt;br /&gt;
				; Normally should not run through cause of our MY_WM_COMMAND function&lt;br /&gt;
				MsgBox($MB_SYSTEMMODAL, &amp;quot;Info&amp;quot;, &amp;quot;Button pressed&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
			Case $iButton2&lt;br /&gt;
				; Normally should not run through cause of our MY_WM_COMMAND function&lt;br /&gt;
				MsgBox($MB_SYSTEMMODAL, &amp;quot;Info&amp;quot;, &amp;quot;Button2 pressed&amp;quot;)&lt;br /&gt;
		EndSwitch&lt;br /&gt;
	WEnd&lt;br /&gt;
&lt;br /&gt;
	GUIDelete()&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&lt;br /&gt;
; React on a button click&lt;br /&gt;
Func MY_WM_COMMAND($hWnd, $Msg, $wParam, $lParam)&lt;br /&gt;
	Local $nNotifyCode = BitShift($wParam, 16)&lt;br /&gt;
	Local $nID = BitAND($wParam, 0x0000FFFF)&lt;br /&gt;
	Local $hCtrl = $lParam&lt;br /&gt;
&lt;br /&gt;
	If $nID &amp;lt;&amp;gt; 2 And $nNotifyCode = 0 Then ; Check for IDCANCEL - 2&lt;br /&gt;
		; Ownerdrawn buttons don&#039;t send something by pressing ENTER&lt;br /&gt;
		; So IDOK - 1 comes up, now check for the control that has the current focus&lt;br /&gt;
		If $nID = 1 Then&lt;br /&gt;
			Local $hFocus = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;GetFocus&amp;quot;)&lt;br /&gt;
			Local $nCtrlID = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;GetDlgCtrlID&amp;quot;, &amp;quot;hwnd&amp;quot;, $hFocus[0])&lt;br /&gt;
			PostButtonClick($hWnd, $nCtrlID[0])&lt;br /&gt;
		Else&lt;br /&gt;
			MsgBox($MB_SYSTEMMODAL, &amp;quot;MY_WM_COMMAND&amp;quot;, &amp;quot;GUIHWnd&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $hWnd &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;MsgID&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $Msg &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;wParam&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $wParam &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;lParam&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $lParam &amp;amp; @CRLF &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;WM_COMMAND - Infos:&amp;quot; &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;-----------------------------&amp;quot; &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;Code&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $nNotifyCode &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;CtrlID&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $nID &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;CtrlHWnd&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $hCtrl)&lt;br /&gt;
		EndIf&lt;br /&gt;
		Return 0 ; Only workout clicking on the button&lt;br /&gt;
	EndIf&lt;br /&gt;
	; Proceed the default AutoIt3 internal message commands.&lt;br /&gt;
&lt;br /&gt;
	; You also can complete let the line out.&lt;br /&gt;
&lt;br /&gt;
	; !!! But only &#039;Return&#039; (without any value) will not proceed&lt;br /&gt;
	; the default AutoIt3-message in the future !!!&lt;br /&gt;
&lt;br /&gt;
	Return $GUI_RUNDEFMSG&lt;br /&gt;
EndFunc   ;==&amp;gt;MY_WM_COMMAND&lt;br /&gt;
&lt;br /&gt;
; RePost a WM_COMMAND message to a ctrl in a gui window&lt;br /&gt;
Func PostButtonClick($hWnd, $nCtrlID)&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;PostMessage&amp;quot;, _&lt;br /&gt;
			&amp;quot;hwnd&amp;quot;, $hWnd, _&lt;br /&gt;
			&amp;quot;int&amp;quot;, $WM_COMMAND, _&lt;br /&gt;
			&amp;quot;int&amp;quot;, BitAND($nCtrlID, 0x0000FFFF), _&lt;br /&gt;
			&amp;quot;hwnd&amp;quot;, GUICtrlGetHandle($nCtrlID))&lt;br /&gt;
EndFunc   ;==&amp;gt;PostButtonClick&lt;br /&gt;
&lt;br /&gt;
; Draw the button&lt;br /&gt;
Func MY_WM_DRAWITEM($hWnd, $Msg, $wParam, $lParam)&lt;br /&gt;
	#forceref $Msg, $wParam, $lParam&lt;br /&gt;
	Local $stDrawItem = DllStructCreate(&amp;quot;uint;uint;uint;uint;uint;uint;uint;int[4];dword&amp;quot;, $lParam)&lt;br /&gt;
	Local Const $ODT_BUTTON = 4&lt;br /&gt;
&lt;br /&gt;
	Local $nCtlType = DllStructGetData($stDrawItem, 1)&lt;br /&gt;
	If $nCtlType = $ODT_BUTTON Then&lt;br /&gt;
		; Local $nCtrlID = DllStructGetData($stDrawItem, 2)&lt;br /&gt;
		Local $nItemState = DllStructGetData($stDrawItem, 5)&lt;br /&gt;
		Local $hCtrl = DllStructGetData($stDrawItem, 6)&lt;br /&gt;
		Local $hDC = DllStructGetData($stDrawItem, 7)&lt;br /&gt;
		Local $nLeft = DllStructGetData($stDrawItem, 8, 1)&lt;br /&gt;
		Local $nTop = DllStructGetData($stDrawItem, 8, 2)&lt;br /&gt;
		Local $nRight = DllStructGetData($stDrawItem, 8, 3)&lt;br /&gt;
		Local $nBottom = DllStructGetData($stDrawItem, 8, 4)&lt;br /&gt;
		Local $sText = &amp;quot;Ownerdrawn Button&amp;quot;&lt;br /&gt;
		Local $nTextColor = 0x5555DD&lt;br /&gt;
		Local $nBackColor = 0xFFEEDD&lt;br /&gt;
		DrawButton($hWnd, $hCtrl, $hDC, $nLeft, $nTop, $nRight, $nBottom, $nItemState, $sText, $nTextColor, $nBackColor)&lt;br /&gt;
		$stDrawItem = 0&lt;br /&gt;
		Return 1&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	$stDrawItem = 0&lt;br /&gt;
	Return $GUI_RUNDEFMSG ; Proceed the default AutoIt3 internal message commands&lt;br /&gt;
EndFunc   ;==&amp;gt;MY_WM_DRAWITEM&lt;br /&gt;
&lt;br /&gt;
; The main drawing procedure&lt;br /&gt;
Func DrawButton($hWnd, $hCtrl, $hDC, $nLeft, $nTop, $nRight, $nBottom, $nItemState, $sText, $nTextColor, $nBackColor)&lt;br /&gt;
	#forceref $hWnd&lt;br /&gt;
	;Local $bDefault	= FALSE&lt;br /&gt;
	Local Const $GWL_STYLE = -16&lt;br /&gt;
	Local Const $ODS_SELECTED = 0x0001&lt;br /&gt;
	Local Const $ODS_GRAYED = 0x0002&lt;br /&gt;
	Local Const $ODS_DISABLED = 0x0004&lt;br /&gt;
	; Local Const $ODS_CHECKED = 0x0008&lt;br /&gt;
	Local Const $ODS_FOCUS = 0x0010&lt;br /&gt;
	; Local Const $ODS_HOTLIGHT = 0x0040&lt;br /&gt;
	; Local Const $ODS_INACTIVE = 0x0080&lt;br /&gt;
	; Local Const $ODS_NOACCEL = 0x0100&lt;br /&gt;
	; Local Const $ODS_NOFOCUSRECT = 0x0200&lt;br /&gt;
	Local Const $DFC_BUTTON = 4&lt;br /&gt;
	Local Const $DFCS_BUTTONPUSH = 0x0010&lt;br /&gt;
	; Local $bChecked = BitAND($nItemState, $ODS_CHECKED)&lt;br /&gt;
	Local $bFocused = BitAND($nItemState, $ODS_FOCUS)&lt;br /&gt;
	Local $bGrayed = BitAND($nItemState, BitOR($ODS_GRAYED, $ODS_DISABLED))&lt;br /&gt;
	Local $bSelected = BitAND($nItemState, $ODS_SELECTED)&lt;br /&gt;
&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	Local $nClrTxt&lt;br /&gt;
	If $bGrayed Then&lt;br /&gt;
		$nClrTxt = SetTextColor($hDC, GetSysColor($COLOR_HIGHLIGHTTEXT))&lt;br /&gt;
	ElseIf $nTextColor = -1 Then&lt;br /&gt;
		$nClrTxt = SetTextColor($hDC, GetSysColor($COLOR_BTNTEXT))&lt;br /&gt;
	Else&lt;br /&gt;
		$nClrTxt = SetTextColor($hDC, $nTextColor)&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	Local $hBrush, $nClrSel&lt;br /&gt;
	If $nBackColor = -1 Then&lt;br /&gt;
		$hBrush = GetSysColorBrush($COLOR_BTNFACE)&lt;br /&gt;
		$nClrSel = GetSysColor($COLOR_BTNFACE)&lt;br /&gt;
	Else&lt;br /&gt;
		$hBrush = CreateSolidBrush($nBackColor)&lt;br /&gt;
		$nClrSel = $nBackColor;&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	Local $nClrBk = SetBkColor($hDC, $nClrSel)&lt;br /&gt;
	Local $hOldBrush = SelectObject($hDC, $hBrush)&lt;br /&gt;
&lt;br /&gt;
	Local $nTmpLeft = $nLeft&lt;br /&gt;
	Local $nTmpTop = $nTop&lt;br /&gt;
	Local $nTmpRight = $nRight&lt;br /&gt;
	Local $nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
	If $bSelected Then&lt;br /&gt;
		InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -1, -1)&lt;br /&gt;
		Local $hBrushSel = CreateSolidBrush(GetSysColor($COLOR_BTNSHADOW))&lt;br /&gt;
		FrameRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $hBrushSel)&lt;br /&gt;
		DeleteObject($hBrushSel)&lt;br /&gt;
	Else&lt;br /&gt;
		If $bFocused And Not $bSelected Then InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -1, -1)&lt;br /&gt;
		DrawFrameControl($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $DFC_BUTTON, $DFCS_BUTTONPUSH)&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	$nTmpLeft = $nLeft&lt;br /&gt;
	$nTmpTop = $nTop&lt;br /&gt;
	$nTmpRight = $nRight&lt;br /&gt;
	$nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
	If $bSelected Then&lt;br /&gt;
		InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -2, -2)&lt;br /&gt;
	Else&lt;br /&gt;
		If $bFocused And Not $bSelected Then&lt;br /&gt;
			InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -3, -3)&lt;br /&gt;
			$nTmpLeft -= 1&lt;br /&gt;
			$nTmpTop -= 1&lt;br /&gt;
		Else&lt;br /&gt;
			InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -2, -2)&lt;br /&gt;
			$nTmpLeft -= 1&lt;br /&gt;
			$nTmpTop -= 1&lt;br /&gt;
		EndIf&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	FillRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $hBrush)&lt;br /&gt;
&lt;br /&gt;
	If $bSelected Or $bGrayed Then&lt;br /&gt;
		$nTmpLeft = $nTmpLeft + 2&lt;br /&gt;
		$nTmpTop = $nTmpTop + 2&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	Local $uFlags = BitOR($DT_NOCLIP, $DT_CENTER, $DT_VCENTER)&lt;br /&gt;
&lt;br /&gt;
	If Not BitAND(GetWindowLong($hCtrl, $GWL_STYLE), $BS_MULTILINE) Then $uFlags = BitOR($uFlags, $DT_SINGLELINE)&lt;br /&gt;
&lt;br /&gt;
	DrawText($hDC, $sText, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $uFlags)&lt;br /&gt;
&lt;br /&gt;
	If $bGrayed Then&lt;br /&gt;
		$nTmpLeft = $nLeft&lt;br /&gt;
		$nTmpTop = $nTop&lt;br /&gt;
		$nTmpRight = $nRight&lt;br /&gt;
		$nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
		$nTmpLeft -= 1&lt;br /&gt;
&lt;br /&gt;
		$nClrTxt = SetTextColor($hDC, GetSysColor($COLOR_GRAYTEXT))&lt;br /&gt;
		DrawText($hDC, $sText, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, BitOR($DT_NOCLIP, $DT_CENTER, $DT_VCENTER, $DT_SINGLELINE))&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	$nTmpLeft = $nLeft&lt;br /&gt;
	$nTmpTop = $nTop&lt;br /&gt;
	$nTmpRight = $nRight&lt;br /&gt;
	$nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
	If $bFocused Then&lt;br /&gt;
		$hBrush = CreateSolidBrush(0)&lt;br /&gt;
		FrameRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $hBrush)&lt;br /&gt;
&lt;br /&gt;
		$nTmpLeft = $nLeft&lt;br /&gt;
		$nTmpTop = $nTop&lt;br /&gt;
		$nTmpRight = $nRight&lt;br /&gt;
		$nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
		InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -4, -4)&lt;br /&gt;
		DrawFocusRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom)&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	SelectObject($hDC, $hOldBrush)&lt;br /&gt;
	DeleteObject($hBrush)&lt;br /&gt;
	SetTextColor($hDC, $nClrTxt)&lt;br /&gt;
	SetBkColor($hDC, $nClrBk)&lt;br /&gt;
&lt;br /&gt;
	Return 1&lt;br /&gt;
EndFunc   ;==&amp;gt;DrawButton&lt;br /&gt;
&lt;br /&gt;
; Some graphic / windows functions&lt;br /&gt;
Func CreateSolidBrush($nColor)&lt;br /&gt;
	Local $hBrush = DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;CreateSolidBrush&amp;quot;, &amp;quot;int&amp;quot;, $nColor)&lt;br /&gt;
	Return $hBrush[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;CreateSolidBrush&lt;br /&gt;
&lt;br /&gt;
Func GetSysColor($nIndex)&lt;br /&gt;
	Local $nColor = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;GetSysColor&amp;quot;, &amp;quot;int&amp;quot;, $nIndex)&lt;br /&gt;
	Return $nColor[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;GetSysColor&lt;br /&gt;
&lt;br /&gt;
Func GetSysColorBrush($nIndex)&lt;br /&gt;
	Local $hBrush = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;GetSysColorBrush&amp;quot;, &amp;quot;int&amp;quot;, $nIndex)&lt;br /&gt;
	Return $hBrush[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;GetSysColorBrush&lt;br /&gt;
&lt;br /&gt;
Func DrawFrameControl($hDC, $nLeft, $nTop, $nRight, $nBottom, $nType, $nState)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;DrawFrameControl&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;int&amp;quot;, $nType, &amp;quot;int&amp;quot;, $nState)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;DrawFrameControl&lt;br /&gt;
&lt;br /&gt;
Func DrawFocusRect($hDC, $nLeft, $nTop, $nRight, $nBottom)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;DrawFocusRect&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect))&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;DrawFocusRect&lt;br /&gt;
&lt;br /&gt;
Func DrawText($hDC, $sText, $nLeft, $nTop, $nRight, $nBottom, $nFormat)&lt;br /&gt;
	Local $nLen = StringLen($sText)&lt;br /&gt;
&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	Local $stText = DllStructCreate(&amp;quot;char[260]&amp;quot;)&lt;br /&gt;
	DllStructSetData($stText, 1, $sText)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;DrawText&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stText), &amp;quot;int&amp;quot;, $nLen, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;int&amp;quot;, $nFormat)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
	$stText = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;DrawText&lt;br /&gt;
&lt;br /&gt;
Func FillRect($hDC, $nLeft, $nTop, $nRight, $nBottom, $hBrush)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;FillRect&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;hwnd&amp;quot;, $hBrush)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;FillRect&lt;br /&gt;
&lt;br /&gt;
Func FrameRect($hDC, $nLeft, $nTop, $nRight, $nBottom, $hBrush)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;FrameRect&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;hwnd&amp;quot;, $hBrush)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;FrameRect&lt;br /&gt;
&lt;br /&gt;
Func InflateRect(ByRef $nLeft, ByRef $nTop, ByRef $nRight, ByRef $nBottom, $nX, $nY)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;InflateRect&amp;quot;, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;int&amp;quot;, $nX, &amp;quot;int&amp;quot;, $nY)&lt;br /&gt;
&lt;br /&gt;
	$nLeft = DllStructGetData($stRect, 1)&lt;br /&gt;
	$nTop = DllStructGetData($stRect, 2)&lt;br /&gt;
	$nRight = DllStructGetData($stRect, 3)&lt;br /&gt;
	$nBottom = DllStructGetData($stRect, 4)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;InflateRect&lt;br /&gt;
&lt;br /&gt;
Func SetBkColor($hDC, $nColor)&lt;br /&gt;
	Local $nOldColor = DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;SetBkColor&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;int&amp;quot;, $nColor)&lt;br /&gt;
	Return $nOldColor[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;SetBkColor&lt;br /&gt;
&lt;br /&gt;
Func SetTextColor($hDC, $nColor)&lt;br /&gt;
	Local $nOldColor = DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;SetTextColor&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;int&amp;quot;, $nColor)&lt;br /&gt;
	Return $nOldColor[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;SetTextColor&lt;br /&gt;
&lt;br /&gt;
Func SelectObject($hDC, $hObj)&lt;br /&gt;
	Local $hOldObj = DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;SelectObject&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;hwnd&amp;quot;, $hObj)&lt;br /&gt;
	Return $hOldObj[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;SelectObject&lt;br /&gt;
&lt;br /&gt;
Func DeleteObject($hObj)&lt;br /&gt;
	DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;DeleteObject&amp;quot;, &amp;quot;hwnd&amp;quot;, $hObj)&lt;br /&gt;
EndFunc   ;==&amp;gt;DeleteObject&lt;br /&gt;
&lt;br /&gt;
Func GetWindowLong($hWnd, $nIndex)&lt;br /&gt;
	Local $nVal = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;GetWindowLong&amp;quot;, &amp;quot;hwnd&amp;quot;, $hWnd, &amp;quot;int&amp;quot;, $nIndex)&lt;br /&gt;
	Return $nVal[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;GetWindowLong&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=StringSplit&amp;diff=11873</id>
		<title>StringSplit</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=StringSplit&amp;diff=11873"/>
		<updated>2013-08-18T08:31:17Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: Created page with &amp;quot;==Description== Splits up a string into substrings depending on the given delimiters.  &amp;lt;pre&amp;gt; StringSplit ( &amp;quot;string&amp;quot;, &amp;quot;delimiters&amp;quot; [, flag = 0] ) &amp;lt;/pre&amp;gt;  ==Parameters== {| bord...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
Splits up a string into substrings depending on the given delimiters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
StringSplit ( &amp;quot;string&amp;quot;, &amp;quot;delimiters&amp;quot; [, flag = 0] )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{| border=&#039;1&#039; class=&#039;wikitable&#039;&lt;br /&gt;
| string || The string to evaluate.&lt;br /&gt;
|-&lt;br /&gt;
| delimiters || One or more characters to use as delimiters (case sensitive).&lt;br /&gt;
|-&lt;br /&gt;
| flag || [optional] Changes how the string split works, add multiple flag values together if required:&lt;br /&gt;
|-&lt;br /&gt;
| || $STR_CHRSPLIT (0) = each character in the delimiter string will mark where to split the string (default)&lt;br /&gt;
|-&lt;br /&gt;
| || $STR_ENTIRESPLIT (1) = entire delimiter string is needed to mark the split&lt;br /&gt;
|-&lt;br /&gt;
| || $STR_NOCOUNT (2) = disable the return count in the first element - effectively makes the array 0-based (must use UBound() to get the size of the array in this case).&lt;br /&gt;
|-&lt;br /&gt;
| || Constants are defined in Constants.au3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
Returns an array, by default the first element ($aArray[0]) contains the number of strings returned, the remaining elements ($aArray[1], $aArray[2], etc.) contain the delimited strings. If the flag parameter is set to $STR_NOCOUNT (2) then the count is not returned in the first element.&lt;br /&gt;
&lt;br /&gt;
If no delimiters were found then @error is set to 1, count is equal to 1 ($aArray[0]) and the full string is returned ($aArray[1]).&lt;br /&gt;
&lt;br /&gt;
==Remarks==&lt;br /&gt;
If you use an empty string &amp;quot;&amp;quot; for the delimiters, each character will be returned as an element.&lt;br /&gt;
&lt;br /&gt;
If the delimiter you wish to use is a substring instead of individual single characters, see the example below.&lt;br /&gt;
&lt;br /&gt;
StringSplit is very useful as an alternative to StringSplit as well as a means to populate an array.&lt;br /&gt;
&lt;br /&gt;
Note that if you use the macro @CRLF you are referring to a 2 character string, so this will generate extra blanks lines. Therefore it is recommended to set the flag parameter to $STR_ENTIRESPLIT (1).&lt;br /&gt;
&lt;br /&gt;
To use the values specified above you must #include &amp;lt;StringConstants.au3&amp;gt; in your script.&lt;br /&gt;
&lt;br /&gt;
==Related==&lt;br /&gt;
[[StringInStr]], [[StringLeft]], [[StringLen]], [[StringLower]], [[StringMid]], [[StringRight]], [[StringTrimLeft]], [[StringTrimRight]], [[StringUpper]]&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	Local $aDays = StringSplit(&amp;quot;Mon,Tues,Wed,Thur,Fri,Sat,Sun&amp;quot;, &amp;quot;,&amp;quot;) ; Split the string of days using the delimeter &amp;quot;,&amp;quot; and the default flag value.&lt;br /&gt;
	#cs&lt;br /&gt;
		The array returned will contain the following values:&lt;br /&gt;
		$aDays[1] = &amp;quot;Mon&amp;quot;&lt;br /&gt;
		$aDays[2] = &amp;quot;Tues&amp;quot;&lt;br /&gt;
		$aDays[3] = &amp;quot;Wed&amp;quot;&lt;br /&gt;
		...&lt;br /&gt;
		$aDays[7] = &amp;quot;Sun&amp;quot;&lt;br /&gt;
	#ce&lt;br /&gt;
&lt;br /&gt;
	For $i = 1 To $aDays[0] ; Loop through the array returned by StringSplit to display the individual values.&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;$aDays[&amp;quot; &amp;amp; $i &amp;amp; &amp;quot;] - &amp;quot; &amp;amp; $aDays[$i])&lt;br /&gt;
	Next&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;StringConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	Local $sText = &amp;quot;This\nline\ncontains\nC-style breaks.&amp;quot; ; Define a variable with a string of text.&lt;br /&gt;
	Local $aArray = StringSplit($sText, &#039;\n&#039;, $STR_ENTIRESPLIT) ; Pass the variable to StringSplit and using the delimeter &amp;quot;\n&amp;quot;.&lt;br /&gt;
	; Note that flag paramter is set to $STR_ENTIRESPLIT (1) as it would split at \ or n otherwise.&lt;br /&gt;
	#cs&lt;br /&gt;
		The array returned will contain the following values:&lt;br /&gt;
		$aArray[1] = &amp;quot;This&amp;quot;&lt;br /&gt;
		$aArray[2] = &amp;quot;line&amp;quot;&lt;br /&gt;
		...&lt;br /&gt;
		$aArray[4] = &amp;quot;C-style breaks.&amp;quot;&lt;br /&gt;
	#ce&lt;br /&gt;
&lt;br /&gt;
	For $i = 1 To $aArray[0] ; Loop through the array returned by StringSplit to display the individual values.&lt;br /&gt;
		MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;$aArray[&amp;quot; &amp;amp; $i &amp;amp; &amp;quot;] - &amp;quot; &amp;amp; $aArray[$i])&lt;br /&gt;
	Next&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;StringConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	Local $sText = &amp;quot;This\nline\ncontains\nC-style breaks.&amp;quot; ; Define a variable with a string of text.&lt;br /&gt;
&lt;br /&gt;
	; Pass the variable to StringSplit and using the delimeter &amp;quot;\n&amp;quot;.&lt;br /&gt;
	; Note that flag paramter is set to $STR_ENTIRESPLIT (1) as it would split at \ or n otherwise.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, StringSplit($sText, &#039;\n&#039;, $STR_ENTIRESPLIT)[2]) ; Directly access the array index by using array access on expression.&lt;br /&gt;
	#cs&lt;br /&gt;
		An internal temporary array is used to return a string that may contain one of the following values:&lt;br /&gt;
		$aArray[1] = &amp;quot;This&amp;quot;&lt;br /&gt;
		$aArray[2] = &amp;quot;line&amp;quot;&lt;br /&gt;
		...&lt;br /&gt;
		$aArray[4] = &amp;quot;C-style breaks.&amp;quot;&lt;br /&gt;
	#ce&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=GUIRegisterMsg&amp;diff=11872</id>
		<title>GUIRegisterMsg</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=GUIRegisterMsg&amp;diff=11872"/>
		<updated>2013-08-18T08:31:07Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
Register a user defined function for a known Windows Message ID (WM_MSG).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GUIRegisterMsg ( msgID, &amp;quot;function&amp;quot; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{| border=&#039;1&#039; class=&#039;wikitable&#039;&lt;br /&gt;
| msgID || A Windows Message ID (see Appendix: [[Windows Message Codes]]).&lt;br /&gt;
|-&lt;br /&gt;
| function || The name of the user function to call when the message appears or an empty string &amp;quot;&amp;quot; to unregister a message.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
{|&lt;br /&gt;
| Success: || 	1&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Remarks==&lt;br /&gt;
To make the user function workable you have to define it with &#039;&#039;&#039;maximum 4 function parameters&#039;&#039;&#039; otherwise the function won&#039;t be called!&lt;br /&gt;
i.e:&lt;br /&gt;
Func MyUserFunction($hWndGUI, $MsgID, $WParam, $LParam)&lt;br /&gt;
...&lt;br /&gt;
EndFunc&lt;br /&gt;
&lt;br /&gt;
Or&lt;br /&gt;
&lt;br /&gt;
Func MyUserFunction($hWndGUI, $MsgID)&lt;br /&gt;
...&lt;br /&gt;
EndFunc&lt;br /&gt;
&lt;br /&gt;
When the user function is called then these 4 parameters have the following values:&lt;br /&gt;
&lt;br /&gt;
{| border=&#039;1&#039; class=&#039;wikitable&#039;&lt;br /&gt;
! scope=&#039;col&#039; | &amp;lt;b&amp;gt;Position&amp;lt;/b&amp;gt;&lt;br /&gt;
! scope=&#039;col&#039; | &amp;lt;b&amp;gt;Parameter&amp;lt;/b&amp;gt;&lt;br /&gt;
! scope=&#039;col&#039; | &amp;lt;b&amp;gt;Meaning&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || hWnd || The Window handle of the GUI in which the message appears. &lt;br /&gt;
|-&lt;br /&gt;
| 2 || Msg || The Windows message ID. &lt;br /&gt;
|-&lt;br /&gt;
| 3 || wParam || The first message parameter as hex value. &lt;br /&gt;
|-&lt;br /&gt;
| 4 || lParam || The second message parameter as hex value. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Up to 256 user functions can be registered for message IDs.&lt;br /&gt;
&lt;br /&gt;
By default after finishing the user function the AutoIt internal message handler will be proceed.&lt;br /&gt;
That won&#039;t be if your &#039;&#039;&#039;Return&#039;&#039;&#039; a value (See WM_COMMAND in example) or if you use the keyword &#039;Return&#039; without any value.&lt;br /&gt;
By using &#039;Return&#039; without any return value the AutoIt internal message handler (if there is one for this message) will NOT be proceed!&lt;br /&gt;
&lt;br /&gt;
If you want AutoIt to run its internal handler for a message, return the variable &#039;&#039;&#039;$GUI_RUNDEFMSG&#039;&#039;&#039; (in GUIConstantsEx.au3) from the function (see also examples)!&lt;br /&gt;
I.e. if you want to return earlier than the user function ends and also proceed the AutoIt internal message handler.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; blocking of running user functions which executes window messages with commands such as &amp;quot;[[MsgBox]]&amp;quot; can lead to unexpected behavior, the return to the system should be as fast as possible!&lt;br /&gt;
&lt;br /&gt;
Some controls consume internally specific Windows Message ID, so registering them will have no effect, e.g; WM_CHAR, WM_KEYDOWN, WM_KEYUP are consumed by an edit control.&lt;br /&gt;
&lt;br /&gt;
==Related==&lt;br /&gt;
[[GUICtrlGetHandle]]&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
; Create an ownerdrawn/colored button&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;GUIConstantsEx.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;WindowsConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;ButtonConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	Local Const $BS_OWNERDRAW = 0x0000000B&lt;br /&gt;
	Local $iButton = 0, $iButton2 = 0, $iMsg = 0&lt;br /&gt;
&lt;br /&gt;
	GUICreate(&amp;quot;My Ownerdrawn Created Button&amp;quot;, 300, 200)&lt;br /&gt;
&lt;br /&gt;
	$iButton = GUICtrlCreateButton(&amp;quot;&amp;quot;, 90, 50, 120, 30)&lt;br /&gt;
	GUICtrlSetStyle($iButton, BitOR($WS_TABSTOP, $BS_NOTIFY, $BS_OWNERDRAW)) ; Set the ownerdrawn flag&lt;br /&gt;
&lt;br /&gt;
	$iButton2 = GUICtrlCreateButton(&amp;quot;Normal Button&amp;quot;, 90, 110, 120, 30)&lt;br /&gt;
&lt;br /&gt;
	GUIRegisterMsg($WM_COMMAND, &amp;quot;MY_WM_COMMAND&amp;quot;)&lt;br /&gt;
	; WM_DRAWITEM has to registered before showing GUI otherwise the initial drawing isn&#039;t done&lt;br /&gt;
	GUIRegisterMsg($WM_DRAWITEM, &amp;quot;MY_WM_DRAWITEM&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	GUISetState()&lt;br /&gt;
&lt;br /&gt;
	While 1&lt;br /&gt;
		$iMsg = GUIGetMsg()&lt;br /&gt;
&lt;br /&gt;
		Switch $iMsg&lt;br /&gt;
			Case $GUI_EVENT_CLOSE&lt;br /&gt;
				ExitLoop&lt;br /&gt;
&lt;br /&gt;
			Case $iButton&lt;br /&gt;
				; Normally should not run through cause of our MY_WM_COMMAND function&lt;br /&gt;
				MsgBox($MB_SYSTEMMODAL, &amp;quot;Info&amp;quot;, &amp;quot;Button pressed&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
			Case $iButton2&lt;br /&gt;
				; Normally should not run through cause of our MY_WM_COMMAND function&lt;br /&gt;
				MsgBox($MB_SYSTEMMODAL, &amp;quot;Info&amp;quot;, &amp;quot;Button2 pressed&amp;quot;)&lt;br /&gt;
		EndSwitch&lt;br /&gt;
	WEnd&lt;br /&gt;
&lt;br /&gt;
	GUIDelete()&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&lt;br /&gt;
; React on a button click&lt;br /&gt;
Func MY_WM_COMMAND($hWnd, $Msg, $wParam, $lParam)&lt;br /&gt;
	Local $nNotifyCode = BitShift($wParam, 16)&lt;br /&gt;
	Local $nID = BitAND($wParam, 0x0000FFFF)&lt;br /&gt;
	Local $hCtrl = $lParam&lt;br /&gt;
&lt;br /&gt;
	If $nID &amp;lt;&amp;gt; 2 And $nNotifyCode = 0 Then ; Check for IDCANCEL - 2&lt;br /&gt;
		; Ownerdrawn buttons don&#039;t send something by pressing ENTER&lt;br /&gt;
		; So IDOK - 1 comes up, now check for the control that has the current focus&lt;br /&gt;
		If $nID = 1 Then&lt;br /&gt;
			Local $hFocus = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;GetFocus&amp;quot;)&lt;br /&gt;
			Local $nCtrlID = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;GetDlgCtrlID&amp;quot;, &amp;quot;hwnd&amp;quot;, $hFocus[0])&lt;br /&gt;
			PostButtonClick($hWnd, $nCtrlID[0])&lt;br /&gt;
		Else&lt;br /&gt;
			MsgBox($MB_SYSTEMMODAL, &amp;quot;MY_WM_COMMAND&amp;quot;, &amp;quot;GUIHWnd&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $hWnd &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;MsgID&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $Msg &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;wParam&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $wParam &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;lParam&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $lParam &amp;amp; @CRLF &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;WM_COMMAND - Infos:&amp;quot; &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;-----------------------------&amp;quot; &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;Code&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $nNotifyCode &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;CtrlID&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $nID &amp;amp; @CRLF &amp;amp; _&lt;br /&gt;
					&amp;quot;CtrlHWnd&amp;quot; &amp;amp; @TAB &amp;amp; &amp;quot;:&amp;quot; &amp;amp; $hCtrl)&lt;br /&gt;
		EndIf&lt;br /&gt;
		Return 0 ; Only workout clicking on the button&lt;br /&gt;
	EndIf&lt;br /&gt;
	; Proceed the default AutoIt3 internal message commands.&lt;br /&gt;
	; You also can complete let the line out.&lt;br /&gt;
	; !!! But only &#039;Return&#039; (without any value) will not proceed&lt;br /&gt;
	; the default AutoIt3-message in the future !!!&lt;br /&gt;
	Return $GUI_RUNDEFMSG&lt;br /&gt;
EndFunc   ;==&amp;gt;MY_WM_COMMAND&lt;br /&gt;
&lt;br /&gt;
; RePost a WM_COMMAND message to a ctrl in a gui window&lt;br /&gt;
Func PostButtonClick($hWnd, $nCtrlID)&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;PostMessage&amp;quot;, _&lt;br /&gt;
			&amp;quot;hwnd&amp;quot;, $hWnd, _&lt;br /&gt;
			&amp;quot;int&amp;quot;, $WM_COMMAND, _&lt;br /&gt;
			&amp;quot;int&amp;quot;, BitAND($nCtrlID, 0x0000FFFF), _&lt;br /&gt;
			&amp;quot;hwnd&amp;quot;, GUICtrlGetHandle($nCtrlID))&lt;br /&gt;
EndFunc   ;==&amp;gt;PostButtonClick&lt;br /&gt;
&lt;br /&gt;
; Draw the button&lt;br /&gt;
Func MY_WM_DRAWITEM($hWnd, $Msg, $wParam, $lParam)&lt;br /&gt;
	#forceref $Msg, $wParam, $lParam&lt;br /&gt;
	Local $stDrawItem = DllStructCreate(&amp;quot;uint;uint;uint;uint;uint;uint;uint;int[4];dword&amp;quot;, $lParam)&lt;br /&gt;
	Local Const $ODT_BUTTON = 4&lt;br /&gt;
&lt;br /&gt;
	Local $nCtlType = DllStructGetData($stDrawItem, 1)&lt;br /&gt;
	If $nCtlType = $ODT_BUTTON Then&lt;br /&gt;
		; Local $nCtrlID = DllStructGetData($stDrawItem, 2)&lt;br /&gt;
		Local $nItemState = DllStructGetData($stDrawItem, 5)&lt;br /&gt;
		Local $hCtrl = DllStructGetData($stDrawItem, 6)&lt;br /&gt;
		Local $hDC = DllStructGetData($stDrawItem, 7)&lt;br /&gt;
		Local $nLeft = DllStructGetData($stDrawItem, 8, 1)&lt;br /&gt;
		Local $nTop = DllStructGetData($stDrawItem, 8, 2)&lt;br /&gt;
		Local $nRight = DllStructGetData($stDrawItem, 8, 3)&lt;br /&gt;
		Local $nBottom = DllStructGetData($stDrawItem, 8, 4)&lt;br /&gt;
		Local $sText = &amp;quot;Ownerdrawn Button&amp;quot;&lt;br /&gt;
		Local $nTextColor = 0x5555DD&lt;br /&gt;
		Local $nBackColor = 0xFFEEDD&lt;br /&gt;
		DrawButton($hWnd, $hCtrl, $hDC, $nLeft, $nTop, $nRight, $nBottom, $nItemState, $sText, $nTextColor, $nBackColor)&lt;br /&gt;
		$stDrawItem = 0&lt;br /&gt;
		Return 1&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	$stDrawItem = 0&lt;br /&gt;
	Return $GUI_RUNDEFMSG ; Proceed the default AutoIt3 internal message commands&lt;br /&gt;
EndFunc   ;==&amp;gt;MY_WM_DRAWITEM&lt;br /&gt;
&lt;br /&gt;
; The main drawing procedure&lt;br /&gt;
Func DrawButton($hWnd, $hCtrl, $hDC, $nLeft, $nTop, $nRight, $nBottom, $nItemState, $sText, $nTextColor, $nBackColor)&lt;br /&gt;
	#forceref $hWnd&lt;br /&gt;
	;Local $bDefault	= FALSE&lt;br /&gt;
	Local Const $GWL_STYLE = -16&lt;br /&gt;
	Local Const $ODS_SELECTED = 0x0001&lt;br /&gt;
	Local Const $ODS_GRAYED = 0x0002&lt;br /&gt;
	Local Const $ODS_DISABLED = 0x0004&lt;br /&gt;
	; Local Const $ODS_CHECKED = 0x0008&lt;br /&gt;
	Local Const $ODS_FOCUS = 0x0010&lt;br /&gt;
	; Local Const $ODS_HOTLIGHT = 0x0040&lt;br /&gt;
	; Local Const $ODS_INACTIVE = 0x0080&lt;br /&gt;
	; Local Const $ODS_NOACCEL = 0x0100&lt;br /&gt;
	; Local Const $ODS_NOFOCUSRECT = 0x0200&lt;br /&gt;
	Local Const $DFC_BUTTON = 4&lt;br /&gt;
	Local Const $DFCS_BUTTONPUSH = 0x0010&lt;br /&gt;
	; Local $bChecked = BitAND($nItemState, $ODS_CHECKED)&lt;br /&gt;
	Local $bFocused = BitAND($nItemState, $ODS_FOCUS)&lt;br /&gt;
	Local $bGrayed = BitAND($nItemState, BitOR($ODS_GRAYED, $ODS_DISABLED))&lt;br /&gt;
	Local $bSelected = BitAND($nItemState, $ODS_SELECTED)&lt;br /&gt;
&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	Local $nClrTxt&lt;br /&gt;
	If $bGrayed Then&lt;br /&gt;
		$nClrTxt = SetTextColor($hDC, GetSysColor($COLOR_HIGHLIGHTTEXT))&lt;br /&gt;
	ElseIf $nTextColor = -1 Then&lt;br /&gt;
		$nClrTxt = SetTextColor($hDC, GetSysColor($COLOR_BTNTEXT))&lt;br /&gt;
	Else&lt;br /&gt;
		$nClrTxt = SetTextColor($hDC, $nTextColor)&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	Local $hBrush, $nClrSel&lt;br /&gt;
	If $nBackColor = -1 Then&lt;br /&gt;
		$hBrush = GetSysColorBrush($COLOR_BTNFACE)&lt;br /&gt;
		$nClrSel = GetSysColor($COLOR_BTNFACE)&lt;br /&gt;
	Else&lt;br /&gt;
		$hBrush = CreateSolidBrush($nBackColor)&lt;br /&gt;
		$nClrSel = $nBackColor;&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	Local $nClrBk = SetBkColor($hDC, $nClrSel)&lt;br /&gt;
	Local $hOldBrush = SelectObject($hDC, $hBrush)&lt;br /&gt;
&lt;br /&gt;
	Local $nTmpLeft = $nLeft&lt;br /&gt;
	Local $nTmpTop = $nTop&lt;br /&gt;
	Local $nTmpRight = $nRight&lt;br /&gt;
	Local $nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
	If $bSelected Then&lt;br /&gt;
		InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -1, -1)&lt;br /&gt;
		Local $hBrushSel = CreateSolidBrush(GetSysColor($COLOR_BTNSHADOW))&lt;br /&gt;
		FrameRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $hBrushSel)&lt;br /&gt;
		DeleteObject($hBrushSel)&lt;br /&gt;
	Else&lt;br /&gt;
		If $bFocused And Not $bSelected Then InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -1, -1)&lt;br /&gt;
		DrawFrameControl($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $DFC_BUTTON, $DFCS_BUTTONPUSH)&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	$nTmpLeft = $nLeft&lt;br /&gt;
	$nTmpTop = $nTop&lt;br /&gt;
	$nTmpRight = $nRight&lt;br /&gt;
	$nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
	If $bSelected Then&lt;br /&gt;
		InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -2, -2)&lt;br /&gt;
	Else&lt;br /&gt;
		If $bFocused And Not $bSelected Then&lt;br /&gt;
			InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -3, -3)&lt;br /&gt;
			$nTmpLeft -= 1&lt;br /&gt;
			$nTmpTop -= 1&lt;br /&gt;
		Else&lt;br /&gt;
			InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -2, -2)&lt;br /&gt;
			$nTmpLeft -= 1&lt;br /&gt;
			$nTmpTop -= 1&lt;br /&gt;
		EndIf&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	FillRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $hBrush)&lt;br /&gt;
&lt;br /&gt;
	If $bSelected Or $bGrayed Then&lt;br /&gt;
		$nTmpLeft = $nTmpLeft + 2&lt;br /&gt;
		$nTmpTop = $nTmpTop + 2&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	Local $uFlags = BitOR($DT_NOCLIP, $DT_CENTER, $DT_VCENTER)&lt;br /&gt;
&lt;br /&gt;
	If Not BitAND(GetWindowLong($hCtrl, $GWL_STYLE), $BS_MULTILINE) Then $uFlags = BitOR($uFlags, $DT_SINGLELINE)&lt;br /&gt;
&lt;br /&gt;
	DrawText($hDC, $sText, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $uFlags)&lt;br /&gt;
&lt;br /&gt;
	If $bGrayed Then&lt;br /&gt;
		$nTmpLeft = $nLeft&lt;br /&gt;
		$nTmpTop = $nTop&lt;br /&gt;
		$nTmpRight = $nRight&lt;br /&gt;
		$nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
		$nTmpLeft -= 1&lt;br /&gt;
&lt;br /&gt;
		$nClrTxt = SetTextColor($hDC, GetSysColor($COLOR_GRAYTEXT))&lt;br /&gt;
		DrawText($hDC, $sText, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, BitOR($DT_NOCLIP, $DT_CENTER, $DT_VCENTER, $DT_SINGLELINE))&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	$nTmpLeft = $nLeft&lt;br /&gt;
	$nTmpTop = $nTop&lt;br /&gt;
	$nTmpRight = $nRight&lt;br /&gt;
	$nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
	If $bFocused Then&lt;br /&gt;
		$hBrush = CreateSolidBrush(0)&lt;br /&gt;
		FrameRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $hBrush)&lt;br /&gt;
&lt;br /&gt;
		$nTmpLeft = $nLeft&lt;br /&gt;
		$nTmpTop = $nTop&lt;br /&gt;
		$nTmpRight = $nRight&lt;br /&gt;
		$nTmpBottom = $nBottom&lt;br /&gt;
&lt;br /&gt;
		InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -4, -4)&lt;br /&gt;
		DrawFocusRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom)&lt;br /&gt;
	EndIf&lt;br /&gt;
&lt;br /&gt;
	SelectObject($hDC, $hOldBrush)&lt;br /&gt;
	DeleteObject($hBrush)&lt;br /&gt;
	SetTextColor($hDC, $nClrTxt)&lt;br /&gt;
	SetBkColor($hDC, $nClrBk)&lt;br /&gt;
&lt;br /&gt;
	Return 1&lt;br /&gt;
EndFunc   ;==&amp;gt;DrawButton&lt;br /&gt;
&lt;br /&gt;
; Some graphic / windows functions&lt;br /&gt;
Func CreateSolidBrush($nColor)&lt;br /&gt;
	Local $hBrush = DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;CreateSolidBrush&amp;quot;, &amp;quot;int&amp;quot;, $nColor)&lt;br /&gt;
	Return $hBrush[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;CreateSolidBrush&lt;br /&gt;
&lt;br /&gt;
Func GetSysColor($nIndex)&lt;br /&gt;
	Local $nColor = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;GetSysColor&amp;quot;, &amp;quot;int&amp;quot;, $nIndex)&lt;br /&gt;
	Return $nColor[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;GetSysColor&lt;br /&gt;
&lt;br /&gt;
Func GetSysColorBrush($nIndex)&lt;br /&gt;
	Local $hBrush = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;GetSysColorBrush&amp;quot;, &amp;quot;int&amp;quot;, $nIndex)&lt;br /&gt;
	Return $hBrush[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;GetSysColorBrush&lt;br /&gt;
&lt;br /&gt;
Func DrawFrameControl($hDC, $nLeft, $nTop, $nRight, $nBottom, $nType, $nState)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;DrawFrameControl&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;int&amp;quot;, $nType, &amp;quot;int&amp;quot;, $nState)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;DrawFrameControl&lt;br /&gt;
&lt;br /&gt;
Func DrawFocusRect($hDC, $nLeft, $nTop, $nRight, $nBottom)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;DrawFocusRect&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect))&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;DrawFocusRect&lt;br /&gt;
&lt;br /&gt;
Func DrawText($hDC, $sText, $nLeft, $nTop, $nRight, $nBottom, $nFormat)&lt;br /&gt;
	Local $nLen = StringLen($sText)&lt;br /&gt;
&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	Local $stText = DllStructCreate(&amp;quot;char[260]&amp;quot;)&lt;br /&gt;
	DllStructSetData($stText, 1, $sText)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;DrawText&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stText), &amp;quot;int&amp;quot;, $nLen, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;int&amp;quot;, $nFormat)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
	$stText = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;DrawText&lt;br /&gt;
&lt;br /&gt;
Func FillRect($hDC, $nLeft, $nTop, $nRight, $nBottom, $hBrush)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;FillRect&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;hwnd&amp;quot;, $hBrush)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;FillRect&lt;br /&gt;
&lt;br /&gt;
Func FrameRect($hDC, $nLeft, $nTop, $nRight, $nBottom, $hBrush)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;FrameRect&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;hwnd&amp;quot;, $hBrush)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;FrameRect&lt;br /&gt;
&lt;br /&gt;
Func InflateRect(ByRef $nLeft, ByRef $nTop, ByRef $nRight, ByRef $nBottom, $nX, $nY)&lt;br /&gt;
	Local $stRect = DllStructCreate(&amp;quot;int;int;int;int&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	DllStructSetData($stRect, 1, $nLeft)&lt;br /&gt;
	DllStructSetData($stRect, 2, $nTop)&lt;br /&gt;
	DllStructSetData($stRect, 3, $nRight)&lt;br /&gt;
	DllStructSetData($stRect, 4, $nBottom)&lt;br /&gt;
&lt;br /&gt;
	DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;InflateRect&amp;quot;, &amp;quot;ptr&amp;quot;, DllStructGetPtr($stRect), &amp;quot;int&amp;quot;, $nX, &amp;quot;int&amp;quot;, $nY)&lt;br /&gt;
&lt;br /&gt;
	$nLeft = DllStructGetData($stRect, 1)&lt;br /&gt;
	$nTop = DllStructGetData($stRect, 2)&lt;br /&gt;
	$nRight = DllStructGetData($stRect, 3)&lt;br /&gt;
	$nBottom = DllStructGetData($stRect, 4)&lt;br /&gt;
&lt;br /&gt;
	$stRect = 0&lt;br /&gt;
EndFunc   ;==&amp;gt;InflateRect&lt;br /&gt;
&lt;br /&gt;
Func SetBkColor($hDC, $nColor)&lt;br /&gt;
	Local $nOldColor = DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;SetBkColor&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;int&amp;quot;, $nColor)&lt;br /&gt;
	Return $nOldColor[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;SetBkColor&lt;br /&gt;
&lt;br /&gt;
Func SetTextColor($hDC, $nColor)&lt;br /&gt;
	Local $nOldColor = DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;SetTextColor&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;int&amp;quot;, $nColor)&lt;br /&gt;
	Return $nOldColor[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;SetTextColor&lt;br /&gt;
&lt;br /&gt;
Func SelectObject($hDC, $hObj)&lt;br /&gt;
	Local $hOldObj = DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;SelectObject&amp;quot;, &amp;quot;hwnd&amp;quot;, $hDC, &amp;quot;hwnd&amp;quot;, $hObj)&lt;br /&gt;
	Return $hOldObj[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;SelectObject&lt;br /&gt;
&lt;br /&gt;
Func DeleteObject($hObj)&lt;br /&gt;
	DllCall(&amp;quot;gdi32.dll&amp;quot;, &amp;quot;hwnd&amp;quot;, &amp;quot;DeleteObject&amp;quot;, &amp;quot;hwnd&amp;quot;, $hObj)&lt;br /&gt;
EndFunc   ;==&amp;gt;DeleteObject&lt;br /&gt;
&lt;br /&gt;
Func GetWindowLong($hWnd, $nIndex)&lt;br /&gt;
	Local $nVal = DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;GetWindowLong&amp;quot;, &amp;quot;hwnd&amp;quot;, $hWnd, &amp;quot;int&amp;quot;, $nIndex)&lt;br /&gt;
	Return $nVal[0]&lt;br /&gt;
EndFunc   ;==&amp;gt;GetWindowLong&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=ControlTreeView&amp;diff=11871</id>
		<title>ControlTreeView</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=ControlTreeView&amp;diff=11871"/>
		<updated>2013-08-18T07:31:30Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
Sends a command to a TreeView32 control.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ControlTreeView ( &amp;quot;title&amp;quot;, &amp;quot;text&amp;quot;, controlID, &amp;quot;command&amp;quot; [, option1 [, option2]] )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{| border=&#039;1&#039; class=&#039;wikitable&#039;&lt;br /&gt;
| title || The title/hWnd/class of the window to access.&lt;br /&gt;
|-&lt;br /&gt;
| text || The text of the window to access.&lt;br /&gt;
|-&lt;br /&gt;
| controlID || The control to interact with.  See [[Controls]]&lt;br /&gt;
|-&lt;br /&gt;
| command || The command to send to the control (see below).&lt;br /&gt;
|-&lt;br /&gt;
| option1 || [optional] Additional parameter required by some commands.&lt;br /&gt;
|-&lt;br /&gt;
| option2 || [optional] Additional parameter required by some commands.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
Depends on command as table below shows.  In case of an error (such as an invalid command or window/control could not be found) then @error is set to 1.&lt;br /&gt;
&lt;br /&gt;
{| border=&#039;1&#039; class=&#039;wikitable&#039;&lt;br /&gt;
! scope=&#039;col&#039; | &#039;&#039;&#039;Command&#039;&#039;&#039;, &#039;&#039;&#039;Option1&#039;&#039;&#039;, &#039;&#039;&#039;Option2&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;item&amp;quot; parameter is a string-based parameter that is used to reference a particular treeview item using a combination of text and indices.  Indices are 0-based.  For example:&lt;br /&gt;
&lt;br /&gt;
Heading1&lt;br /&gt;
----&amp;gt; H1SubItem1&lt;br /&gt;
----&amp;gt; H1SubItem2&lt;br /&gt;
----&amp;gt; H1SubItem3&lt;br /&gt;
----&amp;gt; ----&amp;gt; H1S1SubItem1&lt;br /&gt;
Heading2&lt;br /&gt;
Heading3&lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;level&amp;quot; is separated by |. An index is preceded with #.  Examples:&lt;br /&gt;
{| border=&#039;1&#039; class=&#039;wikitable&#039;&lt;br /&gt;
! scope=&#039;col&#039; | &amp;lt;b&amp;gt;Item&amp;lt;/b&amp;gt;&lt;br /&gt;
! scope=&#039;col&#039; | &amp;lt;b&amp;gt;Item Reference&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Heading2 || &amp;quot;Heading2&amp;quot; or &amp;quot;#1&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
| H1SubItem2 || &amp;quot;Heading1|H1SubItem2&amp;quot; or &amp;quot;#0|#1&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
| H1S1SubItem1 || &amp;quot;Heading1|H1SubItem3|H1S1SubItem1&amp;quot; or &amp;quot;#0|#2|#0&amp;quot; &lt;br /&gt;
|}&lt;br /&gt;
References can also be mixed like &amp;quot;Heading1|#1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Remarks==&lt;br /&gt;
As AutoIt is a 32-bit application some commands are not available when referencing a 64-bit application as Explorer when running on 64-bit Windows.&lt;br /&gt;
&lt;br /&gt;
==Related==&lt;br /&gt;
[[ControlCommand]]&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;GUIConstantsEx.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;TreeViewConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;WindowsConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	Local $hGUI = GUICreate(&amp;quot;ControlTreeView Example&amp;quot;, 212, 212)&lt;br /&gt;
	Local $iTreeView_1 = GUICtrlCreateTreeView(6, 6, 200, 160, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_CHECKBOXES), $WS_EX_CLIENTEDGE)&lt;br /&gt;
	Local $hTreeView_1 = ControlGetHandle($hGUI, &amp;quot;&amp;quot;, $iTreeView_1)&lt;br /&gt;
&lt;br /&gt;
	Local $iRoot = GUICtrlCreateTreeViewItem(&amp;quot;Root&amp;quot;, $iTreeView_1)&lt;br /&gt;
	GUICtrlCreateTreeViewItem(&amp;quot;Item 1&amp;quot;, $iRoot)&lt;br /&gt;
	GUICtrlCreateTreeViewItem(&amp;quot;Item 2&amp;quot;, $iRoot)&lt;br /&gt;
	GUICtrlCreateTreeViewItem(&amp;quot;Item 3&amp;quot;, $iRoot)&lt;br /&gt;
	Local $iItem_4 = GUICtrlCreateTreeViewItem(&amp;quot;Item 4&amp;quot;, $iRoot)&lt;br /&gt;
	GUICtrlCreateTreeViewItem(&amp;quot;Item 4.1&amp;quot;, $iItem_4)&lt;br /&gt;
	GUICtrlCreateTreeViewItem(&amp;quot;Item 4.2&amp;quot;, $iItem_4)&lt;br /&gt;
	GUICtrlCreateTreeViewItem(&amp;quot;Item 5&amp;quot;, $iRoot)&lt;br /&gt;
&lt;br /&gt;
	GUISetState(@SW_SHOW, $hGUI)&lt;br /&gt;
&lt;br /&gt;
	ControlTreeView($hGUI, &amp;quot;&amp;quot;, $hTreeView_1, &amp;quot;Expand&amp;quot;, &amp;quot;Root&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	ControlTreeView($hGUI, &amp;quot;&amp;quot;, $hTreeView_1, &amp;quot;Exists&amp;quot;, &amp;quot;Root|Item 4&amp;quot;)&lt;br /&gt;
	ControlTreeView($hGUI, &amp;quot;&amp;quot;, $hTreeView_1, &amp;quot;Check&amp;quot;, &amp;quot;Root|Item 4&amp;quot;)&lt;br /&gt;
	ControlTreeView($hGUI, &amp;quot;&amp;quot;, $hTreeView_1, &amp;quot;Select&amp;quot;, &amp;quot;Root|Item 4&amp;quot;)&lt;br /&gt;
	ControlTreeView($hGUI, &amp;quot;&amp;quot;, $hTreeView_1, &amp;quot;Expand&amp;quot;, &amp;quot;Root|Item 4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	While 1&lt;br /&gt;
		Switch GUIGetMsg()&lt;br /&gt;
			Case $GUI_EVENT_CLOSE&lt;br /&gt;
				ExitLoop&lt;br /&gt;
		EndSwitch&lt;br /&gt;
	WEnd&lt;br /&gt;
&lt;br /&gt;
	GUIDelete($hGUI)&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=ControlCommand&amp;diff=11870</id>
		<title>ControlCommand</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=ControlCommand&amp;diff=11870"/>
		<updated>2013-08-18T07:30:35Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
Sends a command to a control.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ControlCommand ( &amp;quot;title&amp;quot;, &amp;quot;text&amp;quot;, controlID, &amp;quot;command&amp;quot; [, &amp;quot;option&amp;quot;] )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{| border=&#039;1&#039; class=&#039;wikitable&#039;&lt;br /&gt;
| title || The title/hWnd/class of the window to access.&lt;br /&gt;
|-&lt;br /&gt;
| text || The text of the window to access.&lt;br /&gt;
|-&lt;br /&gt;
| controlID || The control to interact with.  See [[Controls]]&lt;br /&gt;
|-&lt;br /&gt;
| command || The command to send to the control.&lt;br /&gt;
|-&lt;br /&gt;
| option || [optional] Additional parameter required by some commands.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
Depends on command as table below shows.  In case of an error (such as an invalid command or window/control), @error=1.&lt;br /&gt;
&lt;br /&gt;
{| border=&#039;1&#039; class=&#039;wikitable&#039;&lt;br /&gt;
! scope=&#039;col&#039; | &#039;&#039;&#039;Command&#039;&#039;&#039;, &#039;&#039;&#039;Option&#039;&#039;&#039;&lt;br /&gt;
! scope=&#039;col&#039; | &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsVisible&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Control is visible, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsEnabled&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Control is enabled, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;ShowDropDown&amp;quot;, &amp;quot;&amp;quot; || Displays the ComboBox dropdown&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;HideDropDown&amp;quot;, &amp;quot;&amp;quot; || Hides the ComboBox dropdown&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;AddString&amp;quot;, &#039;string&#039; || Adds a string to the end in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;DelString&amp;quot;, occurrence || Deletes a string according to occurrence in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;FindString&amp;quot;, &#039;string&#039; || Returns occurrence ref of the exact string in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SetCurrentSelection&amp;quot;, &#039;&#039;occurrence&#039;&#039; || Sets selection to occurrence ref in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SelectString&amp;quot;, &#039;string&#039; || Sets selection according to string in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;IsChecked&amp;quot;, &amp;quot;&amp;quot; || Returns 1 if Button is checked, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;Check&amp;quot;, &amp;quot;&amp;quot; || Checks radio or check Button&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;UnCheck&amp;quot;, &amp;quot;&amp;quot; || Unchecks radio or check Button&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentLine&amp;quot;, &amp;quot;&amp;quot; || Returns the line # where the caret is in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentCol&amp;quot;, &amp;quot;&amp;quot; || Returns the column # where the caret is in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetCurrentSelection&amp;quot;, &amp;quot;&amp;quot; || Returns name of the currently selected item in a ListBox or ComboBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetLineCount&amp;quot;, &amp;quot;&amp;quot; || Returns # of lines in an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetLine&amp;quot;, &#039;&#039;line&#039;&#039;# || Returns text at line # passed of an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;GetSelected&amp;quot;, &amp;quot;&amp;quot; || Returns selected text of an Edit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;EditPaste&amp;quot;, &#039;string&#039; || Pastes the &#039;string&#039; at the Edit&#039;s caret position&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;CurrentTab&amp;quot;, &amp;quot;&amp;quot; || Returns the current Tab shown of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;TabRight&amp;quot;, &amp;quot;&amp;quot; || Moves to the next tab to the right of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;TabLeft&amp;quot;, &amp;quot;&amp;quot; || Moves to the next tab to the left of a SysTabControl32&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;SendCommandID&amp;quot;, &#039;&#039;Command ID&#039;&#039; || Simulates the WM_COMMAND message. Usually used for ToolbarWindow32 controls - use the ToolBar tab of Au3Info to get the Command ID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Remarks==&lt;br /&gt;
Some controls will resist automation unless they are the active window. Use the [[WinActivate]] function to force the control&#039;s window to the top before using [[WinActivate]] on these controls.&lt;br /&gt;
&lt;br /&gt;
Certain commands that work on normal Combo and ListBoxes do not work on &amp;quot;ComboLBox&amp;quot; controls.&lt;br /&gt;
&lt;br /&gt;
==Related==&lt;br /&gt;
[[ControlTreeView]]&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example()&lt;br /&gt;
&lt;br /&gt;
Func Example()&lt;br /&gt;
	; Run Notepad&lt;br /&gt;
	Run(&amp;quot;notepad.exe&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	; Wait 10 seconds for the Notepad window to appear.&lt;br /&gt;
	Local $hWnd = WinWait(&amp;quot;[CLASS:Notepad]&amp;quot;, &amp;quot;&amp;quot;, 10)&lt;br /&gt;
&lt;br /&gt;
	; Send a command to the edit control of Notepad to find the number of lines. The handle returned by WinWait is used for the &amp;quot;title&amp;quot; parameter of ControlCommand.&lt;br /&gt;
	Local $iCount = ControlCommand($hWnd, &amp;quot;&amp;quot;, &amp;quot;Edit1&amp;quot;, &amp;quot;GetLineCount&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	; Display the number of lines.&lt;br /&gt;
	MsgBox($MB_SYSTEMMODAL, &amp;quot;&amp;quot;, &amp;quot;The number of lines in Notepad are: &amp;quot; &amp;amp; $iCount)&lt;br /&gt;
&lt;br /&gt;
	; Close the Notepad window using the handle returned by WinWait.&lt;br /&gt;
	WinClose($hWnd)&lt;br /&gt;
EndFunc   ;==&amp;gt;Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11869</id>
		<title>AutoItSetOption</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=AutoItSetOption&amp;diff=11869"/>
		<updated>2013-08-18T06:42:13Z</updated>

		<summary type="html">&lt;p&gt;Jaberwocky6669: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Description==&lt;br /&gt;
Changes the operation of various AutoIt functions/parameters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AutoItSetOption ( &amp;quot;option&amp;quot; [, param] )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
{| border=&#039;1&#039; class=&#039;wikitable&#039;&lt;br /&gt;
| option || The option to change. See Remarks.&lt;br /&gt;
|-&lt;br /&gt;
| param || [optional] The value to assign to the option. The type and meaning vary by option. See remarks below. If the param is not provided, then the function just returns the value already assigned to the option. The keyword [[Default]] can be used for the parameter to reset the option to its default value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
{|&lt;br /&gt;
| Success: || 	Returns the value of the previous setting for the option.&lt;br /&gt;
|-&lt;br /&gt;
| Failure: || 	Sets @error to non-zero. Failure will occur if the parameters are invalid (such as an option that doesn&#039;t exist).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Remarks==&lt;br /&gt;
You may use [[Opt]] as an alternative to [[Opt]]&lt;br /&gt;
&lt;br /&gt;
Options are as follows:&lt;br /&gt;
{| border=&#039;1&#039; class=&#039;wikitable&#039;&lt;br /&gt;
| &#039;&#039;&#039;Option&#039;&#039;&#039; || &#039;&#039;&#039;Param&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;CaretCoordMode&#039;&#039;&#039; || 0 = relative coords to the active window&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;ExpandEnvStrings&#039;&#039;&#039; || 0 = do not expand environment variables (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = expand environment variables&lt;br /&gt;
|-&lt;br /&gt;
| || Without this option the usual way would be: 	&amp;quot;The temp directory is: &amp;quot; &amp;amp; [[EnvGet]](&amp;quot;temp&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;ExpandVarStrings&#039;&#039;&#039; || 0 = do not expand variables (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = expand variables (when in this mode and you want to use a literal $ or @ then double it up: &amp;quot;This is a single dollar $$ sign&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;GUICloseOnESC&#039;&#039;&#039; || 0 = Don&#039;t send the $GUI_EVENT_CLOSE message when ESC is pressed.&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = [[Send]] the $GUI_EVENT_CLOSE message when ESC is pressed (default).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;GUICoordMode&#039;&#039;&#039; || 0 = relative position to the start of the last control (upper left corner).&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = absolute coordinates (default) still relative to the dialog box.&lt;br /&gt;
|-&lt;br /&gt;
| || 2 = cell positioning relative to current cell. A -1 for left or top parameter don&#039;t increment the start.&lt;br /&gt;
|-&lt;br /&gt;
| || So next line is -1, offset; next cell is offset,-1; current cell is -1,-1.&lt;br /&gt;
|-&lt;br /&gt;
| || Obviously &amp;quot;offset&amp;quot; cannot be -1 which reserved to indicate the no increment. But if you can use a multiple of the width you choose to skip or go back.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;GUIDataSeparatorChar&#039;&#039;&#039; || The default character is &#039;|&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;GUIOnEventMode&#039;&#039;&#039; || 0 = (default) disable.&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = enable.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;GUIResizeMode&#039;&#039;&#039; || 0 = (default) keep default control resizing.&lt;br /&gt;
|-&lt;br /&gt;
| || &amp;amp;lt;1024 = any type of resizing see [[GUICtrlSetResizing]]&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;GUIEventOptions&#039;&#039;&#039; || 0 = (default) Windows behavior on click on Minimize,Restore, Maximize, Resize.&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = suppress windows behavior on minimize, restore or maximize click button or window resize. Just sends the notification.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;MouseClickDelay&#039;&#039;&#039; || Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;MouseClickDownDelay&#039;&#039;&#039; || Time in milliseconds to pause (default=10).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;MouseClickDragDelay&#039;&#039;&#039; || Time in milliseconds to pause (default=250).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;MouseCoordMode&#039;&#039;&#039; || 0 = relative coords to the active window&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 2 = relative coords to the client area of the active window&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;MustDeclareVars&#039;&#039;&#039; || 0 = Variables don&#039;t need to be pre-declared (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = Variables must be pre-declared&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;PixelCoordMode&#039;&#039;&#039; || 0 = relative coords to the defined window&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = absolute screen coordinates (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 2 = relative coords to the client area of the defined window&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;SendAttachMode&#039;&#039;&#039; || 0 = don&#039;t attach (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = attach&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;SendCapslockMode&#039;&#039;&#039; || 0 = don&#039;t store/restore&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = store and restore (default)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;SendKeyDelay&#039;&#039;&#039; || Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;SendKeyDownDelay&#039;&#039;&#039; || Time in milliseconds to pause (default=5).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;TCPTimeout&#039;&#039;&#039; || Time in milliseconds before timeout (default=100).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;TrayAutoPause&#039;&#039;&#039; || 0 = no pause&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = pause (default). If there is no DefaultMenu no pause will occurs.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;TrayIconDebug&#039;&#039;&#039; || 0 = no debug information (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = show debug&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;TrayIconHide&#039;&#039;&#039; || 0 = show icon (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = hide icon&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;TrayMenuMode&#039;&#039;&#039; || 0 = default menu items (Script Paused/Exit) are appended to the usercreated menu; usercreated checked items will automatically unchecked; if you double click the tray icon then the controlid is returned which has the &amp;quot;Default&amp;quot;-style (default).&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = no default menu&lt;br /&gt;
|-&lt;br /&gt;
| || 2 = user created checked items will not automatically unchecked if you click it&lt;br /&gt;
|-&lt;br /&gt;
| || 4 = don&#039;t return the menuitemID which has the &amp;quot;default&amp;quot;-style in the main contextmenu if you double click the tray icon&lt;br /&gt;
|-&lt;br /&gt;
| || 8 = turn off auto check of radio item groups&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;TrayOnEventMode&#039;&#039;&#039; || 0 = (default) disable&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = enable&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;WinDetectHiddenText&#039;&#039;&#039; || 0 = Do not detect hidden text (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = Detect hidden text&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;WinSearchChildren&#039;&#039;&#039; || 0 = Only search top-level windows (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 1 = Search top-level and child windows&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;WinTextMatchMode&#039;&#039;&#039; || 1 = Complete / Slow mode (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 2 = Quick mode&lt;br /&gt;
|-&lt;br /&gt;
| || In quick mode AutoIt can usually only &amp;quot;see&amp;quot; dialog text, button text and the captions of some controls. In the default mode much more text can be seen (for instance the contents of the Notepad window).&lt;br /&gt;
|-&lt;br /&gt;
| || If you are having performance problems when performing many window searches then changing to the &amp;quot;quick&amp;quot; mode may help.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;WinTitleMatchMode&#039;&#039;&#039; || 1 = Match the title from the start (default)&lt;br /&gt;
|-&lt;br /&gt;
| || 2 = Match any substring in the title&lt;br /&gt;
|-&lt;br /&gt;
| || 3 = Exact title match&lt;br /&gt;
|-&lt;br /&gt;
| || 4 = Advanced mode, see &amp;lt;a href=&amp;quot;../intro/windowsadvanced.htm&amp;quot;&amp;gt;Window Titles &amp;amp; Text (Advanced)&amp;lt;/a&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| || -1 to -4 = force lower case match according to other type of match (case-insensitive match.)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;WinWaitDelay&#039;&#039;&#039; || Time in milliseconds to pause (default=250).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;autoit&#039;&amp;gt;&lt;br /&gt;
; copy any you want to change   ;default value is listed first&lt;br /&gt;
&lt;br /&gt;
Opt(&amp;quot;CaretCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;ExpandEnvStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;ExpandVarStrings&amp;quot;, 0) ;0=don&#039;t expand, 1=do expand&lt;br /&gt;
Opt(&amp;quot;GUICloseOnESC&amp;quot;, 1) ;1=ESC  closes, 0=ESC won&#039;t close&lt;br /&gt;
Opt(&amp;quot;GUICoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=cell&lt;br /&gt;
Opt(&amp;quot;GUIDataSeparatorChar&amp;quot;, &amp;quot;|&amp;quot;) ;&amp;quot;|&amp;quot; is the default&lt;br /&gt;
Opt(&amp;quot;GUIOnEventMode&amp;quot;, 0) ;0=disabled, 1=OnEvent mode enabled&lt;br /&gt;
Opt(&amp;quot;GUIResizeMode&amp;quot;, 0) ;0=no resizing, &amp;lt;1024 special resizing&lt;br /&gt;
Opt(&amp;quot;GUIEventOptions&amp;quot;, 0) ;0=default, 1=just notification, 2=GUICtrlRead tab index&lt;br /&gt;
Opt(&amp;quot;MouseClickDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDownDelay&amp;quot;, 10) ;10 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseClickDragDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
Opt(&amp;quot;MouseCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;MustDeclareVars&amp;quot;, 0) ;0=no, 1=require pre-declaration&lt;br /&gt;
Opt(&amp;quot;PixelCoordMode&amp;quot;, 1) ;1=absolute, 0=relative, 2=client&lt;br /&gt;
Opt(&amp;quot;SendAttachMode&amp;quot;, 0) ;0=don&#039;t attach, 1=do attach&lt;br /&gt;
Opt(&amp;quot;SendCapslockMode&amp;quot;, 1) ;1=store and restore, 0=don&#039;t&lt;br /&gt;
Opt(&amp;quot;SendKeyDelay&amp;quot;, 5) ;5 milliseconds&lt;br /&gt;
Opt(&amp;quot;SendKeyDownDelay&amp;quot;, 1) ;1 millisecond&lt;br /&gt;
Opt(&amp;quot;TCPTimeout&amp;quot;, 100) ;100 milliseconds&lt;br /&gt;
Opt(&amp;quot;TrayAutoPause&amp;quot;, 1) ;0=no pause, 1=Pause&lt;br /&gt;
Opt(&amp;quot;TrayIconDebug&amp;quot;, 0) ;0=no info, 1=debug line info&lt;br /&gt;
Opt(&amp;quot;TrayIconHide&amp;quot;, 0) ;0=show, 1=hide tray icon&lt;br /&gt;
Opt(&amp;quot;TrayMenuMode&amp;quot;, 0) ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID  not return&lt;br /&gt;
Opt(&amp;quot;TrayOnEventMode&amp;quot;, 0) ;0=disable, 1=enable&lt;br /&gt;
Opt(&amp;quot;WinDetectHiddenText&amp;quot;, 0) ;0=don&#039;t detect, 1=do detect&lt;br /&gt;
Opt(&amp;quot;WinSearchChildren&amp;quot;, 1) ;0=no, 1=search children also&lt;br /&gt;
Opt(&amp;quot;WinTextMatchMode&amp;quot;, 1) ;1=complete, 2=quick&lt;br /&gt;
Opt(&amp;quot;WinTitleMatchMode&amp;quot;, 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase&lt;br /&gt;
Opt(&amp;quot;WinWaitDelay&amp;quot;, 250) ;250 milliseconds&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
</feed>