This test references beta build help file 3.1.1.128. In some cases in the remarks, Quotes will be taken from the Forum. I will do my best to quote the author. 1. AutoIt v3 is a freeware ______-like scripting language designed for automating the Windows GUI. a. C+ b. C++ c. Python d. BASIC Answer: d 2. Which one of these can AutoIt NOT do? a. Execute Windows and DOS executables b. Simulate key strokes (supports most keyboards layouts) c. Simulate mouse movements and clicks d. Move, resize and manipulate windows e. Excacute programs at the assembly level. f. Interact directly with "controls" on a window (set/get text, move, disable, etc.) g. Work with the clipboard to cut/paste text items h. Work with the registry Answer: e 3. AutoIt v3 standalone requires registry entries. A. True b. False Answer: b More information: As with previous versions, AutoIt has been designed to be as small as possible (~115KB) and stand-alone with no external .dll files or registry entries required. Scripts can also be compiled into stand-alone executables with Aut2Exe. 4. The DLL version of AutoIt is called a. AutoIt X3 b. AutoIt DLL c. AutoItX d. AutoDll Answer: c More Information: There have also been updates to the ActiveX and DLL versions of AutoIt called AutoItX - unlike v2 this will be a combined control (COM and standard DLL functions in the same DLL). AutoItX will allow you to add the unique features of AutoIt to your own favourite scripting or programming languages! See the AutoItX Help file (Start \ AutoIt v3 \ Extras \ AutoItX \ AutoItX Help File) for more information and examples. 5. V3 and V2.64 have compatable syntax. a. True b. False Answer: b More Information: v3 has a completely different syntax to v2.64 so old scripts are not compatible. However, v2.64 will continue to be supported and downloadable. Both AutoIt v3 and v2.64 can be installed on the same machine together without any problems and you can keep your old scripts intact. v2 uses the .aut extension and v3 uses .au3. There is rarely a need to rewrite a working v2.64 script for v3. 6. Directly get information on and interact with edit boxes, check boxes, list boxes, combos, buttons, status bars without the risk of keystrokes getting lost is called working with a. interacts b. controls c. functions d. bases Answer: b More Information: You can use the AU3Info to gather information on the control you wish to interact with. Even work with controls in windows that aren't active! 7. With AutoIt v3, you can use: (select 4) a. limited lenth strings b. Goto statements c. if statements d. while loops e. functions f. if arrays g. do loops Answer: c, d, e, g More Information: "Proper" numbers, unlimited-length strings, complex expressions, if statements, select, while loops, for loops, do loops, functions, arrays, excellent string handling (over 25 functions!) - the list goes on. Everything you need to make your automation routines as painless as possible. Yes, this is a GUI automation language but the syntax in v3 is powerful enough for general purpose scripting. Old versions of AutoIt were often referred to as "not a proper language". Not any more.
AutoIt v3 doesn't use Goto statements. From the help file:

Where is the "goto" command?

Gone.  It's evil.  No, you can't ask why - it just is.  It's like that lump of rock they find in the microwave at the end of the film Time Bandits :)

AutoIt v3 features most of the common "loops" in use today and with these Goto is no longer required.  Look up While, Do, For, ExitLoop, ContinueLoop and Functions for the modern way of doing things :)  And while you are looking at help file sections check out these on loops, conditional statements and functions.  I promise you, once you have got the hang of such things you will be able to script in virtually any other language within a couple of minutes.

Just to get you started, the most basic use of Goto in version 2.64 was an infinite loop like:

:mylabel
...do something...
...and something else...
goto, mylabel

A simple v3 version of that is a While loop that is always "true".

While 1 = 1
   ...do something...
   ...do something else...
Wend

If there is a massive outcry about this after the launch of v3 then I may add it back in, but only to help people convert scripts.

8. You can access windows by: (select 3) a. "title/text" b. string names c. class names d. string handles e. handles f. pixel color point Answer: a, c, e More Information: From the help file:

Window Management

In addition to the "title/text" v2 way of accessing windows you can also access windows by their class names and handles. As usual you can expect to move, hide, show, resize, activate, close and pretty much do what you want with windows.

9. What is required to run a AutoIt v3 Script? a. You must have installed the AutoIt 3.1.1 installation package b. You must have AutoIt 3.1.1, the latest AutoIt beta, and a script editor such as SciTE c. You need only to run AutoIt3.exe d. You need AutoItv3.exe, and a script editor. Answer: c More Information: AutoIt3.exe is the AutoIt main program and only file required to run scripts. 10. The AutoIt information tool is called: a. AutoIt.chm b. AU3Info.exe c. AUtInfo.exe d. AutoIt3.exe Answer: b More Information: AU3Info.exe is the AutoIt Window Info Tool. 11. Aut2Exe.exe is used for: a. Executable stub for compiled scripts b. The script compiler c. The script decompiler d. Process...() function helper DLL - used under Windows NT 4 only (Microsoft redistributable file) Answer: B More Information:
Compiling Scripts with Aut2Exe

12. The program UPX.exe is used to a. Converts EXE files to scripts b. Converts 2.64 EXE files to scripts c. Converts 2.64 scripts to 3.1.1 scripts d. Shrinks the size of EXE files Answer: D 13. What way is correct to run a DOS "DIR" command? a. RunWait(@COMSPEC & " /c Dir C:\") b. Run(@COMSPEC & " /c Dir C:\") c. Run("Command.com /"DIR"") d. Runwait("Command.com /"DIR" , C:\ /S") Answer: A More Information:
Using the @Comspec macro
_RunDOS 14. How do you run the file bagel.msi? a. runwait("Bagel.msi", "", 3) b. run("Bagel.msi") c. RunWait("msiexec Bagel.msi") d. Run("msiexec Bagel.msi") Answer: c More Information:
How to run a MSI file 15. You want the following sentence to appear in a msgbox as shown below:

    A word in "this" sentence has quotes around it!

How would you code this so the quotes appear when the msgbox is displayed? a. Msgbox(0, "", "A word in "this" sentence has quotes around it!") b. Msgbox(0, "", "A word in """this""" sentence has quotes around it!") c. Msgbox(0, "", 'A word in 'this' sentence has quotes around it!') d. Msgbox(0, "", "A word in ""this"" sentence has quotes around it!") Answer: D More Information:
Using double quotes 16. Will the following code work so the sentence "I love a bagel" will show in a msgbox?

    $msg="a bagel"
    msgbox(0, "", "I love $MSG") a. yes b. no Answer: b More Information:
Why can't I print a variable using "My var is $variable"? 17. What is the file extension for a AutoIt v3 Script? a. aut b. au3 c. at3 d. ats Answer: b 18. How do you comment out a line? a. rem b. # c. ; d. ;- Answer: c 19. Where is the best place to locate a function? a. The start of a script b. Before the loop statement c. AutoIt doesn't use functions d. The end of the script Answer: D 20. The special array ___________ is initialized with the command line parameters passed in to your AutoIt script. a. $command b. $CmdLine c. $commandline d. $cmdln Answer: b More Information:
Command Line Parameters 21. What will WinWaitActive("", "", 10) do?    (note: WinTitleMatchMode is not being used) a. The script will halt, for no window will match. b. The currently active window will be used. c. Error for the syntax is incorrect. d. Wait 10 seconds, then the script will continue Answer: B More Information:
Window Titles and Text (Basic) 22. In this example: WinWaitActive ( "title", ["text"], [timeout] ), which parameter(s) are required? a. Title, text b. Title, text, timeout c. Title d. Title, timeout Answer: C More Information:
title is the only required parameter for this function, both the text and timeout are optional.  In some functions the text parameter is not optional, if you do not wish to specify any text then just use "" (a blank string).  A blank string, or nothing at all, in the text tells AutoIt that any text is valid. 23. How many "Windows matching" modes does AutoIt use? a. 1 b. 2 c. 3 d. 4 e. 5 Answer: d More Information:
Window Titles and Text (Advanced) 24. AutoIt only works with a. Standard Microsoft controls b. WIndows, Linix, and novell c. WinBatch functions d. Sun Java controls Answer: A More Information:
Controls 25. What is a control ID? a. A edit, lable, button, or banner. b. A varaible assigned to a control. c. The internal numeric identifier that windows gives to each control. D. Choice not listed. Answer: c More Information:
The Control ID is the internal numeric identifier that windows gives to each control. It is generally the best method of identifying controls. In addition to the AutoIt Window Info Tool, other applications such as screenreaders for the blind and Microsoft tools/APIs may allow you to get this Control ID. 26. What three methods can be used to interact with a control? a. ClassNameNN b. NameClassNN c. Classname d. text e. HWND f. HNWD Answer: a, d, e More Information:
Controls 27. What is the perfered editor for AutoIt v3? a. notepad b. wordpad c. notetext d. SciTE Answer: d More Information:
Editors 28. In this example: MsgBox(0, "SRE Example 1 Result", StringRegExp("text", 'test')), what will be the result in the msgbox? a. 0 b. 1 c. Result d. error Answer: a More Information:
Tutorial - Regular expression 29. In this example: MsgBox(0, "SRE Example 2 Result", StringRegExp("text", 'te[sx]t')), what will be the result in the msgbox? a. 0 b. 1 c. Result d. error Answer: 1 More Information:
Tutorial - Regular expression 30. when using StringRegExp, you can specifying a pattern using a a. group b. set c. bunch d. string Answer: b More Information:
Tutorial - Regular expression 31. Review the following example.

$asResult = StringRegExp("Gnarly Monster hits you for 18 damage.", _
                               '([0-9]{1,3})', 1)
If @error == 0 Then
    MsgBox(0, "SRE Example 5 Result", $asResult[0])
EndIf

What will be the result in the msgbox? a. 1 b. 0 c. 18 d. error Answer: c More Information:
Tutorial - Regular expression 32. What is a UDF: a. unified defined format b. User defined format c. User defined function d. unified defined function Answer: c More Information:
A UDF (User Defined Function) should be self sufficient, or the variables shouuld be made constants and unique. - SmOKe N 33. Pick three that are not the basics of the AutoIt language. a. Datatypes b. Variables c. Macros d. Operators e. Conditional Statements f. Loop Statements g. User Functions h. Comments i. Command Dynamics j. Goto loops k. Range Fields Answer: I, J, K 34. In AutoIt there is only one datatype called a: a. Operator b. Variant c. Variable d. Constant Answer: b More Information:
Language Reference - Datatypes 35. If a string is used as a number and it doesn't contain a valid number, it will be assumed to equal a. 1 b. error c. 0 d. true Answer:c More Information:
Language Reference - Datatypes 36. A number written like this: 1.5e3 is called a a. typo error b. Scientific notation c. contracted number d. compounded number Answer: b More Information:
  Numbers
Numbers can be standard decimal numbers like 2, 4.566, and -7. Scientific notation is also supported; therefore, you could write 1.5e3 instead of 1500. Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit numbers are valid). 37. Strings are a. always shown with a $ b. enclosed in double-quotes like "this" c. enclosed in double-quotes like ""this"" d. always shown with a $_ Answer: b More Information:
Language Reference - Datatypes 38. Only ____ Boolean value(s) exist: _____________________ a. 3, 0 & 1 & 2 b. 4, On, off, 0, 1 c. 2, True and False d. 1, constant Answer: c More Information:
Language Reference - Datatypes 39. Review the following code:

$Boolean1 = true
$Boolean2 = false
$Boolean3 = $Boolean1 AND $Boolean2

What would be the output? a. $Boolean3 being false b. $Boolean3 being true c. error d. o Answer: A More Information:
Language Reference - Datatypes 40. Review the following code:

$Number1 = 0
$Boolean1 = true
$Boolean2 = $Number1 AND $Boolean1

What would be the output? a. $Boolean2 being false b. $Boolean2 being true c. error d. o Answer: A More Information:
Language Reference - Datatypes 41. What is not advisable to use together with Boolean values? a. variables b. macros c. arithmetics d. operators Answer: c More Information:
If you use arithmetics together with Boolean values (which is not advisable!), the following rules apply:

A Boolean true will be converted into the numeric value 1
A Boolean false will be converted into the numeric value 0

Example:
$Boolean1 = true
$Number1 = 100
$Number2 = $Boolean1 + $Number1

This will result in $Number2 to be the numeric value 101 42. If you use strings together with Boolean values, they will be converted as follows: a. A Boolean true will be the string value "True", A Boolean false will be the string value "False" b. A Boolean true will be the string value "1", A Boolean false will be the string value "0" c. A Boolean 1 will be the string value "True", A Boolean 0 will be the string value "False" d. A Boolean 1 will be the string value "1", A Boolean 0 will be the string value "False" Answer: a More Information:
If you use strings together with Boolean values, they will be converted as follows:

A Boolean true will be the string value "True"
A Boolean false will be the string value "False"

Example:
$Boolean1=true
$String1="Test is: "
$String2=$String1 & $Boolean1

This will result in $String2 being the string value "Test is: True"

The other way around however is different. When you use string comparisons with Boolean values, the following rules apply:
Only an empty string ("") will be a Boolean false
Any other string values (including a string containing "0") will be a Boolean true
43. BinaryStrings are: a. like this example: 00100101001000101 b. strings which can include Chr(0) characters. c. strings that have any charactor that repeats d. choice not listed Answer: b More Information:
BinaryString are strings which can include Chr(0) characters. No substitution will occur as it does for Strings.

Example:
$bin = "abc" & chr(0) & "def"
$bin = BinaryString("abc") 44. What is a variable? a. number b. character c. sub strings d. data stored in memory Answer: d More Information:
A variable is just a place to store data in memory so that it can be accessed quickly. Think of it as a mailbox in memory that you can put information in or take information out of. For example you might create a variable to store the number a user's response to a question, or the result to a math equation.

Each variable has a name (again, similar to a mailbox) and must start with the $ character and may only contain letters, numbers and the underscore _ character. Here are some example names:

$var1

$my_variable

Each variable is stored as a variant. 45. How do you declare a variable? (choose 3) a. Dim b. Local c. $Dim d. $Local e. Global f. $Global Answer: a, b, e More Information:
Variables are declared and created with the Dim, Local and Global keywords:

  Dim $var1

Or you can declare multiple variables at once:

  Dim $var1, $myvariable

  You can also assign a variable without declaring it first, but many prefer explicit declarations.

    $var1 = "create and assign"

46. A variable's scope is controlled by a. the type of variable b. lenth of the variable c. when and how you declare the variable d. if it is declaired in a array Answer: c More Information:
  A variable's scope is controlled by when and how you declare the variable. If you declare a variable at the start of your script and outside any functions it exists in the Global scope and can be read or changed from anywhere in the script.
  If you declare a variable inside a function it is in Local scope and can only be used within that same function. Variables created inside functions are automatically destroyed when the function ends.
  By default when variables are declared using Dim or assigned in a function they have Local scope unless there is a global variable of the same name (in which case the global variable is reused). This can be altered by using the Local and Global keywords to declare variables and force the scope you want. 47. What is the defination of a array? a. A variable with one character b. A Scope that is declared both local and global c. A variable containing series of data elements of the same type and size. D. A variable containing series of data elements of different types and sizes. Answer: c More Information:
An Array is a variable containing series of data elements of the same type and size. Each element in this variable can be accessed by an index number.

An example:

Let's say you want to store these series of characters: "A", "U", "T", "O", "I", "T" and "3".
You could use seven separate variables to do so, but using an Array is more efficient:

$Array[1]="A"
$Array[2]="U"
..etc..
$Array[7]="3"

To access a specific value in an Array, you only have to know the index number:

$MyChar=$Array[3]

This results in $MyChar containing the letter "T" (See also: 'operators').

The index number can also be substituted by another variable or an expression, so you can build complex ways to assign or access elements in an array.

Arrays can also be multi dimensional, when you use multiple series of index numbers, like:

$Array[1][1]="Upper-Left"
$Array[2][1]="Lower-Left"
$Array[1][2]="Upper-Right"
$Array[2][2]="Lower-Right"

(These values are just examples)

You can use up to 64 dimensions in an Array.

Before you can start using Arrays in your script, you must define their bounds using the 'Dim'keyword 48. Is the following statement true or false:

It is ok to mix different datatypes in an Array. A. True B. False Answer: b More Information:

Data types in Arrays

It was said that an Array contains only one datatype of the same type. But technically speaking, a Variant in AutoIt can contain anything from a number to a boolean value. So an AutoIt-Array could also contain different types, even other Arrays:

$Array[1]=1
$Array[2]=true
$Array[3]="Text"
$Array[4]=$AnotherArray

This has not been strictly forbidden in AutoIt. However, it is NOT ADVISABLE to mix different datatypes in an Array. Especially the use of an Array inside another Array will severely affect the execution speed of your script. 49. What can you do to a macro? a. Assign a value to them b. Use in a expression c. choice not listed d. make it read - write Answer: b More Information:
Language Reference - Macros 50. Which one of these are NOT a operator? a. @ b. = c. / d. & Answer: a More Information:
Language Reference - Operators 51. What is NOT a type of operator? a. assignment b. mathematical c. comparison d. Logical e. dynamic Answer: e More Information:
Language Reference - Operators 52. Examine the following code:
$var = 20

If $var > 10 Then
     MsgBox(0, "Example", "$var was greater than 10!")
Else
     MsgBox(0, "Example", "$var was less than 10")
EndIf

 What would be the outcome of the example? a. True b. False C. Error d. 0 Answer: A More Information:
Conditional Statements 53. User functions are declared using the a. Function......EndFunction b. Func....EndFunc c. Function....Fend d. Func...Fend Answer: b More Information:
Language Reference - User Functions 54. Review the following code.

$val = 10
For $i = 1 To 10
     $doubled = MyDouble($val)
     MsgBox(0, "", $val & " doubled is " & $doubled)
     $val = $doubled
Next

Exit


Func MyDouble($value)
     $value = $value * 2
     Return $value
EndFunc

How many times will the the number be doubled? a. 5 b. 10 c. 20 d. 100 Answer: a More Information:
Language Reference - User Functions 55. How can you make a comment and span multiple lines? a. Add the macro @Returnline to the end of the line b. Add an underscore " _" preceded by a blank is placed at the end of a "broken" line. c. Add a carriage return to the end of the line d. Add "&_Return" to the end of the line. You must use double quotes when doing this. Answer: b More Information:
Language Reference - Comments 56. What is the best method to comment large blocks of script? (Pick 2) a. Use ";;;;;" then the macro @Returnline to start, to stop use ";;;;;" then the macro @ReturnStop. b. use #CS to start, and to stop use #CE c. Use #Comment-start and #Comment-end d. Use @Comment-start and @Comment-end e. Use @CS to start, and @CE to stop Answer: b, c More Information:
Language Reference - Comments 57. A GUI consist of what? a. The start button, taskbar, and desktop icons b. The start button, taskbar, mouse pointer, and desktop icons c. One or more windows and each window contains one or more controls. D. A DOS window to enter commands Answer: c More Information:
GUI Reference 58. Before writing any GUI scripts you must include the file a. GUIConstants.aut b. GUIConstants.au3 c. GUICtrlConstants.aut d. GUICtrlConstants.au3 Answer: b More Information:
GUI Reference 59. Review the following script:

#include

GUICreate("Hello World", 200, 100)
GUISetState(@SW_SHOW)
Sleep(2000)

What will happen when you run this script? a. A window will appear for 2000 seconds b. A window will appear for 2 minutes c. A window will appear for 2 seconds d. Nothing. The script is missing a loop statement. Answer: c More Information:
Sleep(2000) is 2 seconds. GUI Reference 60. Review the following script:

#include

GUICreate("Hello World", 200, 100)
GUICtrlCreateLabel("Hello world! How are you?", 30, 10)
GUICtrlCreateButton("OK", 70, 50, 60)
GUISetState(@SW_SHOW)
Sleep(20000)

What will happen when you run this script, and click on the "OK" button? a. The window will close in 20 seconds, and the OK button will blink. b. Nothing. The script is missing a loop statement c. The OK button will not react when clicked. The window will close in 20 seconds. d. The window will close in 2 seconds. Answer: c More Information:
GUI Reference 61. What are the two basic GUI modes? (Pick 2) a. MessageEvent b. OnMessage c. MessageLoop d. EventLoop e. OnEvent f. OnMessageEvent Answer: C, E More Information:
GUI Reference - MessageLoop Mode
GUI Reference - OnEvent Mode

GUI Event Modes

  As mentioned above there are two basic GUI modes: MessageLoop mode and OnEvent mode. The modes are simply two different ways of reacting to GUI events. The mode you choose will depend on personal preference, and to some extent the type of GUI you wish to create. Both modes are equally capable of creating any GUI you wish but sometimes one mode is more suited to a task than the other.
  The default mode is the MessageLoop mode.  To switch to OnEvent mode use Opt("GUIOnEventMode", 1).

Message-loop Mode (default)
 
In the Message-loop mode your script will spend the majority of its time in a tight loop. This loop will simply poll the GUI using the GUIGetMsg function. When an event has occurred the return value of the GUIGetMsg function will show the details (a button is clicked, the GUI has been closed, etc.).
  In this mode you will only receive events while you are actively polling the GUIGetMsg function so you must ensure that you call it many times a second otherwise your GUI will be unresponsive.
  This mode is best for GUIs where the GUI is "king" and all you care about is waiting for user events.

See this page for a more detailed explanation of the MessageLoop mode.

OnEvent Mode
 
In the OnEvent mode instead of constantly polling the GUI to find out if anything has happened you make the GUI temporarily pause your script and call a pre-defined function to handle the event. For example, if the user clicks Button1 the GUI halts your main script and calls a previously defined user function that deals with Button1. When the function call is completed the main script is resumed. This mode is similar to the Visual Basic forms method.
  This mode is best for GUIs where the GUI is of secondary importance and your script has other tasks to perform in addition to looking after the GUI.

See this page for a more detailed explanation of the OnEvent mode 62. What are the three event messages that GUIGetMsg will return? a. No Event b. Dynamic Event c. Array Event d. Control Event e. System Event Answer: a, d, e More Information:
GUI Reference - MessageLoop Mode 63. Review the following script:

#include <GUIConstants.au3>

GUICreate("Hello World", 200, 100)
GUICtrlCreateLabel("Hello world! How are you?", 30, 10)
$okbutton = GUICtrlCreateButton("OK", 70, 50, 60)
GUISetState(@SW_SHOW)

While 1
  $msg = GUIGetMsg()

  Select
    Case $msg = $okbutton
      MsgBox(0, "GUI Event", "You pressed OK!")

    Case $msg = $GUI_EVENT_CLOSE
      MsgBox(0, "GUI Event", "You clicked CLOSE! Exiting...")
      ExitLoop
  EndSelect
WEnd

What will happen when you click the "OK" button when you run the script? a. Nothing b. THe GUI will close c. A message box will appear d. error message Answer: c More Information:

#include <GUIConstants.au3>

GUICreate("Hello World", 200, 100)  ;makes a GIU
GUICtrlCreateLabel("Hello world! How are you?", 30, 10)  ;makes a lable
$okbutton = GUICtrlCreateButton("OK", 70, 50, 60)  ;makes a button
GUISetState(@SW_SHOW)   ;

While 1
  $msg = GUIGetMsg()  ;checks the state of the GUI

  Select
    Case $msg = $okbutton   ;When this happens, a msgbox will be displayed
      MsgBox(0, "GUI Event", "You pressed OK!")  ;message box with ok button

    Case $msg = $GUI_EVENT_CLOSE   ;When this happens, a msgbox will be displayed
      MsgBox(0, "GUI Event", "You clicked CLOSE! Exiting...")    ;message box with ok button
      ExitLoop
  EndSelect
WEnd